diff --git a/Gemfile.lock b/Gemfile.lock index 92b56a83..3eb92fc0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -44,7 +44,7 @@ GEM faraday-net_http (>= 2.0, < 3.2) faraday-net_http (3.1.0) net-http - ffi (1.15.5) + ffi (1.16.3) filelock (1.1.1) gssapi (1.3.1) ffi (>= 1.0.1) @@ -54,8 +54,9 @@ GEM httpclient (2.8.3) i18n (1.14.4) concurrent-ruby (~> 1.0) - json (2.7.1) - jwt (2.2.3) + json (2.7.2) + jwt (2.8.1) + base64 language_server-protocol (3.17.0.3) little-plugger (1.1.4) logging (2.3.1) @@ -69,7 +70,8 @@ GEM net-http (0.4.1) uri netrc (0.11.0) - nori (2.6.0) + nori (2.7.0) + bigdecimal oauth2 (1.4.11) faraday (>= 0.17.3, < 3.0) jwt (>= 1.0, < 3.0) @@ -82,21 +84,20 @@ GEM sawyer (~> 0.9) openssl (3.2.0) parallel (1.24.0) - parser (3.3.0.5) + parser (3.3.1.0) ast (~> 2.4.1) racc - prettier_print (1.2.1) - prism (0.24.0) - psych (5.1.0) + prism (0.27.0) + psych (5.1.2) stringio - public_suffix (5.0.4) + public_suffix (5.0.5) racc (1.7.3) - rack (3.0.9.1) + rack (3.0.10) rainbow (3.1.1) - rbi (0.1.9) - prism (>= 0.18.0, < 0.25) + rbi (0.1.12) + prism (>= 0.18.0, < 0.28) sorbet-runtime (>= 0.5.9204) - rdoc (6.5.0) + rdoc (6.6.3.1) psych (>= 4.0.0) regexp_parser (2.9.0) rexml (3.2.6) @@ -112,8 +113,8 @@ GEM rspec-mocks (3.13.0) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-support (3.13.0) - rubocop (1.62.1) + rspec-support (3.13.1) + rubocop (1.63.4) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -124,46 +125,40 @@ GEM rubocop-ast (>= 1.31.1, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.31.2) - parser (>= 3.3.0.4) + rubocop-ast (1.31.3) + parser (>= 3.3.1.0) ruby-progressbar (1.13.0) rubyntlm (0.6.3) rubyzip (2.3.2) sawyer (0.9.2) addressable (>= 2.3.5) faraday (>= 0.17.3, < 3) - sentry-ruby (4.7.1) + sentry-ruby (5.17.3) + bigdecimal concurrent-ruby (~> 1.0, >= 1.0.2) - faraday (>= 1.0) - sentry-ruby-core (= 4.7.1) - sentry-ruby-core (4.7.1) - concurrent-ruby - faraday - sorbet (0.5.11294) - sorbet-static (= 0.5.11294) - sorbet-runtime (0.5.11294) - sorbet-static (0.5.11294-x86_64-linux) - sorbet-static-and-runtime (0.5.11294) - sorbet (= 0.5.11294) - sorbet-runtime (= 0.5.11294) - spoom (1.2.4) + sorbet (0.5.11361) + sorbet-static (= 0.5.11361) + sorbet-runtime (0.5.11361) + sorbet-static (0.5.11361-x86_64-linux) + sorbet-static-and-runtime (0.5.11361) + sorbet (= 0.5.11361) + sorbet-runtime (= 0.5.11361) + spoom (1.3.0) erubi (>= 1.10.0) + prism (>= 0.19.0) sorbet-static-and-runtime (>= 0.5.10187) - syntax_tree (>= 6.1.1) thor (>= 0.19.2) - stringio (3.0.8) - syntax_tree (6.2.0) - prettier_print (>= 1.2.0) - tapioca (0.12.0) + stringio (3.1.0) + tapioca (0.13.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) + sorbet-static-and-runtime (>= 0.5.11087) + spoom (>= 1.2.0) thor (>= 1.2.0) yard-sorbet - thor (1.3.0) + thor (1.3.1) tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) diff --git a/sorbet/rbi/gems/ffi@1.15.5.rbi b/sorbet/rbi/gems/ffi@1.16.3.rbi similarity index 100% rename from sorbet/rbi/gems/ffi@1.15.5.rbi rename to sorbet/rbi/gems/ffi@1.16.3.rbi diff --git a/sorbet/rbi/gems/json@2.7.1.rbi b/sorbet/rbi/gems/json@2.7.2.rbi similarity index 94% rename from sorbet/rbi/gems/json@2.7.1.rbi rename to sorbet/rbi/gems/json@2.7.2.rbi index e22ce040..3ef0f88c 100644 --- a/sorbet/rbi/gems/json@2.7.1.rbi +++ b/sorbet/rbi/gems/json@2.7.2.rbi @@ -6,7 +6,7 @@ # Extends any Class to include _json_creatable?_ method. # -# source://json//lib/json/common.rb#689 +# source://json//lib/json/common.rb#690 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 @@ -15,7 +15,7 @@ class Class < ::Module # # @return [Boolean] # - # source://json//lib/json/common.rb#694 + # source://json//lib/json/common.rb#695 def json_creatable?; end end @@ -630,7 +630,7 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//lib/json/common.rb#614 + # source://json//lib/json/common.rb#615 def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil), kwargs = T.unsafe(nil)); end # :call-seq: @@ -647,13 +647,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//lib/json/common.rb#328 + # source://json//lib/json/common.rb#329 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//lib/json/common.rb#328 + # source://json//lib/json/common.rb#329 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -692,7 +692,7 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//lib/json/common.rb#299 + # source://json//lib/json/common.rb#300 def generate(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -823,7 +823,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#540 + # source://json//lib/json/common.rb#541 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :call-seq: @@ -834,7 +834,7 @@ module JSON # # See method #parse. # - # source://json//lib/json/common.rb#248 + # source://json//lib/json/common.rb#249 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -845,10 +845,10 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#259 + # source://json//lib/json/common.rb#260 def load_file!(filespec, opts = T.unsafe(nil)); end - # source://json//lib/json/common.rb#642 + # source://json//lib/json/common.rb#643 def merge_dump_options(opts, strict: T.unsafe(nil)); end # :call-seq: @@ -899,7 +899,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#218 + # source://json//lib/json/common.rb#219 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -914,7 +914,7 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#233 + # source://json//lib/json/common.rb#234 def parse!(source, opts = T.unsafe(nil)); end # :call-seq: @@ -947,28 +947,28 @@ module JSON # } # } # - # source://json//lib/json/common.rb#373 + # source://json//lib/json/common.rb#374 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//lib/json/common.rb#373 + # source://json//lib/json/common.rb#374 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//lib/json/common.rb#558 + # source://json//lib/json/common.rb#559 def recurse_proc(result, &proc); end - # source://json//lib/json/common.rb#540 + # source://json//lib/json/common.rb#541 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//lib/json/common.rb#299 + # source://json//lib/json/common.rb#300 def unparse(obj, opts = T.unsafe(nil)); end class << self @@ -984,26 +984,26 @@ module JSON # ruby = [0, 1, nil] # JSON[ruby] # => '[0,1,null]' # - # source://json//lib/json/common.rb#21 + # source://json//lib/json/common.rb#22 def [](object, opts = T.unsafe(nil)); end - # source://json//lib/json/common.rb#84 + # source://json//lib/json/common.rb#85 def create_fast_state; end # Returns the current create identifier. # See also JSON.create_id=. # - # source://json//lib/json/common.rb#129 + # source://json//lib/json/common.rb#130 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//lib/json/common.rb#123 + # source://json//lib/json/common.rb#124 def create_id=(new_value); end - # source://json//lib/json/common.rb#94 + # source://json//lib/json/common.rb#95 def create_pretty_state; end # Return the constant located at _path_. The format of _path_ has to be @@ -1011,7 +1011,7 @@ module JSON # level (absolute namespace path?). If there doesn't exist a constant at # the given path, an ArgumentError is raised. # - # source://json//lib/json/common.rb#45 + # source://json//lib/json/common.rb#46 def deep_const_get(path); end # :call-seq: @@ -1042,7 +1042,7 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//lib/json/common.rb#614 + # source://json//lib/json/common.rb#615 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. @@ -1050,7 +1050,7 @@ module JSON # opts = JSON.dump_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} # - # source://json//lib/json/common.rb#579 + # source://json//lib/json/common.rb#580 def dump_default_options; end # Sets or returns the default options for the JSON.dump method. @@ -1058,7 +1058,7 @@ module JSON # opts = JSON.dump_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} # - # source://json//lib/json/common.rb#579 + # source://json//lib/json/common.rb#580 def dump_default_options=(_arg0); end # :call-seq: @@ -1075,13 +1075,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//lib/json/common.rb#328 + # source://json//lib/json/common.rb#329 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//lib/json/common.rb#328 + # source://json//lib/json/common.rb#329 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -1120,24 +1120,24 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//lib/json/common.rb#299 + # source://json//lib/json/common.rb#300 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//lib/json/common.rb#106 + # source://json//lib/json/common.rb#107 def generator; end # Set the module _generator_ to be used by JSON. # - # source://json//lib/json/common.rb#61 + # source://json//lib/json/common.rb#62 def generator=(generator); end # Encodes string using String.encode. # - # source://json//lib/json/common.rb#638 + # source://json//lib/json/common.rb#639 def iconv(to, from, string); end # :call-seq: @@ -1268,7 +1268,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#540 + # source://json//lib/json/common.rb#541 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # Sets or returns default options for the JSON.load method. @@ -1276,7 +1276,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//lib/json/common.rb#403 + # source://json//lib/json/common.rb#404 def load_default_options; end # Sets or returns default options for the JSON.load method. @@ -1284,7 +1284,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//lib/json/common.rb#403 + # source://json//lib/json/common.rb#404 def load_default_options=(_arg0); end # :call-seq: @@ -1295,7 +1295,7 @@ module JSON # # See method #parse. # - # source://json//lib/json/common.rb#248 + # source://json//lib/json/common.rb#249 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1306,7 +1306,7 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#259 + # source://json//lib/json/common.rb#260 def load_file!(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1357,7 +1357,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#218 + # source://json//lib/json/common.rb#219 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -1372,19 +1372,19 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#233 + # source://json//lib/json/common.rb#234 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//lib/json/common.rb#32 + # source://json//lib/json/common.rb#33 def parser; end # Set the JSON parser class _parser_ to be used by JSON. # - # source://json//lib/json/common.rb#35 + # source://json//lib/json/common.rb#36 def parser=(parser); end # :call-seq: @@ -1417,123 +1417,123 @@ module JSON # } # } # - # source://json//lib/json/common.rb#373 + # source://json//lib/json/common.rb#374 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//lib/json/common.rb#373 + # source://json//lib/json/common.rb#374 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//lib/json/common.rb#558 + # source://json//lib/json/common.rb#559 def recurse_proc(result, &proc); end - # source://json//lib/json/common.rb#540 + # source://json//lib/json/common.rb#541 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//lib/json/common.rb#111 + # source://json//lib/json/common.rb#112 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//lib/json/common.rb#111 + # source://json//lib/json/common.rb#112 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//lib/json/common.rb#299 + # source://json//lib/json/common.rb#300 def unparse(obj, opts = T.unsafe(nil)); end private - # source://json//lib/json/common.rb#642 + # source://json//lib/json/common.rb#643 def merge_dump_options(opts, strict: T.unsafe(nil)); end end end -# source://json//lib/json/common.rb#117 +# source://json//lib/json/common.rb#118 JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String) -# source://json//lib/json/common.rb#114 +# source://json//lib/json/common.rb#115 JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String) -# source://json//lib/json/generic_object.rb#5 +# source://json//lib/json/generic_object.rb#9 class JSON::GenericObject < ::OpenStruct - # source://json//lib/json/generic_object.rb#63 + # source://json//lib/json/generic_object.rb#67 def as_json(*_arg0); end - # source://json//lib/json/generic_object.rb#47 + # source://json//lib/json/generic_object.rb#51 def to_hash; end - # source://json//lib/json/generic_object.rb#67 + # source://json//lib/json/generic_object.rb#71 def to_json(*a); end - # source://json//lib/json/generic_object.rb#59 + # source://json//lib/json/generic_object.rb#63 def |(other); end class << self - # source://json//lib/json/generic_object.rb#41 + # source://json//lib/json/generic_object.rb#45 def dump(obj, *args); end - # source://json//lib/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//lib/json/generic_object.rb#13 + # source://json//lib/json/generic_object.rb#17 def json_creatable=(_arg0); end # @return [Boolean] # - # source://json//lib/json/generic_object.rb#9 + # source://json//lib/json/generic_object.rb#13 def json_creatable?; end - # source://json//lib/json/generic_object.rb#15 + # source://json//lib/json/generic_object.rb#19 def json_create(data); end - # source://json//lib/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 +# source://json//lib/json/common.rb#141 class JSON::JSONError < ::StandardError class << self - # source://json//lib/json/common.rb#141 + # source://json//lib/json/common.rb#142 def wrap(exception); end end end -# source://json//lib/json/common.rb#6 +# source://json//lib/json/common.rb#7 JSON::NOT_SET = T.let(T.unsafe(nil), Object) -# source://json//lib/json/common.rb#38 +# source://json//lib/json/common.rb#39 JSON::Parser = JSON::Ext::Parser -# source://json//lib/json/common.rb#76 +# source://json//lib/json/common.rb#77 JSON::State = JSON::Ext::Generator::State # For backwards compatibility # -# source://json//lib/json/common.rb#162 +# source://json//lib/json/common.rb#163 JSON::UnparserError = JSON::GeneratorError -# source://json//lib/json/common.rb#652 +# source://json//lib/json/common.rb#653 module Kernel private @@ -1544,18 +1544,18 @@ module Kernel # The _opts_ argument is passed through to generate/parse respectively. See # generate and parse for their documentation. # - # source://json//lib/json/common.rb#679 + # source://json//lib/json/common.rb#680 def JSON(object, *args); end # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in # one line. # - # source://json//lib/json/common.rb#657 + # source://json//lib/json/common.rb#658 def j(*objs); end # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with # indentation and over many lines. # - # source://json//lib/json/common.rb#666 + # source://json//lib/json/common.rb#667 def jj(*objs); end end diff --git a/sorbet/rbi/gems/jwt@2.2.3.rbi b/sorbet/rbi/gems/jwt@2.2.3.rbi deleted file mode 100644 index 31956aa3..00000000 --- a/sorbet/rbi/gems/jwt@2.2.3.rbi +++ /dev/null @@ -1,937 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `jwt` gem. -# Please instead update this file by running `bin/tapioca gem jwt`. - -# JSON Web Token implementation -# -# Should be up to date with the latest spec: -# https://tools.ietf.org/html/rfc7519 -# -# source://jwt//lib/jwt/base64.rb#5 -module JWT - include ::JWT::DefaultOptions - - private - - # source://jwt//lib/jwt.rb#27 - def decode(jwt, key = T.unsafe(nil), verify = T.unsafe(nil), options = T.unsafe(nil), &keyfinder); end - - # source://jwt//lib/jwt.rb#20 - def encode(payload, key, algorithm = T.unsafe(nil), header_fields = T.unsafe(nil)); end - - class << self - # source://jwt//lib/jwt.rb#27 - def decode(jwt, key = T.unsafe(nil), verify = T.unsafe(nil), options = T.unsafe(nil), &keyfinder); end - - # source://jwt//lib/jwt.rb#20 - def encode(payload, key, algorithm = T.unsafe(nil), header_fields = T.unsafe(nil)); end - end -end - -# Signature logic for JWT -# -# source://jwt//lib/jwt/algos/hmac.rb#2 -module JWT::Algos - extend ::JWT::Algos - - # source://jwt//lib/jwt/algos.rb#27 - def find(algorithm); end - - private - - # source://jwt//lib/jwt/algos.rb#33 - def indexed; end -end - -# source://jwt//lib/jwt/algos.rb#17 -JWT::Algos::ALGOS = T.let(T.unsafe(nil), Array) - -# source://jwt//lib/jwt/algos/ecdsa.rb#3 -module JWT::Algos::Ecdsa - private - - # source://jwt//lib/jwt/algos/ecdsa.rb#13 - def sign(to_sign); end - - # source://jwt//lib/jwt/algos/ecdsa.rb#24 - def verify(to_verify); end - - class << self - # source://jwt//lib/jwt/algos/ecdsa.rb#13 - def sign(to_sign); end - - # source://jwt//lib/jwt/algos/ecdsa.rb#24 - def verify(to_verify); end - end -end - -# source://jwt//lib/jwt/algos/ecdsa.rb#7 -JWT::Algos::Ecdsa::NAMED_CURVES = T.let(T.unsafe(nil), Hash) - -# source://jwt//lib/jwt/algos/ecdsa.rb#6 -JWT::Algos::Ecdsa::SUPPORTED = T.let(T.unsafe(nil), Array) - -# source://jwt//lib/jwt/algos/eddsa.rb#3 -module JWT::Algos::Eddsa - private - - # source://jwt//lib/jwt/algos/eddsa.rb#8 - def sign(to_sign); end - - # source://jwt//lib/jwt/algos/eddsa.rb#15 - def verify(to_verify); end - - class << self - # @raise [EncodeError] - # - # source://jwt//lib/jwt/algos/eddsa.rb#8 - def sign(to_sign); end - - # @raise [IncorrectAlgorithm] - # - # source://jwt//lib/jwt/algos/eddsa.rb#15 - def verify(to_verify); end - end -end - -# source://jwt//lib/jwt/algos/eddsa.rb#6 -JWT::Algos::Eddsa::SUPPORTED = T.let(T.unsafe(nil), Array) - -# source://jwt//lib/jwt/algos/hmac.rb#3 -module JWT::Algos::Hmac - private - - # source://jwt//lib/jwt/algos/hmac.rb#8 - def sign(to_sign); end - - # source://jwt//lib/jwt/algos/hmac.rb#19 - def verify(to_verify); end - - class << self - # source://jwt//lib/jwt/algos/hmac.rb#8 - def sign(to_sign); end - - # source://jwt//lib/jwt/algos/hmac.rb#19 - def verify(to_verify); end - end -end - -# source://jwt//lib/jwt/algos/hmac.rb#6 -JWT::Algos::Hmac::SUPPORTED = T.let(T.unsafe(nil), Array) - -# source://jwt//lib/jwt/algos/none.rb#3 -module JWT::Algos::None - private - - # source://jwt//lib/jwt/algos/none.rb#8 - def sign(*_arg0); end - - # source://jwt//lib/jwt/algos/none.rb#10 - def verify(*_arg0); end - - class << self - # source://jwt//lib/jwt/algos/none.rb#8 - def sign(*_arg0); end - - # source://jwt//lib/jwt/algos/none.rb#10 - def verify(*_arg0); end - end -end - -# source://jwt//lib/jwt/algos/none.rb#6 -JWT::Algos::None::SUPPORTED = T.let(T.unsafe(nil), Array) - -# source://jwt//lib/jwt/algos/ps.rb#3 -module JWT::Algos::Ps - private - - # source://jwt//lib/jwt/algos/ps.rb#30 - def require_openssl!; end - - # source://jwt//lib/jwt/algos/ps.rb#10 - def sign(to_sign); end - - # source://jwt//lib/jwt/algos/ps.rb#24 - def verify(to_verify); end - - class << self - # source://jwt//lib/jwt/algos/ps.rb#30 - def require_openssl!; end - - # @raise [EncodeError] - # - # source://jwt//lib/jwt/algos/ps.rb#10 - def sign(to_sign); end - - # source://jwt//lib/jwt/algos/ps.rb#24 - def verify(to_verify); end - end -end - -# source://jwt//lib/jwt/algos/ps.rb#8 -JWT::Algos::Ps::SUPPORTED = T.let(T.unsafe(nil), Array) - -# source://jwt//lib/jwt/algos/rsa.rb#3 -module JWT::Algos::Rsa - private - - # source://jwt//lib/jwt/algos/rsa.rb#8 - def sign(to_sign); end - - # source://jwt//lib/jwt/algos/rsa.rb#14 - def verify(to_verify); end - - class << self - # @raise [EncodeError] - # - # source://jwt//lib/jwt/algos/rsa.rb#8 - def sign(to_sign); end - - # source://jwt//lib/jwt/algos/rsa.rb#14 - def verify(to_verify); end - end -end - -# source://jwt//lib/jwt/algos/rsa.rb#6 -JWT::Algos::Rsa::SUPPORTED = T.let(T.unsafe(nil), Array) - -# source://jwt//lib/jwt/algos/unsupported.rb#3 -module JWT::Algos::Unsupported - private - - # source://jwt//lib/jwt/algos/unsupported.rb#8 - def sign(*_arg0); end - - # source://jwt//lib/jwt/algos/unsupported.rb#12 - def verify(*_arg0); end - - class << self - # @raise [NotImplementedError] - # - # source://jwt//lib/jwt/algos/unsupported.rb#8 - def sign(*_arg0); end - - # @raise [JWT::VerificationError] - # - # source://jwt//lib/jwt/algos/unsupported.rb#12 - def verify(*_arg0); end - end -end - -# source://jwt//lib/jwt/algos/unsupported.rb#6 -JWT::Algos::Unsupported::SUPPORTED = T.let(T.unsafe(nil), Array) - -# Base64 helpers -# -# source://jwt//lib/jwt/base64.rb#7 -class JWT::Base64 - class << self - # source://jwt//lib/jwt/base64.rb#13 - def url_decode(str); end - - # source://jwt//lib/jwt/base64.rb#9 - def url_encode(str); end - end -end - -# source://jwt//lib/jwt/claims_validator.rb#4 -class JWT::ClaimsValidator - # @return [ClaimsValidator] a new instance of ClaimsValidator - # - # source://jwt//lib/jwt/claims_validator.rb#11 - def initialize(payload); end - - # source://jwt//lib/jwt/claims_validator.rb#15 - def validate!; end - - private - - # @raise [InvalidPayload] - # - # source://jwt//lib/jwt/claims_validator.rb#29 - def validate_is_numeric(claim); end - - # source://jwt//lib/jwt/claims_validator.rb#23 - def validate_numeric_claims; end -end - -# source://jwt//lib/jwt/claims_validator.rb#5 -JWT::ClaimsValidator::NUMERIC_CLAIMS = T.let(T.unsafe(nil), Array) - -# Decoding logic for JWT -# -# source://jwt//lib/jwt/decode.rb#10 -class JWT::Decode - # @raise [JWT::DecodeError] - # @return [Decode] a new instance of Decode - # - # source://jwt//lib/jwt/decode.rb#11 - def initialize(jwt, key, verify, options, &keyfinder); end - - # @raise [JWT::DecodeError] - # - # source://jwt//lib/jwt/decode.rb#22 - def decode_segments; end - - private - - # source://jwt//lib/jwt/decode.rb#49 - def allowed_algorithms; end - - # source://jwt//lib/jwt/decode.rb#87 - def decode_crypto; end - - # @raise [JWT::DecodeError] - # - # source://jwt//lib/jwt/decode.rb#65 - def find_key(&keyfinder); end - - # source://jwt//lib/jwt/decode.rb#91 - def header; end - - # @return [Boolean] - # - # source://jwt//lib/jwt/decode.rb#45 - def options_includes_algo_in_header?; end - - # source://jwt//lib/jwt/decode.rb#103 - def parse_and_decode(segment); end - - # source://jwt//lib/jwt/decode.rb#95 - def payload; end - - # source://jwt//lib/jwt/decode.rb#83 - def segment_length; end - - # source://jwt//lib/jwt/decode.rb#99 - def signing_input; end - - # @raise [JWT::DecodeError] - # - # source://jwt//lib/jwt/decode.rb#75 - def validate_segment_count!; end - - # source://jwt//lib/jwt/decode.rb#71 - def verify_claims; end - - # @raise [JWT::IncorrectAlgorithm] - # - # source://jwt//lib/jwt/decode.rb#35 - def verify_signature; end -end - -# source://jwt//lib/jwt/error.rb#5 -class JWT::DecodeError < ::StandardError; end - -# source://jwt//lib/jwt/default_options.rb#2 -module JWT::DefaultOptions; end - -# source://jwt//lib/jwt/default_options.rb#3 -JWT::DefaultOptions::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) - -# Encoding logic for JWT -# -# source://jwt//lib/jwt/encode.rb#9 -class JWT::Encode - # @return [Encode] a new instance of Encode - # - # source://jwt//lib/jwt/encode.rb#13 - def initialize(options); end - - # source://jwt//lib/jwt/encode.rb#20 - def segments; end - - private - - # source://jwt//lib/jwt/encode.rb#65 - def combine(*parts); end - - # source://jwt//lib/jwt/encode.rb#61 - def encode(data); end - - # source://jwt//lib/jwt/encode.rb#42 - def encode_header; end - - # source://jwt//lib/jwt/encode.rb#47 - def encode_payload; end - - # source://jwt//lib/jwt/encode.rb#55 - def encode_signature; end - - # source://jwt//lib/jwt/encode.rb#26 - def encoded_header; end - - # source://jwt//lib/jwt/encode.rb#38 - def encoded_header_and_payload; end - - # source://jwt//lib/jwt/encode.rb#30 - def encoded_payload; end - - # source://jwt//lib/jwt/encode.rb#34 - def encoded_signature; end -end - -# source://jwt//lib/jwt/encode.rb#11 -JWT::Encode::ALG_KEY = T.let(T.unsafe(nil), String) - -# source://jwt//lib/jwt/encode.rb#10 -JWT::Encode::ALG_NONE = T.let(T.unsafe(nil), String) - -# source://jwt//lib/jwt/error.rb#4 -class JWT::EncodeError < ::StandardError; end - -# source://jwt//lib/jwt/error.rb#9 -class JWT::ExpiredSignature < ::JWT::DecodeError; end - -# source://jwt//lib/jwt/error.rb#11 -class JWT::ImmatureSignature < ::JWT::DecodeError; end - -# source://jwt//lib/jwt/error.rb#10 -class JWT::IncorrectAlgorithm < ::JWT::DecodeError; end - -# source://jwt//lib/jwt/error.rb#14 -class JWT::InvalidAudError < ::JWT::DecodeError; end - -# source://jwt//lib/jwt/error.rb#13 -class JWT::InvalidIatError < ::JWT::DecodeError; end - -# source://jwt//lib/jwt/error.rb#12 -class JWT::InvalidIssuerError < ::JWT::DecodeError; end - -# source://jwt//lib/jwt/error.rb#16 -class JWT::InvalidJtiError < ::JWT::DecodeError; end - -# source://jwt//lib/jwt/error.rb#17 -class JWT::InvalidPayload < ::JWT::DecodeError; end - -# source://jwt//lib/jwt/error.rb#15 -class JWT::InvalidSubError < ::JWT::DecodeError; end - -# JSON wrapper -# -# source://jwt//lib/jwt/json.rb#7 -class JWT::JSON - class << self - # source://jwt//lib/jwt/json.rb#9 - def generate(data); end - - # source://jwt//lib/jwt/json.rb#13 - def parse(data); end - end -end - -# source://jwt//lib/jwt/jwk/key_finder.rb#4 -module JWT::JWK - class << self - # source://jwt//lib/jwt/jwk.rb#23 - def classes; end - - # source://jwt//lib/jwt/jwk.rb#17 - def create_from(keypair); end - - # @raise [JWT::JWKError] - # - # source://jwt//lib/jwt/jwk.rb#8 - def import(jwk_data); end - - # source://jwt//lib/jwt/jwk.rb#17 - def new(keypair); end - - private - - # source://jwt//lib/jwt/jwk.rb#36 - def generate_mappings; end - - # source://jwt//lib/jwt/jwk.rb#32 - def mappings; end - end -end - -# source://jwt//lib/jwt/jwk/ec.rb#7 -class JWT::JWK::EC < ::JWT::JWK::KeyBase - extend ::Forwardable - - # @raise [ArgumentError] - # @return [EC] a new instance of EC - # - # source://jwt//lib/jwt/jwk/ec.rb#15 - def initialize(keypair, kid = T.unsafe(nil)); end - - # source://jwt//lib/jwt/jwk/ec.rb#26 - def export(options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://jwt//lib/jwt/jwk/ec.rb#22 - def private?; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def public_key(*args, **_arg1, &block); end - - private - - # source://jwt//lib/jwt/jwk/ec.rb#42 - def append_private_parts(the_hash); end - - # source://jwt//lib/jwt/jwk/ec.rb#74 - def encode_octets(octets); end - - # source://jwt//lib/jwt/jwk/ec.rb#78 - def encode_open_ssl_bn(key_part); end - - # source://jwt//lib/jwt/jwk/ec.rb#49 - def generate_kid(ec_keypair); end - - # source://jwt//lib/jwt/jwk/ec.rb#56 - def keypair_components(ec_keypair); end - - class << self - # @raise [Jwt::JWKError] - # - # source://jwt//lib/jwt/jwk/ec.rb#83 - def import(jwk_data); end - - # source://jwt//lib/jwt/jwk/ec.rb#93 - def to_openssl_curve(crv); end - - private - - # source://jwt//lib/jwt/jwk/ec.rb#140 - def decode_octets(jwk_data); end - - # source://jwt//lib/jwt/jwk/ec.rb#144 - def decode_open_ssl_bn(jwk_data); end - - # source://jwt//lib/jwt/jwk/ec.rb#113 - def ec_pkey(jwk_crv, jwk_x, jwk_y, jwk_d); end - - # source://jwt//lib/jwt/jwk/ec.rb#107 - def jwk_attrs(jwk_data, attrs); end - end -end - -# source://jwt//lib/jwt/jwk/ec.rb#13 -JWT::JWK::EC::BINARY = T.let(T.unsafe(nil), Integer) - -# source://jwt//lib/jwt/jwk/ec.rb#11 -JWT::JWK::EC::KTY = T.let(T.unsafe(nil), String) - -# source://jwt//lib/jwt/jwk/ec.rb#12 -JWT::JWK::EC::KTYS = T.let(T.unsafe(nil), Array) - -# source://jwt//lib/jwt/jwk/hmac.rb#5 -class JWT::JWK::HMAC < ::JWT::JWK::KeyBase - # @raise [ArgumentError] - # @return [HMAC] a new instance of HMAC - # - # source://jwt//lib/jwt/jwk/hmac.rb#9 - def initialize(keypair, kid = T.unsafe(nil)); end - - # See https://tools.ietf.org/html/rfc7517#appendix-A.3 - # - # source://jwt//lib/jwt/jwk/hmac.rb#25 - def export(options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://jwt//lib/jwt/jwk/hmac.rb#16 - def private?; end - - # source://jwt//lib/jwt/jwk/hmac.rb#20 - def public_key; end - - private - - # source://jwt//lib/jwt/jwk/hmac.rb#40 - def generate_kid; end - - class << self - # @raise [JWT::JWKError] - # - # source://jwt//lib/jwt/jwk/hmac.rb#47 - def import(jwk_data); end - end -end - -# source://jwt//lib/jwt/jwk/hmac.rb#6 -JWT::JWK::HMAC::KTY = T.let(T.unsafe(nil), String) - -# source://jwt//lib/jwt/jwk/hmac.rb#7 -JWT::JWK::HMAC::KTYS = T.let(T.unsafe(nil), Array) - -# source://jwt//lib/jwt/jwk/key_base.rb#5 -class JWT::JWK::KeyBase - # @return [KeyBase] a new instance of KeyBase - # - # source://jwt//lib/jwt/jwk/key_base.rb#8 - def initialize(keypair, kid = T.unsafe(nil)); end - - # Returns the value of attribute keypair. - # - # source://jwt//lib/jwt/jwk/key_base.rb#6 - def keypair; end - - # Returns the value of attribute kid. - # - # source://jwt//lib/jwt/jwk/key_base.rb#6 - def kid; end - - class << self - # @private - # - # source://jwt//lib/jwt/jwk/key_base.rb#13 - def inherited(klass); end - end -end - -# source://jwt//lib/jwt/jwk/key_finder.rb#5 -class JWT::JWK::KeyFinder - # @return [KeyFinder] a new instance of KeyFinder - # - # source://jwt//lib/jwt/jwk/key_finder.rb#6 - def initialize(options); end - - # @raise [::JWT::DecodeError] - # - # source://jwt//lib/jwt/jwk/key_finder.rb#12 - def key_for(kid); end - - private - - # source://jwt//lib/jwt/jwk/key_finder.rb#53 - def find_key(kid); end - - # source://jwt//lib/jwt/jwk/key_finder.rb#38 - def jwks; end - - # source://jwt//lib/jwt/jwk/key_finder.rb#49 - def jwks_keys; end - - # source://jwt//lib/jwt/jwk/key_finder.rb#45 - def load_keys(opts = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://jwt//lib/jwt/jwk/key_finder.rb#57 - def reloadable?; end - - # source://jwt//lib/jwt/jwk/key_finder.rb#25 - def resolve_key(kid); end -end - -# source://jwt//lib/jwt/jwk/rsa.rb#5 -class JWT::JWK::RSA < ::JWT::JWK::KeyBase - # @raise [ArgumentError] - # @return [RSA] a new instance of RSA - # - # source://jwt//lib/jwt/jwk/rsa.rb#11 - def initialize(keypair, kid = T.unsafe(nil)); end - - # source://jwt//lib/jwt/jwk/rsa.rb#24 - def export(options = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://jwt//lib/jwt/jwk/rsa.rb#16 - def private?; end - - # source://jwt//lib/jwt/jwk/rsa.rb#20 - def public_key; end - - private - - # source://jwt//lib/jwt/jwk/rsa.rb#45 - def append_private_parts(the_hash); end - - # source://jwt//lib/jwt/jwk/rsa.rb#56 - def encode_open_ssl_bn(key_part); end - - # source://jwt//lib/jwt/jwk/rsa.rb#39 - def generate_kid(public_key); end - - class << self - # source://jwt//lib/jwt/jwk/rsa.rb#61 - def import(jwk_data); end - - private - - # source://jwt//lib/jwt/jwk/rsa.rb#107 - def decode_open_ssl_bn(jwk_data); end - - # source://jwt//lib/jwt/jwk/rsa.rb#71 - def jwk_attributes(jwk_data, *attributes); end - - # source://jwt//lib/jwt/jwk/rsa.rb#86 - def populate_key(rsa_key, rsa_parameters); end - - # @raise [JWT::JWKError] - # - # source://jwt//lib/jwt/jwk/rsa.rb#79 - def rsa_pkey(rsa_parameters); end - end -end - -# source://jwt//lib/jwt/jwk/rsa.rb#6 -JWT::JWK::RSA::BINARY = T.let(T.unsafe(nil), Integer) - -# source://jwt//lib/jwt/jwk/rsa.rb#7 -JWT::JWK::RSA::KTY = T.let(T.unsafe(nil), String) - -# source://jwt//lib/jwt/jwk/rsa.rb#8 -JWT::JWK::RSA::KTYS = T.let(T.unsafe(nil), Array) - -# source://jwt//lib/jwt/jwk/rsa.rb#9 -JWT::JWK::RSA::RSA_KEY_ELEMENTS = T.let(T.unsafe(nil), Array) - -# source://jwt//lib/jwt/error.rb#19 -class JWT::JWKError < ::JWT::DecodeError; end - -# source://jwt//lib/jwt/error.rb#6 -class JWT::RequiredDependencyError < ::StandardError; end - -# Collection of security methods -# -# @see: https://github.com/rails/rails/blob/master/activesupport/lib/active_support/security_utils.rb -# -# source://jwt//lib/jwt/security_utils.rb#5 -module JWT::SecurityUtils - private - - # source://jwt//lib/jwt/security_utils.rb#29 - def asn1_to_raw(signature, public_key); end - - # source://jwt//lib/jwt/security_utils.rb#34 - def raw_to_asn1(signature, private_key); end - - # source://jwt//lib/jwt/security_utils.rb#41 - def rbnacl_fixup(algorithm, key); end - - # source://jwt//lib/jwt/security_utils.rb#8 - def secure_compare(left, right); end - - # source://jwt//lib/jwt/security_utils.rb#23 - def verify_ps(algorithm, public_key, signing_input, signature); end - - # source://jwt//lib/jwt/security_utils.rb#19 - def verify_rsa(algorithm, public_key, signing_input, signature); end - - class << self - # source://jwt//lib/jwt/security_utils.rb#29 - def asn1_to_raw(signature, public_key); end - - # source://jwt//lib/jwt/security_utils.rb#34 - def raw_to_asn1(signature, private_key); end - - # source://jwt//lib/jwt/security_utils.rb#41 - def rbnacl_fixup(algorithm, key); end - - # source://jwt//lib/jwt/security_utils.rb#8 - def secure_compare(left, right); end - - # source://jwt//lib/jwt/security_utils.rb#23 - def verify_ps(algorithm, public_key, signing_input, signature); end - - # source://jwt//lib/jwt/security_utils.rb#19 - def verify_rsa(algorithm, public_key, signing_input, signature); end - end -end - -# Signature logic for JWT -# -# source://jwt//lib/jwt/signature.rb#15 -module JWT::Signature - extend ::JWT::Signature - - # source://jwt//lib/jwt/signature.rb#20 - def sign(algorithm, msg, key); end - - # source://jwt//lib/jwt/signature.rb#25 - def verify(algorithm, key, signing_input, signature); end -end - -# source://jwt//lib/jwt/signature.rb#17 -class JWT::Signature::ToSign < ::Struct - # Returns the value of attribute algorithm - # - # @return [Object] the current value of algorithm - def algorithm; end - - # Sets the attribute algorithm - # - # @param value [Object] the value to set the attribute algorithm to. - # @return [Object] the newly set value - def algorithm=(_); end - - # Returns the value of attribute key - # - # @return [Object] the current value of key - def key; end - - # Sets the attribute key - # - # @param value [Object] the value to set the attribute key to. - # @return [Object] the newly set value - def key=(_); end - - # Returns the value of attribute msg - # - # @return [Object] the current value of msg - def msg; end - - # Sets the attribute msg - # - # @param value [Object] the value to set the attribute msg to. - # @return [Object] the newly set value - def msg=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://jwt//lib/jwt/signature.rb#18 -class JWT::Signature::ToVerify < ::Struct - # Returns the value of attribute algorithm - # - # @return [Object] the current value of algorithm - def algorithm; end - - # Sets the attribute algorithm - # - # @param value [Object] the value to set the attribute algorithm to. - # @return [Object] the newly set value - def algorithm=(_); end - - # Returns the value of attribute public_key - # - # @return [Object] the current value of public_key - def public_key; end - - # Sets the attribute public_key - # - # @param value [Object] the value to set the attribute public_key to. - # @return [Object] the newly set value - def public_key=(_); end - - # Returns the value of attribute signature - # - # @return [Object] the current value of signature - def signature; end - - # Sets the attribute signature - # - # @param value [Object] the value to set the attribute signature to. - # @return [Object] the newly set value - def signature=(_); end - - # Returns the value of attribute signing_input - # - # @return [Object] the current value of signing_input - def signing_input; end - - # Sets the attribute signing_input - # - # @param value [Object] the value to set the attribute signing_input to. - # @return [Object] the newly set value - def signing_input=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# source://jwt//lib/jwt/error.rb#8 -class JWT::VerificationError < ::JWT::DecodeError; end - -# JWT verify methods -# -# source://jwt//lib/jwt/verify.rb#7 -class JWT::Verify - # @return [Verify] a new instance of Verify - # - # source://jwt//lib/jwt/verify.rb#27 - def initialize(payload, options); end - - # @raise [JWT::InvalidAudError] - # - # source://jwt//lib/jwt/verify.rb#32 - def verify_aud; end - - # @raise [JWT::ExpiredSignature] - # - # source://jwt//lib/jwt/verify.rb#39 - def verify_expiration; end - - # @raise [JWT::InvalidIatError] - # - # source://jwt//lib/jwt/verify.rb#44 - def verify_iat; end - - # @raise [JWT::InvalidIssuerError] - # - # source://jwt//lib/jwt/verify.rb#51 - def verify_iss; end - - # source://jwt//lib/jwt/verify.rb#61 - def verify_jti; end - - # @raise [JWT::ImmatureSignature] - # - # source://jwt//lib/jwt/verify.rb#73 - def verify_not_before; end - - # @raise [JWT::InvalidSubError] - # - # source://jwt//lib/jwt/verify.rb#78 - def verify_sub; end - - private - - # source://jwt//lib/jwt/verify.rb#90 - def exp_leeway; end - - # source://jwt//lib/jwt/verify.rb#86 - def global_leeway; end - - # source://jwt//lib/jwt/verify.rb#94 - def nbf_leeway; end - - class << self - # source://jwt//lib/jwt/verify.rb#14 - def verify_aud(payload, options); end - - # source://jwt//lib/jwt/verify.rb#19 - def verify_claims(payload, options); end - - # source://jwt//lib/jwt/verify.rb#14 - def verify_expiration(payload, options); end - - # source://jwt//lib/jwt/verify.rb#14 - def verify_iat(payload, options); end - - # source://jwt//lib/jwt/verify.rb#14 - def verify_iss(payload, options); end - - # source://jwt//lib/jwt/verify.rb#14 - def verify_jti(payload, options); end - - # source://jwt//lib/jwt/verify.rb#14 - def verify_not_before(payload, options); end - - # source://jwt//lib/jwt/verify.rb#14 - def verify_sub(payload, options); end - end -end - -# source://jwt//lib/jwt/verify.rb#8 -JWT::Verify::DEFAULTS = T.let(T.unsafe(nil), Hash) diff --git a/sorbet/rbi/gems/jwt@2.8.1.rbi b/sorbet/rbi/gems/jwt@2.8.1.rbi new file mode 100644 index 00000000..cb3a5518 --- /dev/null +++ b/sorbet/rbi/gems/jwt@2.8.1.rbi @@ -0,0 +1,1453 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `jwt` gem. +# Please instead update this file by running `bin/tapioca gem jwt`. + +# JSON Web Token implementation +# +# Should be up to date with the latest spec: +# https://tools.ietf.org/html/rfc7519 +# +# source://jwt//lib/jwt/version.rb#4 +module JWT + extend ::JWT::Configuration + + private + + # source://jwt//lib/jwt.rb#29 + def decode(jwt, key = T.unsafe(nil), verify = T.unsafe(nil), options = T.unsafe(nil), &keyfinder); end + + # source://jwt//lib/jwt.rb#22 + def encode(payload, key, algorithm = T.unsafe(nil), header_fields = T.unsafe(nil)); end + + class << self + # source://jwt//lib/jwt.rb#29 + def decode(jwt, key = T.unsafe(nil), verify = T.unsafe(nil), options = T.unsafe(nil), &keyfinder); end + + # source://jwt//lib/jwt.rb#22 + def encode(payload, key, algorithm = T.unsafe(nil), header_fields = T.unsafe(nil)); end + + # source://jwt//lib/jwt/version.rb#5 + def gem_version; end + + # @return [Boolean] + # + # source://jwt//lib/jwt/version.rb#24 + def openssl_3?; end + + # @return [Boolean] + # + # source://jwt//lib/jwt/version.rb#38 + def openssl_3_hmac_empty_key_regression?; end + + # source://jwt//lib/jwt/version.rb#42 + def openssl_version; end + + # @return [Boolean] + # + # source://jwt//lib/jwt/version.rb#30 + def rbnacl?; end + + # @return [Boolean] + # + # source://jwt//lib/jwt/version.rb#34 + def rbnacl_6_or_greater?; end + end +end + +# Base64 encoding and decoding +# +# source://jwt//lib/jwt/base64.rb#7 +class JWT::Base64 + class << self + # source://jwt//lib/jwt/base64.rb#27 + def loose_urlsafe_decode64(str); end + + # Decode a string with URL-safe Base64 complying with RFC 4648. + # Deprecated support for RFC 2045 remains for now. ("All line breaks or other characters not found in Table 1 must be ignored by decoding software") + # + # source://jwt//lib/jwt/base64.rb#16 + def url_decode(str); end + + # Encode a string with URL-safe Base64 complying with RFC 4648 (not padded). + # + # source://jwt//lib/jwt/base64.rb#10 + def url_encode(str); end + end +end + +# source://jwt//lib/jwt/error.rb#20 +class JWT::Base64DecodeError < ::JWT::DecodeError; end + +# source://jwt//lib/jwt/claims_validator.rb#6 +class JWT::ClaimsValidator + # @return [ClaimsValidator] a new instance of ClaimsValidator + # + # source://jwt//lib/jwt/claims_validator.rb#13 + def initialize(payload); end + + # source://jwt//lib/jwt/claims_validator.rb#17 + def validate!; end + + private + + # @raise [InvalidPayload] + # + # source://jwt//lib/jwt/claims_validator.rb#31 + def validate_is_numeric(claim); end + + # source://jwt//lib/jwt/claims_validator.rb#25 + def validate_numeric_claims; end +end + +# source://jwt//lib/jwt/claims_validator.rb#7 +JWT::ClaimsValidator::NUMERIC_CLAIMS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/configuration/decode_configuration.rb#4 +module JWT::Configuration + # source://jwt//lib/jwt/configuration.rb#11 + def configuration; end + + # @yield [configuration] + # + # source://jwt//lib/jwt/configuration.rb#7 + def configure; end +end + +# source://jwt//lib/jwt/configuration/container.rb#8 +class JWT::Configuration::Container + # @return [Container] a new instance of Container + # + # source://jwt//lib/jwt/configuration/container.rb#12 + def initialize; end + + # Returns the value of attribute decode. + # + # source://jwt//lib/jwt/configuration/container.rb#9 + def decode; end + + # Sets the attribute decode + # + # @param value the value to set the attribute decode to. + # + # source://jwt//lib/jwt/configuration/container.rb#9 + def decode=(_arg0); end + + # Returns the value of attribute deprecation_warnings. + # + # source://jwt//lib/jwt/configuration/container.rb#10 + def deprecation_warnings; end + + # @raise [ArgumentError] + # + # source://jwt//lib/jwt/configuration/container.rb#25 + def deprecation_warnings=(value); end + + # Returns the value of attribute jwk. + # + # source://jwt//lib/jwt/configuration/container.rb#9 + def jwk; end + + # Sets the attribute jwk + # + # @param value the value to set the attribute jwk to. + # + # source://jwt//lib/jwt/configuration/container.rb#9 + def jwk=(_arg0); end + + # source://jwt//lib/jwt/configuration/container.rb#16 + def reset!; end + + # Returns the value of attribute strict_base64_decoding. + # + # source://jwt//lib/jwt/configuration/container.rb#9 + def strict_base64_decoding; end + + # Sets the attribute strict_base64_decoding + # + # @param value the value to set the attribute strict_base64_decoding to. + # + # source://jwt//lib/jwt/configuration/container.rb#9 + def strict_base64_decoding=(_arg0); end +end + +# source://jwt//lib/jwt/configuration/container.rb#24 +JWT::Configuration::Container::DEPRECATION_WARNINGS_VALUES = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/configuration/decode_configuration.rb#5 +class JWT::Configuration::DecodeConfiguration + # @return [DecodeConfiguration] a new instance of DecodeConfiguration + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#17 + def initialize; end + + # Returns the value of attribute algorithms. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def algorithms; end + + # Sets the attribute algorithms + # + # @param value the value to set the attribute algorithms to. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def algorithms=(_arg0); end + + # Returns the value of attribute leeway. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def leeway; end + + # Sets the attribute leeway + # + # @param value the value to set the attribute leeway to. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def leeway=(_arg0); end + + # Returns the value of attribute required_claims. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def required_claims; end + + # Sets the attribute required_claims + # + # @param value the value to set the attribute required_claims to. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def required_claims=(_arg0); end + + # source://jwt//lib/jwt/configuration/decode_configuration.rb#30 + def to_h; end + + # Returns the value of attribute verify_aud. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_aud; end + + # Sets the attribute verify_aud + # + # @param value the value to set the attribute verify_aud to. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_aud=(_arg0); end + + # Returns the value of attribute verify_expiration. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_expiration; end + + # Sets the attribute verify_expiration + # + # @param value the value to set the attribute verify_expiration to. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_expiration=(_arg0); end + + # Returns the value of attribute verify_iat. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_iat; end + + # Sets the attribute verify_iat + # + # @param value the value to set the attribute verify_iat to. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_iat=(_arg0); end + + # Returns the value of attribute verify_iss. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_iss; end + + # Sets the attribute verify_iss + # + # @param value the value to set the attribute verify_iss to. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_iss=(_arg0); end + + # Returns the value of attribute verify_jti. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_jti; end + + # Sets the attribute verify_jti + # + # @param value the value to set the attribute verify_jti to. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_jti=(_arg0); end + + # Returns the value of attribute verify_not_before. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_not_before; end + + # Sets the attribute verify_not_before + # + # @param value the value to set the attribute verify_not_before to. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_not_before=(_arg0); end + + # Returns the value of attribute verify_sub. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_sub; end + + # Sets the attribute verify_sub + # + # @param value the value to set the attribute verify_sub to. + # + # source://jwt//lib/jwt/configuration/decode_configuration.rb#6 + def verify_sub=(_arg0); end +end + +# source://jwt//lib/jwt/configuration/jwk_configuration.rb#8 +class JWT::Configuration::JwkConfiguration + # @return [JwkConfiguration] a new instance of JwkConfiguration + # + # source://jwt//lib/jwt/configuration/jwk_configuration.rb#9 + def initialize; end + + # Returns the value of attribute kid_generator. + # + # source://jwt//lib/jwt/configuration/jwk_configuration.rb#24 + def kid_generator; end + + # Sets the attribute kid_generator + # + # @param value the value to set the attribute kid_generator to. + # + # source://jwt//lib/jwt/configuration/jwk_configuration.rb#24 + def kid_generator=(_arg0); end + + # source://jwt//lib/jwt/configuration/jwk_configuration.rb#13 + def kid_generator_type=(value); end +end + +# Decoding logic for JWT +# +# source://jwt//lib/jwt/decode.rb#11 +class JWT::Decode + # @raise [JWT::DecodeError] + # @return [Decode] a new instance of Decode + # + # source://jwt//lib/jwt/decode.rb#12 + def initialize(jwt, key, verify, options, &keyfinder); end + + # @raise [JWT::DecodeError] + # + # source://jwt//lib/jwt/decode.rb#24 + def decode_segments; end + + private + + # source://jwt//lib/jwt/decode.rb#140 + def alg_in_header; end + + # source://jwt//lib/jwt/decode.rb#90 + def allowed_algorithms; end + + # source://jwt//lib/jwt/decode.rb#72 + def allowed_and_valid_algorithms; end + + # source://jwt//lib/jwt/decode.rb#136 + def decode_signature; end + + # @raise [JWT::DecodeError] + # + # source://jwt//lib/jwt/decode.rb#107 + def find_key(&keyfinder); end + + # source://jwt//lib/jwt/decode.rb#82 + def given_algorithms; end + + # source://jwt//lib/jwt/decode.rb#144 + def header; end + + # @return [Boolean] + # + # source://jwt//lib/jwt/decode.rb#132 + def none_algorithm?; end + + # source://jwt//lib/jwt/decode.rb#156 + def parse_and_decode(segment); end + + # source://jwt//lib/jwt/decode.rb#148 + def payload; end + + # source://jwt//lib/jwt/decode.rb#94 + def resolve_allowed_algorithms; end + + # source://jwt//lib/jwt/decode.rb#128 + def segment_length; end + + # source://jwt//lib/jwt/decode.rb#58 + def set_key; end + + # source://jwt//lib/jwt/decode.rb#152 + def signing_input; end + + # Move algorithms matching the JWT alg header to the beginning of the list + # + # source://jwt//lib/jwt/decode.rb#101 + def sort_by_alg_header(algs); end + + # @raise [JWT::DecodeError] + # + # source://jwt//lib/jwt/decode.rb#120 + def validate_segment_count!; end + + # @raise [JWT::IncorrectAlgorithm] + # + # source://jwt//lib/jwt/decode.rb#52 + def verify_algo; end + + # source://jwt//lib/jwt/decode.rb#115 + def verify_claims; end + + # @raise [JWT::DecodeError] + # + # source://jwt//lib/jwt/decode.rb#40 + def verify_signature; end + + # @return [Boolean] + # + # source://jwt//lib/jwt/decode.rb#66 + def verify_signature_for?(key); end +end + +# Order is very important - first check for string keys, next for symbols +# +# source://jwt//lib/jwt/decode.rb#77 +JWT::Decode::ALGORITHM_KEYS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/error.rb#5 +class JWT::DecodeError < ::StandardError; end + +# Deprecations module to handle deprecation warnings in the gem +# +# source://jwt//lib/jwt/deprecations.rb#5 +module JWT::Deprecations + class << self + # source://jwt//lib/jwt/deprecations.rb#7 + def warning(message); end + + private + + # source://jwt//lib/jwt/deprecations.rb#20 + def record_warned(message); end + end +end + +# Encoding logic for JWT +# +# source://jwt//lib/jwt/encode.rb#9 +class JWT::Encode + # @return [Encode] a new instance of Encode + # + # source://jwt//lib/jwt/encode.rb#12 + def initialize(options); end + + # source://jwt//lib/jwt/encode.rb#20 + def segments; end + + private + + # source://jwt//lib/jwt/encode.rb#69 + def combine(*parts); end + + # source://jwt//lib/jwt/encode.rb#65 + def encode_data(data); end + + # source://jwt//lib/jwt/encode.rb#43 + def encode_header; end + + # source://jwt//lib/jwt/encode.rb#47 + def encode_payload; end + + # source://jwt//lib/jwt/encode.rb#61 + def encode_signature; end + + # source://jwt//lib/jwt/encode.rb#27 + def encoded_header; end + + # source://jwt//lib/jwt/encode.rb#39 + def encoded_header_and_payload; end + + # source://jwt//lib/jwt/encode.rb#31 + def encoded_payload; end + + # source://jwt//lib/jwt/encode.rb#35 + def encoded_signature; end + + # source://jwt//lib/jwt/encode.rb#51 + def signature; end + + # source://jwt//lib/jwt/encode.rb#55 + def validate_claims!; end +end + +# source://jwt//lib/jwt/encode.rb#10 +JWT::Encode::ALG_KEY = T.let(T.unsafe(nil), String) + +# source://jwt//lib/jwt/error.rb#4 +class JWT::EncodeError < ::StandardError; end + +# source://jwt//lib/jwt/error.rb#9 +class JWT::ExpiredSignature < ::JWT::DecodeError; end + +# source://jwt//lib/jwt/error.rb#11 +class JWT::ImmatureSignature < ::JWT::DecodeError; end + +# source://jwt//lib/jwt/error.rb#10 +class JWT::IncorrectAlgorithm < ::JWT::DecodeError; end + +# source://jwt//lib/jwt/error.rb#15 +class JWT::InvalidAudError < ::JWT::DecodeError; end + +# source://jwt//lib/jwt/error.rb#14 +class JWT::InvalidIatError < ::JWT::DecodeError; end + +# source://jwt//lib/jwt/error.rb#12 +class JWT::InvalidIssuerError < ::JWT::DecodeError; end + +# source://jwt//lib/jwt/error.rb#17 +class JWT::InvalidJtiError < ::JWT::DecodeError; end + +# source://jwt//lib/jwt/error.rb#18 +class JWT::InvalidPayload < ::JWT::DecodeError; end + +# source://jwt//lib/jwt/error.rb#16 +class JWT::InvalidSubError < ::JWT::DecodeError; end + +# JSON wrapper +# +# source://jwt//lib/jwt/json.rb#7 +class JWT::JSON + class << self + # source://jwt//lib/jwt/json.rb#9 + def generate(data); end + + # source://jwt//lib/jwt/json.rb#13 + def parse(data); end + end +end + +# source://jwt//lib/jwt/jwa/hmac.rb#4 +module JWT::JWA + class << self + # source://jwt//lib/jwt/jwa.rb#37 + def create(algorithm); end + + # source://jwt//lib/jwt/jwa.rb#33 + def find(algorithm); end + + # @return [Boolean] + # + # source://jwt//lib/jwt/jwa.rb#43 + def implementation?(algorithm); end + + private + + # source://jwt//lib/jwt/jwa.rb#50 + def indexed; end + end +end + +# source://jwt//lib/jwt/jwa.rb#22 +JWT::JWA::ALGOS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwa/ecdsa.rb#5 +module JWT::JWA::Ecdsa + private + + # source://jwt//lib/jwt/jwa/ecdsa.rb#70 + def asn1_to_raw(signature, public_key); end + + # source://jwt//lib/jwt/jwa/ecdsa.rb#57 + def curve_by_name(name); end + + # source://jwt//lib/jwt/jwa/ecdsa.rb#63 + def raw_to_asn1(signature, private_key); end + + # source://jwt//lib/jwt/jwa/ecdsa.rb#33 + def sign(algorithm, msg, key); end + + # source://jwt//lib/jwt/jwa/ecdsa.rb#44 + def verify(algorithm, public_key, signing_input, signature); end + + class << self + # source://jwt//lib/jwt/jwa/ecdsa.rb#70 + def asn1_to_raw(signature, public_key); end + + # source://jwt//lib/jwt/jwa/ecdsa.rb#57 + def curve_by_name(name); end + + # source://jwt//lib/jwt/jwa/ecdsa.rb#63 + def raw_to_asn1(signature, private_key); end + + # source://jwt//lib/jwt/jwa/ecdsa.rb#33 + def sign(algorithm, msg, key); end + + # source://jwt//lib/jwt/jwa/ecdsa.rb#44 + def verify(algorithm, public_key, signing_input, signature); end + end +end + +# source://jwt//lib/jwt/jwa/ecdsa.rb#8 +JWT::JWA::Ecdsa::NAMED_CURVES = T.let(T.unsafe(nil), Hash) + +# source://jwt//lib/jwt/jwa/ecdsa.rb#31 +JWT::JWA::Ecdsa::SUPPORTED = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwa/eddsa.rb#5 +module JWT::JWA::Eddsa + class << self + # source://jwt//lib/jwt/jwa/eddsa.rb#10 + def sign(algorithm, msg, key); end + + # source://jwt//lib/jwt/jwa/eddsa.rb#20 + def verify(algorithm, public_key, signing_input, signature); end + + private + + # @raise [IncorrectAlgorithm] + # + # source://jwt//lib/jwt/jwa/eddsa.rb#34 + def validate_algorithm!(algorithm); end + end +end + +# source://jwt//lib/jwt/jwa/eddsa.rb#6 +JWT::JWA::Eddsa::SUPPORTED = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwa/eddsa.rb#7 +JWT::JWA::Eddsa::SUPPORTED_DOWNCASED = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwa/hmac.rb#5 +module JWT::JWA::Hmac + private + + # source://jwt//lib/jwt/jwa/hmac.rb#16 + def sign(algorithm, msg, key); end + + # source://jwt//lib/jwt/jwa/hmac.rb#30 + def verify(algorithm, key, signing_input, signature); end + + class << self + # source://jwt//lib/jwt/jwa/hmac.rb#16 + def sign(algorithm, msg, key); end + + # source://jwt//lib/jwt/jwa/hmac.rb#30 + def verify(algorithm, key, signing_input, signature); end + end +end + +# source://jwt//lib/jwt/jwa/hmac.rb#8 +JWT::JWA::Hmac::MAPPING = T.let(T.unsafe(nil), Hash) + +# source://jwt//lib/jwt/jwa/hmac.rb#14 +JWT::JWA::Hmac::SUPPORTED = T.let(T.unsafe(nil), Array) + +# Copy of https://github.com/rails/rails/blob/v7.0.3.1/activesupport/lib/active_support/security_utils.rb +# +# source://jwt//lib/jwt/jwa/hmac.rb#36 +module JWT::JWA::Hmac::SecurityUtils + private + + # :nocov: + # + # @raise [ArgumentError] + # + # source://jwt//lib/jwt/jwa/hmac.rb#43 + def fixed_length_secure_compare(a, b); end + + # Secure string comparison for strings of variable length. + # + # While a timing attack would not be able to discern the content of + # a secret compared via secure_compare, it is possible to determine + # the secret length. This should be considered when using secure_compare + # to compare weak, short secrets to user input. + # + # source://jwt//lib/jwt/jwa/hmac.rb#67 + def secure_compare(a, b); end + + class << self + # :nocov: + # + # @raise [ArgumentError] + # + # source://jwt//lib/jwt/jwa/hmac.rb#43 + def fixed_length_secure_compare(a, b); end + + # Secure string comparison for strings of variable length. + # + # While a timing attack would not be able to discern the content of + # a secret compared via secure_compare, it is possible to determine + # the secret length. This should be considered when using secure_compare + # to compare weak, short secrets to user input. + # + # source://jwt//lib/jwt/jwa/hmac.rb#67 + def secure_compare(a, b); end + end +end + +# source://jwt//lib/jwt/jwa/none.rb#5 +module JWT::JWA::None + private + + # source://jwt//lib/jwt/jwa/none.rb#10 + def sign(*_arg0); end + + # source://jwt//lib/jwt/jwa/none.rb#14 + def verify(*_arg0); end + + class << self + # source://jwt//lib/jwt/jwa/none.rb#10 + def sign(*_arg0); end + + # source://jwt//lib/jwt/jwa/none.rb#14 + def verify(*_arg0); end + end +end + +# source://jwt//lib/jwt/jwa/none.rb#8 +JWT::JWA::None::SUPPORTED = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwa/ps.rb#5 +module JWT::JWA::Ps + private + + # source://jwt//lib/jwt/jwa/ps.rb#12 + def sign(algorithm, msg, key); end + + # source://jwt//lib/jwt/jwa/ps.rb#22 + def verify(algorithm, public_key, signing_input, signature); end + + class << self + # source://jwt//lib/jwt/jwa/ps.rb#12 + def sign(algorithm, msg, key); end + + # source://jwt//lib/jwt/jwa/ps.rb#22 + def verify(algorithm, public_key, signing_input, signature); end + end +end + +# source://jwt//lib/jwt/jwa/ps.rb#10 +JWT::JWA::Ps::SUPPORTED = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwa/rsa.rb#5 +module JWT::JWA::Rsa + private + + # source://jwt//lib/jwt/jwa/rsa.rb#10 + def sign(algorithm, msg, key); end + + # source://jwt//lib/jwt/jwa/rsa.rb#18 + def verify(algorithm, public_key, signing_input, signature); end + + class << self + # source://jwt//lib/jwt/jwa/rsa.rb#10 + def sign(algorithm, msg, key); end + + # source://jwt//lib/jwt/jwa/rsa.rb#18 + def verify(algorithm, public_key, signing_input, signature); end + end +end + +# source://jwt//lib/jwt/jwa/rsa.rb#8 +JWT::JWA::Rsa::SUPPORTED = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwa/unsupported.rb#5 +module JWT::JWA::Unsupported + private + + # source://jwt//lib/jwt/jwa/unsupported.rb#10 + def sign(*_arg0); end + + # source://jwt//lib/jwt/jwa/unsupported.rb#14 + def verify(*_arg0); end + + class << self + # @raise [NotImplementedError] + # + # source://jwt//lib/jwt/jwa/unsupported.rb#10 + def sign(*_arg0); end + + # @raise [JWT::VerificationError] + # + # source://jwt//lib/jwt/jwa/unsupported.rb#14 + def verify(*_arg0); end + end +end + +# source://jwt//lib/jwt/jwa/unsupported.rb#8 +JWT::JWA::Unsupported::SUPPORTED = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwa/wrapper.rb#5 +class JWT::JWA::Wrapper + # @return [Wrapper] a new instance of Wrapper + # + # source://jwt//lib/jwt/jwa/wrapper.rb#8 + def initialize(alg, cls); end + + # Returns the value of attribute alg. + # + # source://jwt//lib/jwt/jwa/wrapper.rb#6 + def alg; end + + # Returns the value of attribute cls. + # + # source://jwt//lib/jwt/jwa/wrapper.rb#6 + def cls; end + + # source://jwt//lib/jwt/jwa/wrapper.rb#17 + def sign(data:, signing_key:); end + + # @return [Boolean] + # + # source://jwt//lib/jwt/jwa/wrapper.rb#13 + def valid_alg?(alg_to_check); end + + # source://jwt//lib/jwt/jwa/wrapper.rb#21 + def verify(data:, signature:, verification_key:); end +end + +# source://jwt//lib/jwt/jwk/kid_as_key_digest.rb#4 +module JWT::JWK + class << self + # source://jwt//lib/jwt/jwk.rb#24 + def classes; end + + # source://jwt//lib/jwt/jwk.rb#9 + def create_from(key, params = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://jwt//lib/jwt/jwk.rb#9 + def import(key, params = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://jwt//lib/jwt/jwk.rb#9 + def new(key, params = T.unsafe(nil), options = T.unsafe(nil)); end + + private + + # source://jwt//lib/jwt/jwk.rb#38 + def generate_mappings; end + + # source://jwt//lib/jwt/jwk.rb#34 + def mappings; end + end +end + +# source://jwt//lib/jwt/jwk/ec.rb#7 +class JWT::JWK::EC < ::JWT::JWK::KeyBase + # @return [EC] a new instance of EC + # + # source://jwt//lib/jwt/jwk/ec.rb#16 + def initialize(key, params = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://jwt//lib/jwt/jwk/ec.rb#67 + def []=(key, value); end + + # source://jwt//lib/jwt/jwk/ec.rb#54 + def export(options = T.unsafe(nil)); end + + # source://jwt//lib/jwt/jwk/ec.rb#60 + def key_digest; end + + # source://jwt//lib/jwt/jwk/ec.rb#30 + def keypair; end + + # source://jwt//lib/jwt/jwk/ec.rb#50 + def members; end + + # @return [Boolean] + # + # source://jwt//lib/jwt/jwk/ec.rb#34 + def private?; end + + # source://jwt//lib/jwt/jwk/ec.rb#46 + def public_key; end + + # source://jwt//lib/jwt/jwk/ec.rb#38 + def signing_key; end + + # source://jwt//lib/jwt/jwk/ec.rb#42 + def verify_key; end + + private + + # @raise [ArgumentError] + # + # source://jwt//lib/jwt/jwk/ec.rb#95 + def check_jwk_params!(key_params, params); end + + # source://jwt//lib/jwt/jwk/ec.rb#145 + def create_ec_key(jwk_crv, jwk_x, jwk_y, jwk_d); end + + # source://jwt//lib/jwt/jwk/ec.rb#208 + def decode_octets(base64_encoded_coordinate); end + + # source://jwt//lib/jwt/jwk/ec.rb#77 + def ec_key; end + + # source://jwt//lib/jwt/jwk/ec.rb#122 + def encode_octets(octets); end + + # source://jwt//lib/jwt/jwk/ec.rb#128 + def encode_open_ssl_bn(key_part); end + + # source://jwt//lib/jwt/jwk/ec.rb#81 + def extract_key_params(key); end + + # source://jwt//lib/jwt/jwk/ec.rb#101 + def keypair_components(ec_keypair); end + + # source://jwt//lib/jwt/jwk/ec.rb#132 + def parse_ec_key(key); end + + class << self + # source://jwt//lib/jwt/jwk/ec.rb#232 + def import(jwk_data); end + + # source://jwt//lib/jwt/jwk/ec.rb#236 + def to_openssl_curve(crv); end + end +end + +# source://jwt//lib/jwt/jwk/ec.rb#10 +JWT::JWK::EC::BINARY = T.let(T.unsafe(nil), Integer) + +# source://jwt//lib/jwt/jwk/ec.rb#13 +JWT::JWK::EC::EC_KEY_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwk/ec.rb#12 +JWT::JWK::EC::EC_PRIVATE_KEY_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwk/ec.rb#11 +JWT::JWK::EC::EC_PUBLIC_KEY_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwk/ec.rb#8 +JWT::JWK::EC::KTY = T.let(T.unsafe(nil), String) + +# source://jwt//lib/jwt/jwk/ec.rb#9 +JWT::JWK::EC::KTYS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwk/ec.rb#14 +JWT::JWK::EC::ZERO_BYTE = T.let(T.unsafe(nil), String) + +# source://jwt//lib/jwt/jwk/hmac.rb#5 +class JWT::JWK::HMAC < ::JWT::JWK::KeyBase + # @return [HMAC] a new instance of HMAC + # + # source://jwt//lib/jwt/jwk/hmac.rb#12 + def initialize(key, params = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://jwt//lib/jwt/jwk/hmac.rb#63 + def []=(key, value); end + + # See https://tools.ietf.org/html/rfc7517#appendix-A.3 + # + # source://jwt//lib/jwt/jwk/hmac.rb#47 + def export(options = T.unsafe(nil)); end + + # source://jwt//lib/jwt/jwk/hmac.rb#57 + def key_digest; end + + # source://jwt//lib/jwt/jwk/hmac.rb#26 + def keypair; end + + # source://jwt//lib/jwt/jwk/hmac.rb#53 + def members; end + + # @return [Boolean] + # + # source://jwt//lib/jwt/jwk/hmac.rb#30 + def private?; end + + # source://jwt//lib/jwt/jwk/hmac.rb#34 + def public_key; end + + # source://jwt//lib/jwt/jwk/hmac.rb#42 + def signing_key; end + + # source://jwt//lib/jwt/jwk/hmac.rb#38 + def verify_key; end + + private + + # @raise [ArgumentError] + # + # source://jwt//lib/jwt/jwk/hmac.rb#90 + def check_jwk(keypair, params); end + + # source://jwt//lib/jwt/jwk/hmac.rb#77 + def extract_key_params(key); end + + # source://jwt//lib/jwt/jwk/hmac.rb#73 + def secret; end + + class << self + # source://jwt//lib/jwt/jwk/hmac.rb#97 + def import(jwk_data); end + end +end + +# source://jwt//lib/jwt/jwk/hmac.rb#10 +JWT::JWK::HMAC::HMAC_KEY_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwk/hmac.rb#9 +JWT::JWK::HMAC::HMAC_PRIVATE_KEY_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwk/hmac.rb#8 +JWT::JWK::HMAC::HMAC_PUBLIC_KEY_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwk/hmac.rb#6 +JWT::JWK::HMAC::KTY = T.let(T.unsafe(nil), String) + +# source://jwt//lib/jwt/jwk/hmac.rb#7 +JWT::JWK::HMAC::KTYS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwk/key_base.rb#5 +class JWT::JWK::KeyBase + # @return [KeyBase] a new instance of KeyBase + # + # source://jwt//lib/jwt/jwk/key_base.rb#11 + def initialize(options, params = T.unsafe(nil)); end + + # source://jwt//lib/jwt/jwk/key_base.rb#46 + def <=>(other); end + + # source://jwt//lib/jwt/jwk/key_base.rb#40 + def ==(other); end + + # source://jwt//lib/jwt/jwk/key_base.rb#32 + def [](key); end + + # source://jwt//lib/jwt/jwk/key_base.rb#36 + def []=(key, value); end + + # source://jwt//lib/jwt/jwk/key_base.rb#40 + def eql?(other); end + + # source://jwt//lib/jwt/jwk/key_base.rb#28 + def hash; end + + # source://jwt//lib/jwt/jwk/key_base.rb#24 + def kid; end + + private + + # Returns the value of attribute parameters. + # + # source://jwt//lib/jwt/jwk/key_base.rb#54 + def parameters; end + + class << self + # @private + # + # source://jwt//lib/jwt/jwk/key_base.rb#6 + def inherited(klass); end + end +end + +# source://jwt//lib/jwt/jwk/key_finder.rb#5 +class JWT::JWK::KeyFinder + # @return [KeyFinder] a new instance of KeyFinder + # + # source://jwt//lib/jwt/jwk/key_finder.rb#6 + def initialize(options); end + + # @raise [::JWT::DecodeError] + # + # source://jwt//lib/jwt/jwk/key_finder.rb#17 + def key_for(kid); end + + private + + # source://jwt//lib/jwt/jwk/key_finder.rb#31 + def resolve_key(kid); end +end + +# source://jwt//lib/jwt/jwk/kid_as_key_digest.rb#5 +class JWT::JWK::KidAsKeyDigest + # @return [KidAsKeyDigest] a new instance of KidAsKeyDigest + # + # source://jwt//lib/jwt/jwk/kid_as_key_digest.rb#6 + def initialize(jwk); end + + # source://jwt//lib/jwt/jwk/kid_as_key_digest.rb#10 + def generate; end +end + +# source://jwt//lib/jwt/jwk/rsa.rb#5 +class JWT::JWK::RSA < ::JWT::JWK::KeyBase + # @return [RSA] a new instance of RSA + # + # source://jwt//lib/jwt/jwk/rsa.rb#16 + def initialize(key, params = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://jwt//lib/jwt/jwk/rsa.rb#66 + def []=(key, value); end + + # source://jwt//lib/jwt/jwk/rsa.rb#50 + def export(options = T.unsafe(nil)); end + + # source://jwt//lib/jwt/jwk/rsa.rb#60 + def key_digest; end + + # source://jwt//lib/jwt/jwk/rsa.rb#30 + def keypair; end + + # source://jwt//lib/jwt/jwk/rsa.rb#56 + def members; end + + # @return [Boolean] + # + # source://jwt//lib/jwt/jwk/rsa.rb#34 + def private?; end + + # source://jwt//lib/jwt/jwk/rsa.rb#38 + def public_key; end + + # source://jwt//lib/jwt/jwk/rsa.rb#42 + def signing_key; end + + # source://jwt//lib/jwt/jwk/rsa.rb#46 + def verify_key; end + + private + + # @raise [ArgumentError] + # + # source://jwt//lib/jwt/jwk/rsa.rb#94 + def check_jwk_params!(key_params, params); end + + # source://jwt//lib/jwt/jwk/rsa.rb#126 + def decode_open_ssl_bn(jwk_data); end + + # source://jwt//lib/jwt/jwk/rsa.rb#120 + def encode_open_ssl_bn(key_part); end + + # source://jwt//lib/jwt/jwk/rsa.rb#80 + def extract_key_params(key); end + + # source://jwt//lib/jwt/jwk/rsa.rb#114 + def jwk_attributes(*attributes); end + + # source://jwt//lib/jwt/jwk/rsa.rb#100 + def parse_rsa_key(key); end + + # source://jwt//lib/jwt/jwk/rsa.rb#76 + def rsa_key; end + + class << self + # source://jwt//lib/jwt/jwk/rsa.rb#141 + def create_rsa_key(rsa_parameters); end + + # source://jwt//lib/jwt/jwk/rsa.rb#169 + def create_rsa_key_using_accessors(rsa_parameters); end + + # source://jwt//lib/jwt/jwk/rsa.rb#141 + def create_rsa_key_using_der(rsa_parameters); end + + # source://jwt//lib/jwt/jwk/rsa.rb#159 + def create_rsa_key_using_sets(rsa_parameters); end + + # source://jwt//lib/jwt/jwk/rsa.rb#135 + def decode_open_ssl_bn(jwk_data); end + + # source://jwt//lib/jwt/jwk/rsa.rb#131 + def import(jwk_data); end + + # @raise [JWT::JWKError] + # + # source://jwt//lib/jwt/jwk/rsa.rb#184 + def validate_rsa_parameters!(rsa_parameters); end + end +end + +# source://jwt//lib/jwt/jwk/rsa.rb#6 +JWT::JWK::RSA::BINARY = T.let(T.unsafe(nil), Integer) + +# source://jwt//lib/jwt/jwk/rsa.rb#7 +JWT::JWK::RSA::KTY = T.let(T.unsafe(nil), String) + +# source://jwt//lib/jwt/jwk/rsa.rb#8 +JWT::JWK::RSA::KTYS = T.let(T.unsafe(nil), Array) + +# https://www.rfc-editor.org/rfc/rfc3447#appendix-A.1.2 +# +# source://jwt//lib/jwt/jwk/rsa.rb#14 +JWT::JWK::RSA::RSA_ASN1_SEQUENCE = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwk/rsa.rb#11 +JWT::JWK::RSA::RSA_KEY_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwk/rsa.rb#13 +JWT::JWK::RSA::RSA_OPT_PARAMS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwk/rsa.rb#10 +JWT::JWK::RSA::RSA_PRIVATE_KEY_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwk/rsa.rb#9 +JWT::JWK::RSA::RSA_PUBLIC_KEY_ELEMENTS = T.let(T.unsafe(nil), Array) + +# source://jwt//lib/jwt/jwk/set.rb#7 +class JWT::JWK::Set + include ::Enumerable + extend ::Forwardable + + # @return [Set] a new instance of Set + # + # source://jwt//lib/jwt/jwk/set.rb#13 + def initialize(jwks = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://jwt//lib/jwt/jwk/set.rb#58 + def +(enum); end + + # source://jwt//lib/jwt/jwk/set.rb#62 + def <<(key); end + + # source://jwt//lib/jwt/jwk/set.rb#67 + def ==(other); end + + # source://jwt//lib/jwt/jwk/set.rb#62 + def add(key); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def delete(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def dig(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def each(*args, **_arg1, &block); end + + # source://jwt//lib/jwt/jwk/set.rb#67 + def eql?(other); end + + # source://jwt//lib/jwt/jwk/set.rb#31 + def export(options = T.unsafe(nil)); end + + # source://jwt//lib/jwt/jwk/set.rb#37 + def filter!(&block); end + + # Returns the value of attribute keys. + # + # source://jwt//lib/jwt/jwk/set.rb#11 + def keys; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def length(*args, **_arg1, &block); end + + # source://jwt//lib/jwt/jwk/set.rb#53 + def merge(enum); end + + # source://jwt//lib/jwt/jwk/set.rb#43 + def reject!(&block); end + + # source://jwt//lib/jwt/jwk/set.rb#37 + def select!(&block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def size(*args, **_arg1, &block); end + + # source://jwt//lib/jwt/jwk/set.rb#58 + def union(enum); end + + # source://jwt//lib/jwt/jwk/set.rb#49 + def uniq!(&block); end + + # For symbolic manipulation + # + # source://jwt//lib/jwt/jwk/set.rb#58 + def |(enum); end +end + +# https://tools.ietf.org/html/rfc7638 +# +# source://jwt//lib/jwt/jwk/thumbprint.rb#6 +class JWT::JWK::Thumbprint + # @return [Thumbprint] a new instance of Thumbprint + # + # source://jwt//lib/jwt/jwk/thumbprint.rb#9 + def initialize(jwk); end + + # source://jwt//lib/jwt/jwk/thumbprint.rb#13 + def generate; end + + # Returns the value of attribute jwk. + # + # source://jwt//lib/jwt/jwk/thumbprint.rb#7 + def jwk; end + + # source://jwt//lib/jwt/jwk/thumbprint.rb#13 + def to_s; end +end + +# source://jwt//lib/jwt/error.rb#22 +class JWT::JWKError < ::JWT::DecodeError; end + +# source://jwt//lib/jwt/error.rb#19 +class JWT::MissingRequiredClaim < ::JWT::DecodeError; end + +# source://jwt//lib/jwt/error.rb#6 +class JWT::RequiredDependencyError < ::StandardError; end + +# source://jwt//lib/jwt/error.rb#13 +class JWT::UnsupportedEcdsaCurve < ::JWT::IncorrectAlgorithm; end + +# Moments version builder module +# +# source://jwt//lib/jwt/version.rb#10 +module JWT::VERSION; end + +# major version +# +# source://jwt//lib/jwt/version.rb#12 +JWT::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) + +# minor version +# +# source://jwt//lib/jwt/version.rb#14 +JWT::VERSION::MINOR = T.let(T.unsafe(nil), Integer) + +# alpha, beta, etc. tag +# +# source://jwt//lib/jwt/version.rb#18 +JWT::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) + +# Build version string +# +# source://jwt//lib/jwt/version.rb#21 +JWT::VERSION::STRING = T.let(T.unsafe(nil), String) + +# tiny version +# +# source://jwt//lib/jwt/version.rb#16 +JWT::VERSION::TINY = T.let(T.unsafe(nil), Integer) + +# source://jwt//lib/jwt/error.rb#8 +class JWT::VerificationError < ::JWT::DecodeError; end + +# JWT verify methods +# +# source://jwt//lib/jwt/verify.rb#7 +class JWT::Verify + # @return [Verify] a new instance of Verify + # + # source://jwt//lib/jwt/verify.rb#28 + def initialize(payload, options); end + + # @raise [JWT::InvalidAudError] + # + # source://jwt//lib/jwt/verify.rb#33 + def verify_aud; end + + # @raise [JWT::ExpiredSignature] + # + # source://jwt//lib/jwt/verify.rb#40 + def verify_expiration; end + + # @raise [JWT::InvalidIatError] + # + # source://jwt//lib/jwt/verify.rb#45 + def verify_iat; end + + # source://jwt//lib/jwt/verify.rb#52 + def verify_iss; end + + # source://jwt//lib/jwt/verify.rb#67 + def verify_jti; end + + # @raise [JWT::ImmatureSignature] + # + # source://jwt//lib/jwt/verify.rb#79 + def verify_not_before; end + + # source://jwt//lib/jwt/verify.rb#91 + def verify_required_claims; end + + # @raise [JWT::InvalidSubError] + # + # source://jwt//lib/jwt/verify.rb#84 + def verify_sub; end + + private + + # @return [Boolean] + # + # source://jwt//lib/jwt/verify.rb#113 + def contains_key?(payload, key); end + + # source://jwt//lib/jwt/verify.rb#105 + def exp_leeway; end + + # source://jwt//lib/jwt/verify.rb#101 + def global_leeway; end + + # source://jwt//lib/jwt/verify.rb#109 + def nbf_leeway; end + + class << self + # source://jwt//lib/jwt/verify.rb#14 + def verify_aud(payload, options); end + + # source://jwt//lib/jwt/verify.rb#19 + def verify_claims(payload, options); end + + # source://jwt//lib/jwt/verify.rb#14 + def verify_expiration(payload, options); end + + # source://jwt//lib/jwt/verify.rb#14 + def verify_iat(payload, options); end + + # source://jwt//lib/jwt/verify.rb#14 + def verify_iss(payload, options); end + + # source://jwt//lib/jwt/verify.rb#14 + def verify_jti(payload, options); end + + # source://jwt//lib/jwt/verify.rb#14 + def verify_not_before(payload, options); end + + # source://jwt//lib/jwt/verify.rb#14 + def verify_required_claims(payload, options); end + + # source://jwt//lib/jwt/verify.rb#14 + def verify_sub(payload, options); end + end +end + +# source://jwt//lib/jwt/verify.rb#8 +JWT::Verify::DEFAULTS = T.let(T.unsafe(nil), Hash) + +# If the x5c header certificate chain can be validated by trusted root +# certificates, and none of the certificates are revoked, returns the public +# key from the first certificate. +# See https://tools.ietf.org/html/rfc7515#section-4.1.6 +# +# source://jwt//lib/jwt/x5c_key_finder.rb#8 +class JWT::X5cKeyFinder + # @raise [ArgumentError] + # @return [X5cKeyFinder] a new instance of X5cKeyFinder + # + # source://jwt//lib/jwt/x5c_key_finder.rb#9 + def initialize(root_certificates, crls = T.unsafe(nil)); end + + # source://jwt//lib/jwt/x5c_key_finder.rb#15 + def from(x5c_header_or_certificates); end + + private + + # source://jwt//lib/jwt/x5c_key_finder.rb#33 + def build_store(root_certificates, crls); end + + # source://jwt//lib/jwt/x5c_key_finder.rb#42 + def parse_certificates(x5c_header_or_certificates); end +end diff --git a/sorbet/rbi/gems/nori@2.6.0.rbi b/sorbet/rbi/gems/nori@2.7.0.rbi similarity index 94% rename from sorbet/rbi/gems/nori@2.6.0.rbi rename to sorbet/rbi/gems/nori@2.7.0.rbi index d550bc3e..e3d830ed 100644 --- a/sorbet/rbi/gems/nori@2.6.0.rbi +++ b/sorbet/rbi/gems/nori@2.7.0.rbi @@ -16,10 +16,10 @@ class Nori # source://nori//lib/nori.rb#16 def initialize(options = T.unsafe(nil)); end - # source://nori//lib/nori.rb#32 + # source://nori//lib/nori.rb#33 def find(hash, *path); end - # source://nori//lib/nori.rb#42 + # source://nori//lib/nori.rb#43 def parse(xml); end private @@ -27,16 +27,19 @@ class Nori # Expects a +block+ which receives a tag to convert. # Accepts +nil+ for a reset to the default behavior of not converting tags. # - # source://nori//lib/nori.rb#58 + # source://nori//lib/nori.rb#59 def convert_tags_to(reset = T.unsafe(nil), &block); end - # source://nori//lib/nori.rb#71 + # source://nori//lib/nori.rb#72 def find_value(hash, key); end - # source://nori//lib/nori.rb#51 + # source://nori//lib/nori.rb#52 def load_parser(parser); end - # source://nori//lib/nori.rb#62 + # source://nori//lib/nori.rb#81 + def scrub_xml(string); end + + # source://nori//lib/nori.rb#63 def validate_options!(available_options, options); end class << self @@ -45,7 +48,7 @@ class Nori end end -# source://nori//lib/nori/core_ext/object.rb#2 +# source://nori//lib/nori/core_ext/string.rb#2 module Nori::CoreExt; end # source://nori//lib/nori/core_ext/hash.rb#5 @@ -81,14 +84,6 @@ module Nori::CoreExt::Hash def normalize_simple_type_params(key, value); end end -# source://nori//lib/nori/core_ext/object.rb#3 -module Nori::CoreExt::Object - # @return [Boolean] - # - # source://nori//lib/nori/core_ext/object.rb#5 - def blank?; end -end - # source://nori//lib/nori/core_ext/string.rb#3 module Nori::CoreExt::String # Returns the String in snake_case. @@ -321,12 +316,6 @@ Nori::XMLUtilityNode::XS_DATE_TIME = T.let(T.unsafe(nil), Regexp) # source://nori//lib/nori/xml_utility_node.rb#31 Nori::XMLUtilityNode::XS_TIME = T.let(T.unsafe(nil), Regexp) -class Object < ::BasicObject - include ::Kernel - include ::PP::ObjectMixin - include ::Nori::CoreExt::Object -end - class String include ::Comparable include ::Nori::CoreExt::String diff --git a/sorbet/rbi/gems/parser@3.3.0.5.rbi b/sorbet/rbi/gems/parser@3.3.1.0.rbi similarity index 93% rename from sorbet/rbi/gems/parser@3.3.0.5.rbi rename to sorbet/rbi/gems/parser@3.3.1.0.rbi index 0acdc763..383051a5 100644 --- a/sorbet/rbi/gems/parser@3.3.0.5.rbi +++ b/sorbet/rbi/gems/parser@3.3.1.0.rbi @@ -52,603 +52,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 +863,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 +3331,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 +3340,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 +3349,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 +3362,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 +3375,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 +3384,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 +3394,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 +3413,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 +3424,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 +3438,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 +3450,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 +3460,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 +3468,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 +3500,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 +3521,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 +5127,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 +5218,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 +5473,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 4e885250..00000000 --- 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.27.0.rbi similarity index 55% rename from sorbet/rbi/gems/prism@0.24.0.rbi rename to sorbet/rbi/gems/prism@0.27.0.rbi index 07688d12..52035525 100644 --- a/sorbet/rbi/gems/prism@0.24.0.rbi +++ b/sorbet/rbi/gems/prism@0.27.0.rbi @@ -4,12 +4,33 @@ # 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/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.rbi.erb +# 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 +# ast/parser in their bundle. +module AST; end + +class AST::Node; end + +# We keep these shims in here because our client libraries might not have parser +# in their bundle. +module Parser; end + +module Parser::AST; end +class Parser::AST::Node < AST::Node; end +class Parser::Base; end + # The Prism Ruby parser. # # "Parsing Ruby is suddenly manageable!" @@ -28,7 +49,7 @@ module Prism def lex(*_arg0); end # :call-seq: - # Prism::lex_compat(source, **options) -> ParseResult + # 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 @@ -36,7 +57,8 @@ module Prism # # For supported options, see Prism::parse. # - # source://prism//lib/prism.rb#46 + # source://prism//lib/prism.rb#47 + 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. @@ -49,7 +71,8 @@ module Prism # returns the same tokens. Raises SyntaxError if the syntax in source is # invalid. # - # source://prism//lib/prism.rb#56 + # source://prism//lib/prism.rb#57 + sig { params(source: String).returns(T::Array[T.untyped]) } def lex_ripper(source); end # :call-seq: @@ -57,7 +80,8 @@ module Prism # # Load the serialized AST using the source as a reference into a tree. # - # source://prism//lib/prism.rb#64 + # source://prism//lib/prism.rb#65 + sig { params(source: String, serialized: String).returns(Prism::ParseResult) } def load(source, serialized); end # Mirror the Prism.parse API by using the serialization API. @@ -66,19 +90,14 @@ module Prism # 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. + # Mirror the Prism.parse_failure? API by using the serialization API. # # @return [Boolean] - # - # source://prism//lib/prism.rb#72 - def parse_failure?(source, **options); end + 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. + # 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 @@ -86,15 +105,10 @@ module Prism # 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. + # Mirror the Prism.parse_file_failure? API by using the serialization API. # # @return [Boolean] - # - # source://prism//lib/prism.rb#80 - def parse_file_failure?(filepath, **options); end + def parse_file_failure?(*_arg0); end # Mirror the Prism.parse_file_success? API by using the serialization API. # @@ -107,6 +121,9 @@ module Prism # 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] @@ -119,86 +136,119 @@ end # alias $foo $bar # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#97 +# source://prism//lib/prism/node.rb#135 class Prism::AliasGlobalVariableNode < ::Prism::Node - # def initialize: (Node new_name, Node old_name, Location keyword_loc, Location location) -> void + # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void # # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#99 + # source://prism//lib/prism/node.rb#137 + sig do + params( + source: Prism::Source, + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, new_name, old_name, keyword_loc, location); 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#247 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#109 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#147 + 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#114 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#152 + 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#124 + # source://prism//lib/prism/node.rb#162 + 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#119 + # source://prism//lib/prism/node.rb#157 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> AliasGlobalVariableNode + # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#129 - sig { params(params: T.untyped).returns(Prism::AliasGlobalVariableNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#167 + sig do + params( + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AliasGlobalVariableNode) + end + def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#152 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::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 + # source://prism//lib/prism/node.rb#175 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#166 + # source://prism//lib/prism/node.rb#207 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#161 + # source://prism//lib/prism/node.rb#202 sig { returns(String) } def keyword; end - # attr_reader keyword_loc: Location + # The location of the `alias` keyword. + # + # alias $foo $bar + # ^^^^^ # - # source://prism//lib/prism/node.rb#154 + # source://prism//lib/prism/node.rb#195 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader new_name: Node + # Represents the new name of the global variable that can be used after aliasing. This can be either a global variable, a back reference, or a numbered reference. # - # source://prism//lib/prism/node.rb#148 + # alias $foo $bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#183 sig { returns(Prism::Node) } def new_name; end - # attr_reader old_name: Node + # Represents the old name of the global variable that could be used before aliasing. This can be either a global variable, a back reference, or a numbered reference. + # + # alias $foo $bar + # ^^^^ # - # source://prism//lib/prism/node.rb#151 + # source://prism//lib/prism/node.rb#189 sig { returns(Prism::Node) } def old_name; end @@ -217,7 +267,8 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#190 + # source://prism//lib/prism/node.rb#231 + sig { override.returns(Symbol) } def type; end class << self @@ -228,7 +279,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#200 + # source://prism//lib/prism/node.rb#241 def type; end end end @@ -238,86 +289,110 @@ end # alias foo bar # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#209 +# source://prism//lib/prism/node.rb#259 class Prism::AliasMethodNode < ::Prism::Node - # def initialize: (Node new_name, Node old_name, Location keyword_loc, Location location) -> void + # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void # # @return [AliasMethodNode] a new instance of AliasMethodNode # - # source://prism//lib/prism/node.rb#211 + # source://prism//lib/prism/node.rb#261 + sig do + params( + source: Prism::Source, + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, new_name, old_name, keyword_loc, location); 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#362 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#221 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#271 + 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#226 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#276 + 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#236 + # source://prism//lib/prism/node.rb#286 + 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#231 + # source://prism//lib/prism/node.rb#281 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> AliasMethodNode + # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasMethodNode # - # source://prism//lib/prism/node.rb#241 - sig { params(params: T.untyped).returns(Prism::AliasMethodNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#291 + sig do + params( + new_name: Prism::Node, + old_name: Prism::Node, + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AliasMethodNode) + end + def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#276 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::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 + # source://prism//lib/prism/node.rb#299 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#278 + # source://prism//lib/prism/node.rb#322 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#273 + # source://prism//lib/prism/node.rb#317 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#266 + # source://prism//lib/prism/node.rb#310 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader new_name: Node + # attr_reader new_name: Prism::node # - # source://prism//lib/prism/node.rb#260 + # source://prism//lib/prism/node.rb#304 sig { returns(Prism::Node) } def new_name; end - # attr_reader old_name: Node + # attr_reader old_name: Prism::node # - # source://prism//lib/prism/node.rb#263 + # source://prism//lib/prism/node.rb#307 sig { returns(Prism::Node) } def old_name; end @@ -336,7 +411,8 @@ class Prism::AliasMethodNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#302 + # source://prism//lib/prism/node.rb#346 + sig { override.returns(Symbol) } def type; end class << self @@ -347,7 +423,7 @@ class Prism::AliasMethodNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#312 + # source://prism//lib/prism/node.rb#356 def type; end end end @@ -357,86 +433,110 @@ end # foo => bar | baz # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#321 +# source://prism//lib/prism/node.rb#374 class Prism::AlternationPatternNode < ::Prism::Node - # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void + # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void # # @return [AlternationPatternNode] a new instance of AlternationPatternNode # - # source://prism//lib/prism/node.rb#323 + # source://prism//lib/prism/node.rb#376 + sig do + params( + source: Prism::Source, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, left, right, operator_loc, location); 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#477 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#333 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#386 + 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#338 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#391 + 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#348 + # source://prism//lib/prism/node.rb#401 + 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#343 + # source://prism//lib/prism/node.rb#396 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> AlternationPatternNode + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AlternationPatternNode # - # source://prism//lib/prism/node.rb#353 - sig { params(params: T.untyped).returns(Prism::AlternationPatternNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#406 + sig do + params( + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AlternationPatternNode) + end + def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#391 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::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 + # source://prism//lib/prism/node.rb#414 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#390 + # source://prism//lib/prism/node.rb#437 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader left: Node + # attr_reader left: Prism::node # - # source://prism//lib/prism/node.rb#372 + # source://prism//lib/prism/node.rb#419 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#385 + # source://prism//lib/prism/node.rb#432 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#378 + # source://prism//lib/prism/node.rb#425 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader right: Node + # attr_reader right: Prism::node # - # source://prism//lib/prism/node.rb#375 + # source://prism//lib/prism/node.rb#422 sig { returns(Prism::Node) } def right; end @@ -455,7 +555,8 @@ class Prism::AlternationPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#414 + # source://prism//lib/prism/node.rb#461 + sig { override.returns(Symbol) } def type; end class << self @@ -466,7 +567,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#424 + # source://prism//lib/prism/node.rb#471 def type; end end end @@ -476,63 +577,87 @@ end # left and right # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#433 +# source://prism//lib/prism/node.rb#489 class Prism::AndNode < ::Prism::Node - # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void + # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void # # @return [AndNode] a new instance of AndNode # - # source://prism//lib/prism/node.rb#435 + # source://prism//lib/prism/node.rb#491 + sig do + params( + source: Prism::Source, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, left, right, operator_loc, location); 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#607 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#445 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#501 + 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#450 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#506 + 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#460 + # source://prism//lib/prism/node.rb#516 + 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#455 + # source://prism//lib/prism/node.rb#511 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> AndNode + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AndNode # - # source://prism//lib/prism/node.rb#465 - sig { params(params: T.untyped).returns(Prism::AndNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#521 + sig do + params( + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AndNode) + end + def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#506 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::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 + # source://prism//lib/prism/node.rb#529 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#517 + # source://prism//lib/prism/node.rb#567 + sig { params(inspector: T.untyped).returns(String) } 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). @@ -543,13 +668,13 @@ class Prism::AndNode < ::Prism::Node # 1 && 2 # ^ # - # source://prism//lib/prism/node.rb#490 + # source://prism//lib/prism/node.rb#540 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#512 + # source://prism//lib/prism/node.rb#562 sig { returns(String) } def operator; end @@ -558,7 +683,7 @@ class Prism::AndNode < ::Prism::Node # left and right # ^^^ # - # source://prism//lib/prism/node.rb#505 + # source://prism//lib/prism/node.rb#555 sig { returns(Prism::Location) } def operator_loc; end @@ -570,7 +695,7 @@ class Prism::AndNode < ::Prism::Node # 1 and 2 # ^ # - # source://prism//lib/prism/node.rb#499 + # source://prism//lib/prism/node.rb#549 sig { returns(Prism::Node) } def right; end @@ -589,7 +714,8 @@ class Prism::AndNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#541 + # source://prism//lib/prism/node.rb#591 + sig { override.returns(Symbol) } def type; end class << self @@ -600,7 +726,7 @@ class Prism::AndNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#551 + # source://prism//lib/prism/node.rb#601 def type; end end end @@ -610,77 +736,99 @@ end # return foo, bar, baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#560 +# source://prism//lib/prism/node.rb#619 class Prism::ArgumentsNode < ::Prism::Node - # def initialize: (Integer flags, Array[Node] arguments, Location location) -> void + # def initialize: (Integer flags, Array[Prism::node] arguments, Location location) -> void # # @return [ArgumentsNode] a new instance of ArgumentsNode # - # source://prism//lib/prism/node.rb#562 + # source://prism//lib/prism/node.rb#621 + sig do + params( + source: Prism::Source, + flags: Integer, + arguments: T::Array[Prism::Node], + location: Prism::Location + ).void + end def initialize(source, flags, arguments, location); 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#713 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#571 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#630 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader arguments: Array[Node] + # attr_reader arguments: Array[Prism::node] # - # source://prism//lib/prism/node.rb#613 + # source://prism//lib/prism/node.rb#667 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)]) } + # source://prism//lib/prism/node.rb#635 + 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#586 + # source://prism//lib/prism/node.rb#645 + 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#581 + # source://prism//lib/prism/node.rb#640 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def contains_keyword_splat?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#617 + # source://prism//lib/prism/node.rb#670 sig { returns(T::Boolean) } def contains_keyword_splat?; end - # def copy: (**params) -> ArgumentsNode + # def copy: (?flags: Integer, ?arguments: Array[Prism::node], ?location: Location) -> ArgumentsNode # - # source://prism//lib/prism/node.rb#591 - sig { params(params: T.untyped).returns(Prism::ArgumentsNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#650 + sig do + params( + flags: Integer, + arguments: T::Array[Prism::Node], + location: Prism::Location + ).returns(Prism::ArgumentsNode) + end + def copy(flags: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#635 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Node], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Prism::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 + # source://prism//lib/prism/node.rb#658 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#622 + # source://prism//lib/prism/node.rb#675 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -698,14 +846,15 @@ class Prism::ArgumentsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#644 + # source://prism//lib/prism/node.rb#697 + sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#609 + # source://prism//lib/prism/node.rb#663 sig { returns(Integer) } def flags; end @@ -717,19 +866,19 @@ class Prism::ArgumentsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#654 + # source://prism//lib/prism/node.rb#707 def type; end end end # Flags for arguments nodes. # -# source://prism//lib/prism/node.rb#19241 +# source://prism//lib/prism/node.rb#20337 module Prism::ArgumentsNodeFlags; end # if arguments contain keyword splat # -# source://prism//lib/prism/node.rb#19243 +# source://prism//lib/prism/node.rb#20339 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. @@ -737,100 +886,136 @@ Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer # [1, 2, 3] # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#663 +# source://prism//lib/prism/node.rb#725 class Prism::ArrayNode < ::Prism::Node - # def initialize: (Integer flags, Array[Node] elements, Location? opening_loc, Location? closing_loc, Location location) -> void + # def initialize: (Integer flags, Array[Prism::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 + # source://prism//lib/prism/node.rb#727 + sig do + params( + source: Prism::Source, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, flags, elements, opening_loc, closing_loc, location); 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#869 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#676 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#738 + 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#681 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#743 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#758 + # source://prism//lib/prism/node.rb#824 sig { returns(T.nilable(String)) } def closing; end - # attr_reader closing_loc: Location? + # 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#735 + # source://prism//lib/prism/node.rb#801 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#691 + # source://prism//lib/prism/node.rb#753 + 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#686 + # source://prism//lib/prism/node.rb#748 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def contains_splat?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#748 + # source://prism//lib/prism/node.rb#814 sig { returns(T::Boolean) } def contains_splat?; end - # def copy: (**params) -> ArrayNode + # def copy: (?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayNode # - # source://prism//lib/prism/node.rb#696 - sig { params(params: T.untyped).returns(Prism::ArrayNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#758 + sig do + params( + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::ArrayNode) + end + def copy(flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#743 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Prism::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 + # source://prism//lib/prism/node.rb#766 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader elements: Array[Node] + # 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#720 + # source://prism//lib/prism/node.rb#775 sig { returns(T::Array[Prism::Node]) } def elements; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#763 + # source://prism//lib/prism/node.rb#829 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#753 + # source://prism//lib/prism/node.rb#819 sig { returns(T.nilable(String)) } def opening; end - # attr_reader opening_loc: Location? + # Represents the optional source location for the opening token. # - # source://prism//lib/prism/node.rb#723 + # [1,2,3] # "[" + # %w[foo bar baz] # "%w[" + # %I(apple orange banana) # "%I(" + # foo = 1, 2, 3 # nil + # + # source://prism//lib/prism/node.rb#783 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -849,14 +1034,15 @@ class Prism::ArrayNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#787 + # source://prism//lib/prism/node.rb#853 + sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#716 + # source://prism//lib/prism/node.rb#771 sig { returns(Integer) } def flags; end @@ -868,19 +1054,19 @@ class Prism::ArrayNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#797 + # source://prism//lib/prism/node.rb#863 def type; end end end # Flags for array nodes. # -# source://prism//lib/prism/node.rb#19247 +# source://prism//lib/prism/node.rb#20343 module Prism::ArrayNodeFlags; end # if array contains splat nodes # -# source://prism//lib/prism/node.rb#19249 +# source://prism//lib/prism/node.rb#20345 Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array pattern in pattern matching. @@ -900,110 +1086,140 @@ Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # foo in Bar[1, 2, 3] # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#818 +# source://prism//lib/prism/node.rb#895 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 + # def initialize: (Prism::node? constant, Array[Prism::node] requireds, Prism::node? rest, Array[Prism::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 + # source://prism//lib/prism/node.rb#897 + sig do + params( + source: Prism::Source, + constant: T.nilable(Prism::Node), + 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), + location: Prism::Location + ).void + end def initialize(source, constant, requireds, rest, posts, opening_loc, closing_loc, location); 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#1047 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#833 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#910 + 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#838 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#915 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#922 + # source://prism//lib/prism/node.rb#991 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#904 + # source://prism//lib/prism/node.rb#973 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#853 + # source://prism//lib/prism/node.rb#930 + 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#843 + # source://prism//lib/prism/node.rb#920 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Node? + # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#880 + # source://prism//lib/prism/node.rb#948 sig { returns(T.nilable(Prism::Node)) } def constant; end - # def copy: (**params) -> ArrayPatternNode + # def copy: (?constant: Prism::node?, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayPatternNode # - # source://prism//lib/prism/node.rb#858 - sig { params(params: T.untyped).returns(Prism::ArrayPatternNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#935 + sig do + params( + constant: T.nilable(Prism::Node), + 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), + location: Prism::Location + ).returns(Prism::ArrayPatternNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#915 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::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 + # source://prism//lib/prism/node.rb#943 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#927 + # source://prism//lib/prism/node.rb#996 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#917 + # source://prism//lib/prism/node.rb#986 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#892 + # source://prism//lib/prism/node.rb#960 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # attr_reader posts: Array[Node] + # attr_reader posts: Array[Prism::node] # - # source://prism//lib/prism/node.rb#889 + # source://prism//lib/prism/node.rb#957 sig { returns(T::Array[Prism::Node]) } def posts; end - # attr_reader requireds: Array[Node] + # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#883 + # source://prism//lib/prism/node.rb#951 sig { returns(T::Array[Prism::Node]) } def requireds; end - # attr_reader rest: Node? + # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#886 + # source://prism//lib/prism/node.rb#954 sig { returns(T.nilable(Prism::Node)) } def rest; end @@ -1022,7 +1238,8 @@ class Prism::ArrayPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#962 + # source://prism//lib/prism/node.rb#1031 + sig { override.returns(Symbol) } def type; end class << self @@ -1033,7 +1250,7 @@ class Prism::ArrayPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#972 + # source://prism//lib/prism/node.rb#1041 def type; end end end @@ -1043,63 +1260,87 @@ end # { a => b } # ^^^^^^ # -# source://prism//lib/prism/node.rb#981 +# source://prism//lib/prism/node.rb#1064 class Prism::AssocNode < ::Prism::Node - # def initialize: (Node key, Node value, Location? operator_loc, Location location) -> void + # def initialize: (Prism::node key, Prism::node value, Location? operator_loc, Location location) -> void # # @return [AssocNode] a new instance of AssocNode # - # source://prism//lib/prism/node.rb#983 + # source://prism//lib/prism/node.rb#1066 + sig do + params( + source: Prism::Source, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, key, value, operator_loc, location); 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#1191 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#993 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1076 + 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#998 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1081 + 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#1008 + # source://prism//lib/prism/node.rb#1091 + 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#1003 + # source://prism//lib/prism/node.rb#1086 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> AssocNode + # def copy: (?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?, ?location: Location) -> AssocNode # - # source://prism//lib/prism/node.rb#1013 - sig { params(params: T.untyped).returns(Prism::AssocNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1096 + sig do + params( + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::AssocNode) + end + def copy(key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#1081 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { key: Prism::node, value: Prism::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 + # source://prism//lib/prism/node.rb#1104 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1074 + # source://prism//lib/prism/node.rb#1151 + sig { params(inspector: T.untyped).returns(String) } 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). @@ -1113,13 +1354,13 @@ class Prism::AssocNode < ::Prism::Node # { def a; end => 1 } # ^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#1041 + # source://prism//lib/prism/node.rb#1118 sig { returns(Prism::Node) } def key; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#1069 + # source://prism//lib/prism/node.rb#1146 sig { returns(T.nilable(String)) } def operator; end @@ -1128,7 +1369,7 @@ class Prism::AssocNode < ::Prism::Node # { foo => bar } # ^^ # - # source://prism//lib/prism/node.rb#1056 + # source://prism//lib/prism/node.rb#1133 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end @@ -1147,7 +1388,8 @@ class Prism::AssocNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1098 + # source://prism//lib/prism/node.rb#1175 + 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). @@ -1158,7 +1400,7 @@ class Prism::AssocNode < ::Prism::Node # { x: 1 } # ^ # - # source://prism//lib/prism/node.rb#1050 + # source://prism//lib/prism/node.rb#1127 sig { returns(Prism::Node) } def value; end @@ -1170,7 +1412,7 @@ class Prism::AssocNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1108 + # source://prism//lib/prism/node.rb#1185 def type; end end end @@ -1180,68 +1422,90 @@ end # { **foo } # ^^^^^ # -# source://prism//lib/prism/node.rb#1117 +# source://prism//lib/prism/node.rb#1203 class Prism::AssocSplatNode < ::Prism::Node - # def initialize: (Node? value, Location operator_loc, Location location) -> void + # def initialize: (Prism::node? value, Location operator_loc, Location location) -> void # # @return [AssocSplatNode] a new instance of AssocSplatNode # - # source://prism//lib/prism/node.rb#1119 + # source://prism//lib/prism/node.rb#1205 + sig do + params( + source: Prism::Source, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, value, operator_loc, location); 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#1312 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1128 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1214 + 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#1133 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1219 + 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#1145 + # source://prism//lib/prism/node.rb#1231 + 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#1138 + # source://prism//lib/prism/node.rb#1224 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> AssocSplatNode + # def copy: (?value: Prism::node?, ?operator_loc: Location, ?location: Location) -> AssocSplatNode # - # source://prism//lib/prism/node.rb#1150 - sig { params(params: T.untyped).returns(Prism::AssocSplatNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1236 + sig do + params( + value: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::AssocSplatNode) + end + def copy(value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#1219 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node?, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::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 + # source://prism//lib/prism/node.rb#1244 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1189 + # source://prism//lib/prism/node.rb#1270 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1184 + # source://prism//lib/prism/node.rb#1265 sig { returns(String) } def operator; end @@ -1250,7 +1514,7 @@ class Prism::AssocSplatNode < ::Prism::Node # { **x } # ^^ # - # source://prism//lib/prism/node.rb#1177 + # source://prism//lib/prism/node.rb#1258 sig { returns(Prism::Location) } def operator_loc; end @@ -1269,7 +1533,8 @@ class Prism::AssocSplatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1215 + # source://prism//lib/prism/node.rb#1296 + sig { override.returns(Symbol) } def type; end # The value to be splatted, if present. Will be missing when keyword rest argument forwarding is used. @@ -1277,7 +1542,7 @@ class Prism::AssocSplatNode < ::Prism::Node # { **foo } # ^^^ # - # source://prism//lib/prism/node.rb#1171 + # source://prism//lib/prism/node.rb#1252 sig { returns(T.nilable(Prism::Node)) } def value; end @@ -1289,11 +1554,14 @@ class Prism::AssocSplatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1225 + # source://prism//lib/prism/node.rb#1306 def type; end end end +# The FFI backend is used on other Ruby implementations. +# +# source://prism//lib/prism.rb#84 Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # Represents reading a reference to a field in the previous match. @@ -1301,63 +1569,72 @@ Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # $' # ^^ # -# source://prism//lib/prism/node.rb#1234 +# source://prism//lib/prism/node.rb#1323 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 + # source://prism//lib/prism/node.rb#1325 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); 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#1409 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1244 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1333 + 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#1249 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1338 + 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#1259 + # source://prism//lib/prism/node.rb#1348 + 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#1254 + # source://prism//lib/prism/node.rb#1343 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BackReferenceReadNode + # def copy: (?name: Symbol, ?location: Location) -> BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1264 - sig { params(params: T.untyped).returns(Prism::BackReferenceReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1353 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::BackReferenceReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#1338 + sig { override.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 + # source://prism//lib/prism/node.rb#1361 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1289 + # source://prism//lib/prism/node.rb#1373 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # The name of the back-reference variable, including the leading `$`. @@ -1366,7 +1643,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # $+ # name `:$+` # - # source://prism//lib/prism/node.rb#1285 + # source://prism//lib/prism/node.rb#1370 sig { returns(Symbol) } def name; end @@ -1385,7 +1662,8 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1309 + # source://prism//lib/prism/node.rb#1393 + sig { override.returns(Symbol) } def type; end class << self @@ -1396,7 +1674,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1319 + # source://prism//lib/prism/node.rb#1403 def type; end end end @@ -1406,24 +1684,24 @@ end # 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 +# 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#16 + # 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#21 + # 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#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::Node).void } def visit_child_nodes(node); end end @@ -1435,113 +1713,143 @@ end # end # ^^^^^ # -# source://prism//lib/prism/node.rb#1330 +# source://prism//lib/prism/node.rb#1421 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 + # source://prism//lib/prism/node.rb#1423 + sig do + params( + source: Prism::Source, + 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), + location: Prism::Location + ).void + end def initialize(source, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); 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#1587 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1345 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1436 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1433 + # source://prism//lib/prism/node.rb#1516 sig { returns(T.nilable(String)) } def begin_keyword; end # attr_reader begin_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1396 + # source://prism//lib/prism/node.rb#1478 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)]) } + # source://prism//lib/prism/node.rb#1445 + 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#1369 + # source://prism//lib/prism/node.rb#1460 + 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#1359 + # source://prism//lib/prism/node.rb#1450 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BeginNode + # def copy: (?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?, ?location: Location) -> BeginNode # - # source://prism//lib/prism/node.rb#1374 - sig { params(params: T.untyped).returns(Prism::BeginNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1465 + sig do + params( + 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), + location: Prism::Location + ).returns(Prism::BeginNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#1445 + sig { override.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 + # source://prism//lib/prism/node.rb#1473 + 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#1414 + # source://prism//lib/prism/node.rb#1497 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1438 + # source://prism//lib/prism/node.rb#1521 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1420 + # source://prism//lib/prism/node.rb#1503 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # attr_reader ensure_clause: EnsureNode? # - # source://prism//lib/prism/node.rb#1417 + # source://prism//lib/prism/node.rb#1500 sig { returns(T.nilable(Prism::EnsureNode)) } def ensure_clause; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1443 + # source://prism//lib/prism/node.rb#1526 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader rescue_clause: RescueNode? # - # source://prism//lib/prism/node.rb#1411 + # source://prism//lib/prism/node.rb#1494 sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end - # source://prism//lib/prism/node.rb#1349 + # source://prism//lib/prism/node.rb#1440 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#1408 + # source://prism//lib/prism/node.rb#1491 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -1560,7 +1868,8 @@ class Prism::BeginNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1488 + # source://prism//lib/prism/node.rb#1571 + sig { override.returns(Symbol) } def type; end class << self @@ -1571,7 +1880,7 @@ class Prism::BeginNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1498 + # source://prism//lib/prism/node.rb#1581 def type; end end end @@ -1581,80 +1890,102 @@ end # bar(&args) # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1507 +# source://prism//lib/prism/node.rb#1602 class Prism::BlockArgumentNode < ::Prism::Node - # def initialize: (Node? expression, Location operator_loc, Location location) -> void + # def initialize: (Prism::node? expression, Location operator_loc, Location location) -> void # # @return [BlockArgumentNode] a new instance of BlockArgumentNode # - # source://prism//lib/prism/node.rb#1509 + # source://prism//lib/prism/node.rb#1604 + sig do + params( + source: Prism::Source, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, expression, operator_loc, location); 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#1705 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1518 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1613 + 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#1523 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1618 + 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#1535 + # source://prism//lib/prism/node.rb#1630 + 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#1528 + # source://prism//lib/prism/node.rb#1623 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BlockArgumentNode + # def copy: (?expression: Prism::node?, ?operator_loc: Location, ?location: Location) -> BlockArgumentNode # - # source://prism//lib/prism/node.rb#1540 - sig { params(params: T.untyped).returns(Prism::BlockArgumentNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1635 + sig do + params( + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BlockArgumentNode) + end + def copy(expression: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#1618 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Node?, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::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 + # source://prism//lib/prism/node.rb#1643 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader expression: Node? + # attr_reader expression: Prism::node? # - # source://prism//lib/prism/node.rb#1558 + # source://prism//lib/prism/node.rb#1648 sig { returns(T.nilable(Prism::Node)) } def expression; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1573 + # source://prism//lib/prism/node.rb#1663 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1568 + # source://prism//lib/prism/node.rb#1658 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#1561 + # source://prism//lib/prism/node.rb#1651 sig { returns(Prism::Location) } def operator_loc; end @@ -1673,7 +2004,8 @@ class Prism::BlockArgumentNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1599 + # source://prism//lib/prism/node.rb#1689 + sig { override.returns(Symbol) } def type; end class << self @@ -1684,7 +2016,7 @@ class Prism::BlockArgumentNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1609 + # source://prism//lib/prism/node.rb#1699 def type; end end end @@ -1694,68 +2026,77 @@ end # a { |; b| } # ^ # -# source://prism//lib/prism/node.rb#1618 +# source://prism//lib/prism/node.rb#1716 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 + # source://prism//lib/prism/node.rb#1718 + sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } def initialize(source, flags, name, location); 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#1810 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1629 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1727 + 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#1634 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1732 + 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#1644 + # source://prism//lib/prism/node.rb#1742 + 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 + # source://prism//lib/prism/node.rb#1737 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BlockLocalVariableNode + # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1649 - sig { params(params: T.untyped).returns(Prism::BlockLocalVariableNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1747 + sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::BlockLocalVariableNode) } + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#1732 + sig { override.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 + # source://prism//lib/prism/node.rb#1755 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1680 + # source://prism//lib/prism/node.rb#1772 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#1671 + # source://prism//lib/prism/node.rb#1764 sig { returns(Symbol) } def name; end @@ -1763,7 +2104,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#1675 + # source://prism//lib/prism/node.rb#1767 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -1782,14 +2123,15 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1702 + # source://prism//lib/prism/node.rb#1794 + sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#1667 + # source://prism//lib/prism/node.rb#1760 sig { returns(Integer) } def flags; end @@ -1801,7 +2143,7 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1712 + # source://prism//lib/prism/node.rb#1804 def type; end end end @@ -1811,104 +2153,132 @@ end # [1, 2, 3].each { |i| puts x } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1721 +# source://prism//lib/prism/node.rb#1821 class Prism::BlockNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Node? parameters, Node? body, Location opening_loc, Location closing_loc, Location location) -> void + # def initialize: (Array[Symbol] locals, Prism::node? parameters, Prism::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 + # source://prism//lib/prism/node.rb#1823 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, locals, parameters, body, opening_loc, closing_loc, location); 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#1954 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1735 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1835 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Node? + # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#1785 + # source://prism//lib/prism/node.rb#1877 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)]) } + # source://prism//lib/prism/node.rb#1840 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#1806 + # source://prism//lib/prism/node.rb#1899 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#1794 + # source://prism//lib/prism/node.rb#1887 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1753 + # source://prism//lib/prism/node.rb#1853 + 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#1745 + # source://prism//lib/prism/node.rb#1845 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BlockNode + # def copy: (?locals: Array[Symbol], ?parameters: Prism::node?, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> BlockNode # - # source://prism//lib/prism/node.rb#1758 - sig { params(params: T.untyped).returns(Prism::BlockNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#1858 + sig do + params( + locals: T::Array[Symbol], + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BlockNode) + end + def copy(locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#1840 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], parameters: Prism::node?, body: Prism::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 + # source://prism//lib/prism/node.rb#1866 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1811 + # source://prism//lib/prism/node.rb#1904 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#1779 + # source://prism//lib/prism/node.rb#1871 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#1801 + # source://prism//lib/prism/node.rb#1894 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#1788 + # source://prism//lib/prism/node.rb#1880 sig { returns(Prism::Location) } def opening_loc; end - # attr_reader parameters: Node? + # attr_reader parameters: Prism::node? # - # source://prism//lib/prism/node.rb#1782 + # source://prism//lib/prism/node.rb#1874 sig { returns(T.nilable(Prism::Node)) } def parameters; end @@ -1927,7 +2297,8 @@ class Prism::BlockNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1845 + # source://prism//lib/prism/node.rb#1938 + sig { override.returns(Symbol) } def type; end class << self @@ -1938,7 +2309,7 @@ class Prism::BlockNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1855 + # source://prism//lib/prism/node.rb#1948 def type; end end end @@ -1949,86 +2320,112 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#1865 +# source://prism//lib/prism/node.rb#1970 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 + # source://prism//lib/prism/node.rb#1972 + sig do + params( + source: Prism::Source, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, name, name_loc, operator_loc, location); 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#2097 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1878 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#1983 + 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#1883 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#1988 + 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#1893 + # source://prism//lib/prism/node.rb#1998 + 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#1888 + # source://prism//lib/prism/node.rb#1993 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BlockParameterNode + # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> BlockParameterNode # - # source://prism//lib/prism/node.rb#1898 - sig { params(params: T.untyped).returns(Prism::BlockParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#2003 + sig do + params( + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BlockParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#1988 + sig { override.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 + # source://prism//lib/prism/node.rb#2011 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#1954 + # source://prism//lib/prism/node.rb#2053 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#1922 + # source://prism//lib/prism/node.rb#2020 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#1925 + # source://prism//lib/prism/node.rb#2023 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1949 + # source://prism//lib/prism/node.rb#2048 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#1937 + # source://prism//lib/prism/node.rb#2036 sig { returns(Prism::Location) } def operator_loc; end @@ -2036,7 +2433,7 @@ class Prism::BlockParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#1944 + # source://prism//lib/prism/node.rb#2043 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -2055,14 +2452,15 @@ class Prism::BlockParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#1982 + # source://prism//lib/prism/node.rb#2081 + sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#1918 + # source://prism//lib/prism/node.rb#2016 sig { returns(Integer) } def flags; end @@ -2074,7 +2472,7 @@ class Prism::BlockParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#1992 + # source://prism//lib/prism/node.rb#2091 def type; end end end @@ -2088,98 +2486,124 @@ end # ^^^^^^^^^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#2005 +# source://prism//lib/prism/node.rb#2114 class Prism::BlockParametersNode < ::Prism::Node - # def initialize: (ParametersNode? parameters, Array[Node] locals, Location? opening_loc, Location? closing_loc, Location location) -> void + # def initialize: (ParametersNode? parameters, Array[BlockLocalVariableNode] locals, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [BlockParametersNode] a new instance of BlockParametersNode # - # source://prism//lib/prism/node.rb#2007 + # source://prism//lib/prism/node.rb#2116 + sig do + params( + source: Prism::Source, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, parameters, locals, opening_loc, closing_loc, location); 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#2249 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2018 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#2127 + 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#2023 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#2132 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2097 + # source://prism//lib/prism/node.rb#2200 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2079 + # source://prism//lib/prism/node.rb#2182 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2036 + # source://prism//lib/prism/node.rb#2145 + 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#2028 + # source://prism//lib/prism/node.rb#2137 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BlockParametersNode + # def copy: (?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> BlockParametersNode # - # source://prism//lib/prism/node.rb#2041 - sig { params(params: T.untyped).returns(Prism::BlockParametersNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#2150 + sig do + params( + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::BlockParametersNode) + end + def copy(parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#2132 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], 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 + # source://prism//lib/prism/node.rb#2158 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2102 + # source://prism//lib/prism/node.rb#2205 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader locals: Array[Node] + # attr_reader locals: Array[BlockLocalVariableNode] # - # source://prism//lib/prism/node.rb#2064 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#2166 + sig { returns(T::Array[Prism::BlockLocalVariableNode]) } def locals; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2092 + # source://prism//lib/prism/node.rb#2195 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#2067 + # source://prism//lib/prism/node.rb#2169 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#2061 + # source://prism//lib/prism/node.rb#2163 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end @@ -2198,7 +2622,8 @@ class Prism::BlockParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2130 + # source://prism//lib/prism/node.rb#2233 + sig { override.returns(Symbol) } def type; end class << self @@ -2209,7 +2634,7 @@ class Prism::BlockParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2140 + # source://prism//lib/prism/node.rb#2243 def type; end end end @@ -2219,80 +2644,108 @@ end # break foo # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2149 +# source://prism//lib/prism/node.rb#2263 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 + # source://prism//lib/prism/node.rb#2265 + sig do + params( + source: Prism::Source, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, arguments, keyword_loc, location); 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#2372 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2160 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#2274 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader arguments: ArgumentsNode? + # 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). # - # source://prism//lib/prism/node.rb#2200 + # break foo + # ^^^ + # + # source://prism//lib/prism/node.rb#2312 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)]) } + # source://prism//lib/prism/node.rb#2279 + 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#2177 + # source://prism//lib/prism/node.rb#2291 + 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#2170 + # source://prism//lib/prism/node.rb#2284 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> BreakNode + # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> BreakNode # - # source://prism//lib/prism/node.rb#2182 - sig { params(params: T.untyped).returns(Prism::BreakNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#2296 + sig do + params( + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::BreakNode) + end + def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#2279 + sig { override.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 + # source://prism//lib/prism/node.rb#2304 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2215 + # source://prism//lib/prism/node.rb#2330 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#2210 + # source://prism//lib/prism/node.rb#2325 sig { returns(String) } def keyword; end - # attr_reader keyword_loc: Location + # The location of the `break` keyword. + # + # break foo + # ^^^^^ # - # source://prism//lib/prism/node.rb#2203 + # source://prism//lib/prism/node.rb#2318 sig { returns(Prism::Location) } def keyword_loc; end @@ -2311,7 +2764,8 @@ class Prism::BreakNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2241 + # source://prism//lib/prism/node.rb#2356 + sig { override.returns(Symbol) } def type; end class << self @@ -2322,7 +2776,7 @@ class Prism::BreakNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2251 + # source://prism//lib/prism/node.rb#2366 def type; end end end @@ -2332,126 +2786,160 @@ end # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2260 +# source://prism//lib/prism/node.rb#2383 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 + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void # # @return [CallAndWriteNode] a new instance of CallAndWriteNode # - # source://prism//lib/prism/node.rb#2262 + # source://prism//lib/prism/node.rb#2385 + sig do + params( + source: Prism::Source, + 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, + location: Prism::Location + ).void + end def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); 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#2570 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2277 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#2400 + 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#2381 + # source://prism//lib/prism/node.rb#2495 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2391 + # source://prism//lib/prism/node.rb#2505 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2331 + # source://prism//lib/prism/node.rb#2443 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)]) } + # source://prism//lib/prism/node.rb#2405 + 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#2295 + # source://prism//lib/prism/node.rb#2418 + 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#2287 + # source://prism//lib/prism/node.rb#2410 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> CallAndWriteNode + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallAndWriteNode # - # source://prism//lib/prism/node.rb#2300 - sig { params(params: T.untyped).returns(Prism::CallAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#2423 + sig do + params( + 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, + location: Prism::Location + ).returns(Prism::CallAndWriteNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#2405 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#2431 + 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#2386 + # source://prism//lib/prism/node.rb#2500 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2406 + # source://prism//lib/prism/node.rb#2520 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2396 + # source://prism//lib/prism/node.rb#2510 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2343 + # source://prism//lib/prism/node.rb#2456 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2401 + # source://prism//lib/prism/node.rb#2515 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2361 + # source://prism//lib/prism/node.rb#2475 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2355 + # source://prism//lib/prism/node.rb#2469 sig { returns(Symbol) } def read_name; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2328 + # source://prism//lib/prism/node.rb#2440 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2459,7 +2947,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2371 + # source://prism//lib/prism/node.rb#2485 sig { returns(T::Boolean) } def safe_navigation?; end @@ -2478,12 +2966,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2440 + # source://prism//lib/prism/node.rb#2554 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2367 + # source://prism//lib/prism/node.rb#2482 sig { returns(Prism::Node) } def value; end @@ -2491,21 +2980,21 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2376 + # source://prism//lib/prism/node.rb#2490 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2358 + # source://prism//lib/prism/node.rb#2472 sig { returns(Symbol) } def write_name; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2324 + # source://prism//lib/prism/node.rb#2436 sig { returns(Integer) } def flags; end @@ -2517,7 +3006,7 @@ class Prism::CallAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2450 + # source://prism//lib/prism/node.rb#2564 def type; end end end @@ -2542,24 +3031,45 @@ end # foo&.bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#2474 +# source://prism//lib/prism/node.rb#2602 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 + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Prism::node? block, Location location) -> void # # @return [CallNode] a new instance of CallNode # - # source://prism//lib/prism/node.rb#2476 + # source://prism//lib/prism/node.rb#2604 + sig do + params( + source: Prism::Source, + 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(Prism::Node), + location: Prism::Location + ).void + end def initialize(source, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); 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#2834 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2492 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#2620 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#2596 + # source://prism//lib/prism/node.rb#2715 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -2567,119 +3077,134 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2625 + # source://prism//lib/prism/node.rb#2744 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Node? + # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#2611 + # source://prism//lib/prism/node.rb#2731 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2635 + # source://prism//lib/prism/node.rb#2754 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2557 + # source://prism//lib/prism/node.rb#2673 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)]) } + # source://prism//lib/prism/node.rb#2625 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2650 + # source://prism//lib/prism/node.rb#2769 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2599 + # source://prism//lib/prism/node.rb#2718 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2511 + # source://prism//lib/prism/node.rb#2639 + 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#2502 + # source://prism//lib/prism/node.rb#2630 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> CallNode + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: Prism::node?, ?location: Location) -> CallNode # - # source://prism//lib/prism/node.rb#2516 - sig { params(params: T.untyped).returns(Prism::CallNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#2644 + sig do + params( + 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(Prism::Node), + location: Prism::Location + ).returns(Prism::CallNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#2625 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Prism::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 + # source://prism//lib/prism/node.rb#2652 + 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#2630 + # source://prism//lib/prism/node.rb#2749 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2655 + # source://prism//lib/prism/node.rb#2774 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2640 + # source://prism//lib/prism/node.rb#2759 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2572 + # source://prism//lib/prism/node.rb#2689 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#2569 + # source://prism//lib/prism/node.rb#2686 sig { returns(Symbol) } def name; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2645 + # source://prism//lib/prism/node.rb#2764 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#2584 + # source://prism//lib/prism/node.rb#2702 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -2694,7 +3219,7 @@ class Prism::CallNode < ::Prism::Node # foo + bar # ^^^ # - # source://prism//lib/prism/node.rb#2554 + # source://prism//lib/prism/node.rb#2670 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2702,7 +3227,7 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2615 + # source://prism//lib/prism/node.rb#2734 sig { returns(T::Boolean) } def safe_navigation?; end @@ -2721,22 +3246,23 @@ class Prism::CallNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2699 + # source://prism//lib/prism/node.rb#2818 + sig { override.returns(Symbol) } def type; end # def variable_call?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2620 + # source://prism//lib/prism/node.rb#2739 sig { returns(T::Boolean) } def variable_call?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2541 + # source://prism//lib/prism/node.rb#2657 sig { returns(Integer) } def flags; end @@ -2748,34 +3274,34 @@ class Prism::CallNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2709 + # source://prism//lib/prism/node.rb#2828 def type; end end end # Flags for call nodes. # -# source://prism//lib/prism/node.rb#19253 +# source://prism//lib/prism/node.rb#20349 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 +# source://prism//lib/prism/node.rb#20357 Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) # a call that ignores method visibility # -# source://prism//lib/prism/node.rb#19264 +# source://prism//lib/prism/node.rb#20360 Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) # &. operator # -# source://prism//lib/prism/node.rb#19255 +# source://prism//lib/prism/node.rb#20351 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 +# source://prism//lib/prism/node.rb#20354 Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # Represents the use of an assignment operator on a call. @@ -2783,126 +3309,162 @@ Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # foo.bar += baz # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2718 +# source://prism//lib/prism/node.rb#2852 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 + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol operator, Location operator_loc, Prism::node value, Location location) -> void # # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#2720 + # source://prism//lib/prism/node.rb#2854 + sig do + params( + source: Prism::Source, + 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: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location); 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#3039 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2736 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#2870 + 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#2844 + # source://prism//lib/prism/node.rb#2968 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2854 + # source://prism//lib/prism/node.rb#2978 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2791 + # source://prism//lib/prism/node.rb#2913 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)]) } + # source://prism//lib/prism/node.rb#2875 + 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#2754 + # source://prism//lib/prism/node.rb#2888 + 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#2746 + # source://prism//lib/prism/node.rb#2880 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> CallOperatorWriteNode + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#2759 - sig { params(params: T.untyped).returns(Prism::CallOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#2893 + sig do + params( + 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: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::CallOperatorWriteNode) + end + def copy(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: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#2875 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#2901 + 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#2849 + # source://prism//lib/prism/node.rb#2973 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#2864 + # source://prism//lib/prism/node.rb#2988 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2859 + # source://prism//lib/prism/node.rb#2983 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2803 + # source://prism//lib/prism/node.rb#2926 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#2821 + # source://prism//lib/prism/node.rb#2945 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2824 + # source://prism//lib/prism/node.rb#2948 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2815 + # source://prism//lib/prism/node.rb#2939 sig { returns(Symbol) } def read_name; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2788 + # source://prism//lib/prism/node.rb#2910 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2910,7 +3472,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2834 + # source://prism//lib/prism/node.rb#2958 sig { returns(T::Boolean) } def safe_navigation?; end @@ -2929,12 +3491,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#2899 + # source://prism//lib/prism/node.rb#3023 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2830 + # source://prism//lib/prism/node.rb#2955 sig { returns(Prism::Node) } def value; end @@ -2942,21 +3505,21 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2839 + # source://prism//lib/prism/node.rb#2963 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2818 + # source://prism//lib/prism/node.rb#2942 sig { returns(Symbol) } def write_name; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2784 + # source://prism//lib/prism/node.rb#2906 sig { returns(Integer) } def flags; end @@ -2968,7 +3531,7 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#2909 + # source://prism//lib/prism/node.rb#3033 def type; end end end @@ -2978,126 +3541,160 @@ end # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2918 +# source://prism//lib/prism/node.rb#3057 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 + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void # # @return [CallOrWriteNode] a new instance of CallOrWriteNode # - # source://prism//lib/prism/node.rb#2920 + # source://prism//lib/prism/node.rb#3059 + sig do + params( + source: Prism::Source, + 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, + location: Prism::Location + ).void + end def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); 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#3244 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2935 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3074 + 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#3039 + # source://prism//lib/prism/node.rb#3169 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#3049 + # source://prism//lib/prism/node.rb#3179 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2989 + # source://prism//lib/prism/node.rb#3117 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)]) } + # source://prism//lib/prism/node.rb#3079 + 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#2953 + # source://prism//lib/prism/node.rb#3092 + 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#2945 + # source://prism//lib/prism/node.rb#3084 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> CallOrWriteNode + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOrWriteNode # - # source://prism//lib/prism/node.rb#2958 - sig { params(params: T.untyped).returns(Prism::CallOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#3097 + sig do + params( + 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, + location: Prism::Location + ).returns(Prism::CallOrWriteNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#3079 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#3105 + 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#3044 + # source://prism//lib/prism/node.rb#3174 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3064 + # source://prism//lib/prism/node.rb#3194 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://prism//lib/prism/node.rb#3054 + # source://prism//lib/prism/node.rb#3184 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#3001 + # source://prism//lib/prism/node.rb#3130 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3059 + # source://prism//lib/prism/node.rb#3189 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3019 + # source://prism//lib/prism/node.rb#3149 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#3013 + # source://prism//lib/prism/node.rb#3143 sig { returns(Symbol) } def read_name; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2986 + # source://prism//lib/prism/node.rb#3114 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3105,7 +3702,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3029 + # source://prism//lib/prism/node.rb#3159 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3124,12 +3721,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3098 + # source://prism//lib/prism/node.rb#3228 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3025 + # source://prism//lib/prism/node.rb#3156 sig { returns(Prism::Node) } def value; end @@ -3137,21 +3735,21 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3034 + # source://prism//lib/prism/node.rb#3164 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#3016 + # source://prism//lib/prism/node.rb#3146 sig { returns(Symbol) } def write_name; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#2982 + # source://prism//lib/prism/node.rb#3110 sig { returns(Integer) } def flags; end @@ -3163,7 +3761,7 @@ class Prism::CallOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3108 + # source://prism//lib/prism/node.rb#3238 def type; end end end @@ -3181,114 +3779,142 @@ end # for foo.bar in baz do end # ^^^^^^^ # -# source://prism//lib/prism/node.rb#3125 +# source://prism//lib/prism/node.rb#3269 class Prism::CallTargetNode < ::Prism::Node - # def initialize: (Integer flags, Node receiver, Location call_operator_loc, Symbol name, Location message_loc, Location location) -> void + # def initialize: (Integer flags, Prism::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 + # source://prism//lib/prism/node.rb#3271 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, receiver, call_operator_loc, name, message_loc, location); 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#3412 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3139 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3283 + 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#3213 + # source://prism//lib/prism/node.rb#3350 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String # - # source://prism//lib/prism/node.rb#3223 + # source://prism//lib/prism/node.rb#3360 sig { returns(String) } def call_operator; end # attr_reader call_operator_loc: Location # - # source://prism//lib/prism/node.rb#3187 + # source://prism//lib/prism/node.rb#3323 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)]) } + # source://prism//lib/prism/node.rb#3288 + 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#3154 + # source://prism//lib/prism/node.rb#3298 + 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#3149 + # source://prism//lib/prism/node.rb#3293 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> CallTargetNode + # def copy: (?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location, ?location: Location) -> CallTargetNode # - # source://prism//lib/prism/node.rb#3159 - sig { params(params: T.untyped).returns(Prism::CallTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#3303 + sig do + params( + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + message_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CallTargetNode) + end + def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#3288 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::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 + # source://prism//lib/prism/node.rb#3311 + 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#3218 + # source://prism//lib/prism/node.rb#3355 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3233 + # source://prism//lib/prism/node.rb#3370 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def message: () -> String # - # source://prism//lib/prism/node.rb#3228 + # source://prism//lib/prism/node.rb#3365 sig { returns(String) } def message; end # attr_reader message_loc: Location # - # source://prism//lib/prism/node.rb#3196 + # source://prism//lib/prism/node.rb#3333 sig { returns(Prism::Location) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3193 + # source://prism//lib/prism/node.rb#3330 sig { returns(Symbol) } def name; end - # attr_reader receiver: Node + # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#3184 + # source://prism//lib/prism/node.rb#3320 sig { returns(Prism::Node) } def receiver; end @@ -3296,7 +3922,7 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3203 + # source://prism//lib/prism/node.rb#3340 sig { returns(T::Boolean) } def safe_navigation?; end @@ -3315,22 +3941,23 @@ class Prism::CallTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3259 + # source://prism//lib/prism/node.rb#3396 + sig { override.returns(Symbol) } def type; end # def variable_call?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3208 + # source://prism//lib/prism/node.rb#3345 sig { returns(T::Boolean) } def variable_call?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#3180 + # source://prism//lib/prism/node.rb#3316 sig { returns(Integer) } def flags; end @@ -3342,7 +3969,7 @@ class Prism::CallTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3269 + # source://prism//lib/prism/node.rb#3406 def type; end end end @@ -3352,80 +3979,104 @@ end # foo => [bar => baz] # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3278 +# source://prism//lib/prism/node.rb#3426 class Prism::CapturePatternNode < ::Prism::Node - # def initialize: (Node value, Node target, Location operator_loc, Location location) -> void + # def initialize: (Prism::node value, Prism::node target, Location operator_loc, Location location) -> void # # @return [CapturePatternNode] a new instance of CapturePatternNode # - # source://prism//lib/prism/node.rb#3280 + # source://prism//lib/prism/node.rb#3428 + sig do + params( + source: Prism::Source, + value: Prism::Node, + target: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, value, target, operator_loc, location); 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#3529 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3290 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3438 + 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#3295 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#3443 + 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#3305 + # source://prism//lib/prism/node.rb#3453 + 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#3300 + # source://prism//lib/prism/node.rb#3448 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> CapturePatternNode + # def copy: (?value: Prism::node, ?target: Prism::node, ?operator_loc: Location, ?location: Location) -> CapturePatternNode # - # source://prism//lib/prism/node.rb#3310 - sig { params(params: T.untyped).returns(Prism::CapturePatternNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#3458 + sig do + params( + value: Prism::Node, + target: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CapturePatternNode) + end + def copy(value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#3443 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, target: Prism::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 + # source://prism//lib/prism/node.rb#3466 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3347 + # source://prism//lib/prism/node.rb#3489 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3342 + # source://prism//lib/prism/node.rb#3484 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3335 + # source://prism//lib/prism/node.rb#3477 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader target: Node + # attr_reader target: Prism::node # - # source://prism//lib/prism/node.rb#3332 + # source://prism//lib/prism/node.rb#3474 sig { returns(Prism::Node) } def target; end @@ -3444,12 +4095,13 @@ class Prism::CapturePatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3371 + # source://prism//lib/prism/node.rb#3513 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3329 + # source://prism//lib/prism/node.rb#3471 sig { returns(Prism::Node) } def value; end @@ -3461,7 +4113,7 @@ class Prism::CapturePatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3381 + # source://prism//lib/prism/node.rb#3523 def type; end end end @@ -3473,104 +4125,132 @@ end # end # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3392 +# source://prism//lib/prism/node.rb#3543 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 + # def initialize: (Prism::node? predicate, Array[Prism::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 + # source://prism//lib/prism/node.rb#3545 + sig do + params( + source: Prism::Source, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); 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#3677 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3406 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3557 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3473 + # source://prism//lib/prism/node.rb#3617 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3460 + # source://prism//lib/prism/node.rb#3603 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)]) } + # source://prism//lib/prism/node.rb#3562 + 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#3425 + # source://prism//lib/prism/node.rb#3576 + 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#3416 + # source://prism//lib/prism/node.rb#3567 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader conditions: Array[Node] + # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#3454 + # source://prism//lib/prism/node.rb#3597 sig { returns(T::Array[Prism::Node]) } def conditions; end # attr_reader consequent: ElseNode? # - # source://prism//lib/prism/node.rb#3457 + # source://prism//lib/prism/node.rb#3600 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end - # def copy: (**params) -> CaseMatchNode + # def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseMatchNode # - # source://prism//lib/prism/node.rb#3430 - sig { params(params: T.untyped).returns(Prism::CaseMatchNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#3581 + sig do + params( + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CaseMatchNode) + end + def copy(predicate: T.unsafe(nil), conditions: T.unsafe(nil), consequent: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#3562 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::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 + # source://prism//lib/prism/node.rb#3589 + 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#3478 + # source://prism//lib/prism/node.rb#3622 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3466 + # source://prism//lib/prism/node.rb#3610 sig { returns(Prism::Location) } def end_keyword_loc; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3483 + # source://prism//lib/prism/node.rb#3627 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader predicate: Node? + # attr_reader predicate: Prism::node? # - # source://prism//lib/prism/node.rb#3451 + # source://prism//lib/prism/node.rb#3594 sig { returns(T.nilable(Prism::Node)) } def predicate; end @@ -3589,7 +4269,8 @@ class Prism::CaseMatchNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3517 + # source://prism//lib/prism/node.rb#3661 + sig { override.returns(Symbol) } def type; end class << self @@ -3600,7 +4281,7 @@ class Prism::CaseMatchNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3527 + # source://prism//lib/prism/node.rb#3671 def type; end end end @@ -3612,104 +4293,132 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3538 +# source://prism//lib/prism/node.rb#3694 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 + # def initialize: (Prism::node? predicate, Array[Prism::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 + # source://prism//lib/prism/node.rb#3696 + sig do + params( + source: Prism::Source, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); 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#3828 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3552 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3708 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3619 + # source://prism//lib/prism/node.rb#3768 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3606 + # source://prism//lib/prism/node.rb#3754 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)]) } + # source://prism//lib/prism/node.rb#3713 + 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#3571 + # source://prism//lib/prism/node.rb#3727 + 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#3562 + # source://prism//lib/prism/node.rb#3718 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader conditions: Array[Node] + # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#3600 + # source://prism//lib/prism/node.rb#3748 sig { returns(T::Array[Prism::Node]) } def conditions; end # attr_reader consequent: ElseNode? # - # source://prism//lib/prism/node.rb#3603 + # source://prism//lib/prism/node.rb#3751 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end - # def copy: (**params) -> CaseNode + # def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseNode # - # source://prism//lib/prism/node.rb#3576 - sig { params(params: T.untyped).returns(Prism::CaseNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#3732 + sig do + params( + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::Node], + consequent: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::CaseNode) + end + def copy(predicate: T.unsafe(nil), conditions: T.unsafe(nil), consequent: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#3713 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::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 + # source://prism//lib/prism/node.rb#3740 + 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#3624 + # source://prism//lib/prism/node.rb#3773 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3612 + # source://prism//lib/prism/node.rb#3761 sig { returns(Prism::Location) } def end_keyword_loc; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3629 + # source://prism//lib/prism/node.rb#3778 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader predicate: Node? + # attr_reader predicate: Prism::node? # - # source://prism//lib/prism/node.rb#3597 + # source://prism//lib/prism/node.rb#3745 sig { returns(T.nilable(Prism::Node)) } def predicate; end @@ -3728,7 +4437,8 @@ class Prism::CaseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3663 + # source://prism//lib/prism/node.rb#3812 + sig { override.returns(Symbol) } def type; end class << self @@ -3739,7 +4449,7 @@ class Prism::CaseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3673 + # source://prism//lib/prism/node.rb#3822 def type; end end end @@ -3749,128 +4459,162 @@ end # class Foo end # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3682 +# source://prism//lib/prism/node.rb#3843 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 + # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Prism::node constant_path, Location? inheritance_operator_loc, Prism::node? superclass, Prism::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 + # source://prism//lib/prism/node.rb#3845 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: Prism::Node, + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).void + end def initialize(source, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); 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#4008 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3699 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#3860 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Node? + # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#3774 + # source://prism//lib/prism/node.rb#3926 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)]) } + # source://prism//lib/prism/node.rb#3865 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#3787 + # source://prism//lib/prism/node.rb#3939 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3750 + # source://prism//lib/prism/node.rb#3900 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3718 + # source://prism//lib/prism/node.rb#3879 + 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#3709 + # source://prism//lib/prism/node.rb#3870 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant_path: Node + # attr_reader constant_path: Prism::node # - # source://prism//lib/prism/node.rb#3756 + # source://prism//lib/prism/node.rb#3907 sig { returns(Prism::Node) } def constant_path; end - # def copy: (**params) -> ClassNode + # def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: Prism::node, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ClassNode # - # source://prism//lib/prism/node.rb#3723 - sig { params(params: T.untyped).returns(Prism::ClassNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#3884 + sig do + params( + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: Prism::Node, + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).returns(Prism::ClassNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#3865 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, constant_path: Prism::node, inheritance_operator_loc: Location?, superclass: Prism::node?, body: Prism::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 + # source://prism//lib/prism/node.rb#3892 + 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#3797 + # source://prism//lib/prism/node.rb#3949 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3777 + # source://prism//lib/prism/node.rb#3929 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#3792 + # source://prism//lib/prism/node.rb#3944 sig { returns(T.nilable(String)) } def inheritance_operator; end # attr_reader inheritance_operator_loc: Location? # - # source://prism//lib/prism/node.rb#3759 + # source://prism//lib/prism/node.rb#3910 sig { returns(T.nilable(Prism::Location)) } def inheritance_operator_loc; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3802 + # source://prism//lib/prism/node.rb#3954 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#3747 + # source://prism//lib/prism/node.rb#3897 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3783 + # source://prism//lib/prism/node.rb#3936 sig { returns(Symbol) } def name; end - # attr_reader superclass: Node? + # attr_reader superclass: Prism::node? # - # source://prism//lib/prism/node.rb#3771 + # source://prism//lib/prism/node.rb#3923 sig { returns(T.nilable(Prism::Node)) } def superclass; end @@ -3889,7 +4633,8 @@ class Prism::ClassNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3840 + # source://prism//lib/prism/node.rb#3992 + sig { override.returns(Symbol) } def type; end class << self @@ -3900,7 +4645,7 @@ class Prism::ClassNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3850 + # source://prism//lib/prism/node.rb#4002 def type; end end end @@ -3910,89 +4655,115 @@ end # @@target &&= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3859 +# source://prism//lib/prism/node.rb#4026 class Prism::ClassVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#3861 + # source://prism//lib/prism/node.rb#4028 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, operator_loc, value, location); 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#4137 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3872 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4039 + 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#3877 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4044 + 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#3887 + # source://prism//lib/prism/node.rb#4054 + 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#3882 + # source://prism//lib/prism/node.rb#4049 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ClassVariableAndWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#3892 - sig { params(params: T.untyped).returns(Prism::ClassVariableAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4059 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ClassVariableAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#4044 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#4067 + 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#125 + # source://prism//lib/prism/desugar_compiler.rb#127 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#3936 + # source://prism//lib/prism/node.rb#4097 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3912 + # source://prism//lib/prism/node.rb#4072 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#3915 + # source://prism//lib/prism/node.rb#4075 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3931 + # source://prism//lib/prism/node.rb#4092 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3921 + # source://prism//lib/prism/node.rb#4082 sig { returns(Prism::Location) } def operator_loc; end @@ -4011,12 +4782,13 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#3960 + # source://prism//lib/prism/node.rb#4121 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3927 + # source://prism//lib/prism/node.rb#4089 sig { returns(Prism::Node) } def value; end @@ -4028,7 +4800,7 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#3970 + # source://prism//lib/prism/node.rb#4131 def type; end end end @@ -4038,89 +4810,117 @@ end # @@target += value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3979 +# source://prism//lib/prism/node.rb#4150 class Prism::ClassVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#3981 + # source://prism//lib/prism/node.rb#4152 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, operator_loc, value, operator, location); 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#4261 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3993 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4164 + 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#3998 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4169 + 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#4008 + # source://prism//lib/prism/node.rb#4179 + 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#4003 + # source://prism//lib/prism/node.rb#4174 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ClassVariableOperatorWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#4013 - sig { params(params: T.untyped).returns(Prism::ClassVariableOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4184 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).returns(Prism::ClassVariableOperatorWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), operator: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#4169 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#4192 + 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#137 + # source://prism//lib/prism/desugar_compiler.rb#139 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4056 + # source://prism//lib/prism/node.rb#4220 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4034 + # source://prism//lib/prism/node.rb#4197 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4037 + # source://prism//lib/prism/node.rb#4200 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#4052 + # source://prism//lib/prism/node.rb#4217 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4043 + # source://prism//lib/prism/node.rb#4207 sig { returns(Prism::Location) } def operator_loc; end @@ -4139,12 +4939,13 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4081 + # source://prism//lib/prism/node.rb#4245 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4049 + # source://prism//lib/prism/node.rb#4214 sig { returns(Prism::Node) } def value; end @@ -4156,7 +4957,7 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4091 + # source://prism//lib/prism/node.rb#4255 def type; end end end @@ -4166,89 +4967,115 @@ end # @@target ||= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4100 +# source://prism//lib/prism/node.rb#4275 class Prism::ClassVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::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 - + # source://prism//lib/prism/node.rb#4277 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(source, name, name_loc, operator_loc, value, location); 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#4386 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4113 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4288 + 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#4118 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4293 + 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#4128 + # source://prism//lib/prism/node.rb#4303 + 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#4123 + # source://prism//lib/prism/node.rb#4298 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ClassVariableOrWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableOrWriteNode # - # source://prism//lib/prism/node.rb#4133 - sig { params(params: T.untyped).returns(Prism::ClassVariableOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4308 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ClassVariableOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#4293 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#4316 + 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#131 + # source://prism//lib/prism/desugar_compiler.rb#133 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4177 + # source://prism//lib/prism/node.rb#4346 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4153 + # source://prism//lib/prism/node.rb#4321 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4156 + # source://prism//lib/prism/node.rb#4324 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4172 + # source://prism//lib/prism/node.rb#4341 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4162 + # source://prism//lib/prism/node.rb#4331 sig { returns(Prism::Location) } def operator_loc; end @@ -4267,12 +5094,13 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4201 + # source://prism//lib/prism/node.rb#4370 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4168 + # source://prism//lib/prism/node.rb#4338 sig { returns(Prism::Node) } def value; end @@ -4284,7 +5112,7 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4211 + # source://prism//lib/prism/node.rb#4380 def type; end end end @@ -4294,63 +5122,72 @@ end # @@foo # ^^^^^ # -# source://prism//lib/prism/node.rb#4220 +# source://prism//lib/prism/node.rb#4399 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 + # source://prism//lib/prism/node.rb#4401 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); 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#4485 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4230 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4409 + 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#4235 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4414 + 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#4245 + # source://prism//lib/prism/node.rb#4424 + 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#4240 + # source://prism//lib/prism/node.rb#4419 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ClassVariableReadNode + # def copy: (?name: Symbol, ?location: Location) -> ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4250 - sig { params(params: T.untyped).returns(Prism::ClassVariableReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4429 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#4414 + sig { override.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 + # source://prism//lib/prism/node.rb#4437 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4275 + # source://prism//lib/prism/node.rb#4449 + sig { params(inspector: T.untyped).returns(String) } 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). @@ -4359,7 +5196,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # @@_test # name `:@@_test` # - # source://prism//lib/prism/node.rb#4271 + # source://prism//lib/prism/node.rb#4446 sig { returns(Symbol) } def name; end @@ -4378,7 +5215,8 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4295 + # source://prism//lib/prism/node.rb#4469 + sig { override.returns(Symbol) } def type; end class << self @@ -4389,7 +5227,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4305 + # source://prism//lib/prism/node.rb#4479 def type; end end end @@ -4399,68 +5237,77 @@ end # @@foo, @@bar = baz # ^^^^^ ^^^^^ # -# source://prism//lib/prism/node.rb#4314 +# source://prism//lib/prism/node.rb#4495 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 + # source://prism//lib/prism/node.rb#4497 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); 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#4577 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4324 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4505 + 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#4329 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4510 + 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#4339 + # source://prism//lib/prism/node.rb#4520 + 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#4334 + # source://prism//lib/prism/node.rb#4515 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ClassVariableTargetNode + # def copy: (?name: Symbol, ?location: Location) -> ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4344 - sig { params(params: T.untyped).returns(Prism::ClassVariableTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4525 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableTargetNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#4510 + sig { override.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 + # source://prism//lib/prism/node.rb#4533 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4365 + # source://prism//lib/prism/node.rb#4541 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4361 + # source://prism//lib/prism/node.rb#4538 sig { returns(Symbol) } def name; end @@ -4479,7 +5326,8 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4385 + # source://prism//lib/prism/node.rb#4561 + sig { override.returns(Symbol) } def type; end class << self @@ -4490,7 +5338,7 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4395 + # source://prism//lib/prism/node.rb#4571 def type; end end end @@ -4500,87 +5348,123 @@ end # @@foo = 1 # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4404 +# source://prism//lib/prism/node.rb#4587 class Prism::ClassVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node value, Location? operator_loc, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4406 + # source://prism//lib/prism/node.rb#4589 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, value, operator_loc, location); 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#4714 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4417 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4600 + 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#4422 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4605 + 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#4432 + # source://prism//lib/prism/node.rb#4615 + 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#4427 + # source://prism//lib/prism/node.rb#4610 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ClassVariableWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4437 - sig { params(params: T.untyped).returns(Prism::ClassVariableWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4620 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#4605 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#4628 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4487 + # source://prism//lib/prism/node.rb#4674 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol + # 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#4457 + # source://prism//lib/prism/node.rb#4637 sig { returns(Symbol) } def name; end - # attr_reader name_loc: Location + # The location of the variable name. + # + # @@foo = :bar + # ^^^^^ # - # source://prism//lib/prism/node.rb#4460 + # source://prism//lib/prism/node.rb#4643 sig { returns(Prism::Location) } def name_loc; end - # def operator: () -> String? + # def operator: () -> String # - # source://prism//lib/prism/node.rb#4482 - sig { returns(T.nilable(String)) } + # source://prism//lib/prism/node.rb#4669 + sig { returns(String) } def operator; end - # attr_reader operator_loc: Location? + # The location of the `=` operator. # - # source://prism//lib/prism/node.rb#4469 - sig { returns(T.nilable(Prism::Location)) } + # @@foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#4662 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -4598,12 +5482,19 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4511 + # source://prism//lib/prism/node.rb#4698 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # 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#4466 + # source://prism//lib/prism/node.rb#4656 sig { returns(Prism::Node) } def value; end @@ -4615,7 +5506,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4521 + # source://prism//lib/prism/node.rb#4708 def type; end end end @@ -4623,27 +5514,37 @@ 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 +# source://prism//lib/prism/parse_result.rb#288 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#263 + # source://prism//lib/prism/parse_result.rb#293 + 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#268 + # source://prism//lib/prism/parse_result.rb#298 + 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#260 + # source://prism//lib/prism/parse_result.rb#290 sig { returns(Prism::Location) } def location; end - sig { returns(T::Boolean) } + # Returns the content of the comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#303 + sig { returns(String) } + def slice; end + + sig { abstract.returns(T::Boolean) } def trailing?; end end @@ -4664,910 +5565,927 @@ end # Prism.parse("1 + 2").value.accept(SExpressions.new) # # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] # -# source://prism//lib/prism/compiler.rb#26 -class Prism::Compiler +# source://prism//lib/prism/compiler.rb#27 +class Prism::Compiler < ::Prism::Visitor # Visit an individual node. # - # source://prism//lib/prism/compiler.rb#28 + # source://prism//lib/prism/compiler.rb#29 + sig { params(node: T.nilable(Prism::Node)).returns(T.nilable(Result)) } def visit(node); end # Visit the child nodes of the given node. # Compile a AliasGlobalVariableNode node # - # source://prism//lib/prism/compiler.rb#38 + # 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#38 + # 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#33 + # source://prism//lib/prism/compiler.rb#34 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).returns(T::Array[T.nilable(Result)]) } def visit_all(nodes); end # Visit the child nodes of the given node. # Compile a AlternationPatternNode node # - # source://prism//lib/prism/compiler.rb#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # source://prism//lib/prism/compiler.rb#39 + sig { params(node: Prism::Node).returns(T::Array[T.nilable(Result)]) } 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 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # 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#38 + # source://prism//lib/prism/compiler.rb#39 def visit_yield_node(node); end + + Result = type_member end # Represents the use of the `&&=` operator for assignment to a constant. @@ -5575,89 +6493,115 @@ end # Target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4530 +# source://prism//lib/prism/node.rb#4727 class Prism::ConstantAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4532 + # source://prism//lib/prism/node.rb#4729 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, operator_loc, value, location); 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#4838 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4543 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4740 + 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#4548 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4745 + 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#4558 + # source://prism//lib/prism/node.rb#4755 + 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#4553 + # source://prism//lib/prism/node.rb#4750 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantAndWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4563 - sig { params(params: T.untyped).returns(Prism::ConstantAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4760 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#4745 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#4768 + 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#143 + # source://prism//lib/prism/desugar_compiler.rb#145 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4607 + # source://prism//lib/prism/node.rb#4798 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4583 + # source://prism//lib/prism/node.rb#4773 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4586 + # source://prism//lib/prism/node.rb#4776 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4602 + # source://prism//lib/prism/node.rb#4793 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4592 + # source://prism//lib/prism/node.rb#4783 sig { returns(Prism::Location) } def operator_loc; end @@ -5676,12 +6620,13 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4631 + # source://prism//lib/prism/node.rb#4822 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4598 + # source://prism//lib/prism/node.rb#4790 sig { returns(Prism::Node) } def value; end @@ -5693,7 +6638,7 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4641 + # source://prism//lib/prism/node.rb#4832 def type; end end end @@ -5703,89 +6648,117 @@ end # Target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4650 +# source://prism//lib/prism/node.rb#4851 class Prism::ConstantOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#4652 + # source://prism//lib/prism/node.rb#4853 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, operator_loc, value, operator, location); 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#4962 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4664 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4865 + 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#4669 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4870 + 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#4679 + # source://prism//lib/prism/node.rb#4880 + 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#4674 + # source://prism//lib/prism/node.rb#4875 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantOperatorWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#4684 - sig { params(params: T.untyped).returns(Prism::ConstantOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#4885 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).returns(Prism::ConstantOperatorWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), operator: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#4870 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#4893 + 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#155 + # source://prism//lib/prism/desugar_compiler.rb#157 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4727 + # source://prism//lib/prism/node.rb#4921 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4705 + # source://prism//lib/prism/node.rb#4898 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4708 + # source://prism//lib/prism/node.rb#4901 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#4723 + # source://prism//lib/prism/node.rb#4918 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4714 + # source://prism//lib/prism/node.rb#4908 sig { returns(Prism::Location) } def operator_loc; end @@ -5804,12 +6777,13 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4752 + # source://prism//lib/prism/node.rb#4946 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4720 + # source://prism//lib/prism/node.rb#4915 sig { returns(Prism::Node) } def value; end @@ -5821,7 +6795,7 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4762 + # source://prism//lib/prism/node.rb#4956 def type; end end end @@ -5831,89 +6805,115 @@ end # Target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4771 +# source://prism//lib/prism/node.rb#4976 class Prism::ConstantOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#4773 + # source://prism//lib/prism/node.rb#4978 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, operator_loc, value, location); 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#5087 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4784 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#4989 + 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#4789 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#4994 + 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#4799 + # source://prism//lib/prism/node.rb#5004 + 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#4794 + # source://prism//lib/prism/node.rb#4999 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantOrWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#4804 - sig { params(params: T.untyped).returns(Prism::ConstantOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5009 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#4994 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#5017 + 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#149 + # source://prism//lib/prism/desugar_compiler.rb#151 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4848 + # source://prism//lib/prism/node.rb#5047 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4824 + # source://prism//lib/prism/node.rb#5022 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4827 + # source://prism//lib/prism/node.rb#5025 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4843 + # source://prism//lib/prism/node.rb#5042 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4833 + # source://prism//lib/prism/node.rb#5032 sig { returns(Prism::Location) } def operator_loc; end @@ -5932,12 +6932,13 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4872 + # source://prism//lib/prism/node.rb#5071 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4839 + # source://prism//lib/prism/node.rb#5039 sig { returns(Prism::Node) } def value; end @@ -5949,7 +6950,7 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4882 + # source://prism//lib/prism/node.rb#5081 def type; end end end @@ -5959,80 +6960,104 @@ end # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4891 +# source://prism//lib/prism/node.rb#5100 class Prism::ConstantPathAndWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void + # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#4893 + # source://prism//lib/prism/node.rb#5102 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, target, operator_loc, value, location); 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#5203 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4903 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5112 + 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#4908 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5117 + 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#4918 + # source://prism//lib/prism/node.rb#5127 + 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#4913 + # source://prism//lib/prism/node.rb#5122 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantPathAndWriteNode + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#4923 - sig { params(params: T.untyped).returns(Prism::ConstantPathAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5132 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantPathAndWriteNode) + end + def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#5117 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#5140 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#4960 + # source://prism//lib/prism/node.rb#5163 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4955 + # source://prism//lib/prism/node.rb#5158 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4945 + # source://prism//lib/prism/node.rb#5148 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#4942 + # source://prism//lib/prism/node.rb#5145 sig { returns(Prism::ConstantPathNode) } def target; end @@ -6051,12 +7076,13 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#4984 + # source://prism//lib/prism/node.rb#5187 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4951 + # source://prism//lib/prism/node.rb#5155 sig { returns(Prism::Node) } def value; end @@ -6068,7 +7094,7 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#4994 + # source://prism//lib/prism/node.rb#5197 def type; end end end @@ -6078,97 +7104,148 @@ end # Foo::Bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5003 +# source://prism//lib/prism/node.rb#5215 class Prism::ConstantPathNode < ::Prism::Node - # def initialize: (Node? parent, Node child, Location delimiter_loc, Location location) -> void + # def initialize: (Prism::node? parent, ConstantReadNode | MissingNode child, Location delimiter_loc, Location location) -> void # # @return [ConstantPathNode] a new instance of ConstantPathNode # - # source://prism//lib/prism/node.rb#5005 + # source://prism//lib/prism/node.rb#5217 + sig do + params( + source: Prism::Source, + parent: T.nilable(Prism::Node), + child: T.any(Prism::ConstantReadNode, Prism::MissingNode), + delimiter_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, parent, child, delimiter_loc, location); 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#5350 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5015 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5227 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader child: Node + # The right-hand node of the path. Always a `ConstantReadNode` in a + # valid Ruby syntax tree. # - # source://prism//lib/prism/node.rb#5060 - sig { returns(Prism::Node) } + # ::Foo + # ^^^ + # + # self::Test + # ^^^^ + # + # a.b::C + # ^ + # + # source://prism//lib/prism/node.rb#5285 + sig { returns(T.any(Prism::ConstantReadNode, Prism::MissingNode)) } def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5020 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5232 + 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#5033 + # source://prism//lib/prism/node.rb#5245 + 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#5025 + # source://prism//lib/prism/node.rb#5237 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantPathNode + # def copy: (?parent: Prism::node?, ?child: ConstantReadNode | MissingNode, ?delimiter_loc: Location, ?location: Location) -> ConstantPathNode # - # source://prism//lib/prism/node.rb#5038 - sig { params(params: T.untyped).returns(Prism::ConstantPathNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5250 + sig do + params( + parent: T.nilable(Prism::Node), + child: T.any(Prism::ConstantReadNode, Prism::MissingNode), + delimiter_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ConstantPathNode) + end + def copy(parent: T.unsafe(nil), child: T.unsafe(nil), delimiter_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#5232 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, child: ConstantReadNode | MissingNode, 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 + # source://prism//lib/prism/node.rb#5258 + 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#5070 + # source://prism//lib/prism/node.rb#5301 sig { returns(String) } def delimiter; end - # attr_reader delimiter_loc: Location + # The location of the `::` delimiter. # - # source://prism//lib/prism/node.rb#5063 + # ::Foo + # ^^ + # + # One::Two + # ^^ + # + # source://prism//lib/prism/node.rb#5294 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#129 + # source://prism//lib/prism/node_ext.rb#162 + 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#112 + # source://prism//lib/prism/node_ext.rb#141 + sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5075 + # source://prism//lib/prism/node.rb#5306 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader parent: Node? + # 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#5057 + # source://prism//lib/prism/node.rb#5272 sig { returns(T.nilable(Prism::Node)) } def parent; end @@ -6187,7 +7264,8 @@ class Prism::ConstantPathNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5103 + # source://prism//lib/prism/node.rb#5334 + sig { override.returns(Symbol) } def type; end class << self @@ -6198,7 +7276,7 @@ class Prism::ConstantPathNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5113 + # source://prism//lib/prism/node.rb#5344 def type; end end end @@ -6210,88 +7288,121 @@ end # var::Bar::Baz -> raises because the first part of the constant path is a # local variable # -# source://prism//lib/prism/node_ext.rb#108 +# source://prism//lib/prism/node_ext.rb#132 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#137 +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#5122 +# source://prism//lib/prism/node.rb#5362 class Prism::ConstantPathOperatorWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Symbol operator, Location location) -> void + # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5124 + # source://prism//lib/prism/node.rb#5364 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).void + end def initialize(source, target, operator_loc, value, operator, location); 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#5465 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5135 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5375 + 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#5140 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5380 + 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#5150 + # source://prism//lib/prism/node.rb#5390 + 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#5145 + # source://prism//lib/prism/node.rb#5385 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantPathOperatorWriteNode + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5155 - sig { params(params: T.untyped).returns(Prism::ConstantPathOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5395 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).returns(Prism::ConstantPathOperatorWriteNode) + end + def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), operator: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#5380 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#5403 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5191 + # source://prism//lib/prism/node.rb#5424 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#5187 + # source://prism//lib/prism/node.rb#5421 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5178 + # source://prism//lib/prism/node.rb#5411 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5175 + # source://prism//lib/prism/node.rb#5408 sig { returns(Prism::ConstantPathNode) } def target; end @@ -6310,12 +7421,13 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5216 + # source://prism//lib/prism/node.rb#5449 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5184 + # source://prism//lib/prism/node.rb#5418 sig { returns(Prism::Node) } def value; end @@ -6327,7 +7439,7 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5226 + # source://prism//lib/prism/node.rb#5459 def type; end end end @@ -6337,80 +7449,104 @@ end # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5235 +# source://prism//lib/prism/node.rb#5478 class Prism::ConstantPathOrWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void + # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5237 + # source://prism//lib/prism/node.rb#5480 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, target, operator_loc, value, location); 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#5581 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5247 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5490 + 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#5252 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5495 + 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#5262 + # source://prism//lib/prism/node.rb#5505 + 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#5257 + # source://prism//lib/prism/node.rb#5500 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantPathOrWriteNode + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5267 - sig { params(params: T.untyped).returns(Prism::ConstantPathOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5510 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantPathOrWriteNode) + end + def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#5495 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#5518 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5304 + # source://prism//lib/prism/node.rb#5541 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5299 + # source://prism//lib/prism/node.rb#5536 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5289 + # 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#5286 + # source://prism//lib/prism/node.rb#5523 sig { returns(Prism::ConstantPathNode) } def target; end @@ -6429,12 +7565,13 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5328 + # source://prism//lib/prism/node.rb#5565 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5295 + # source://prism//lib/prism/node.rb#5533 sig { returns(Prism::Node) } def value; end @@ -6446,7 +7583,7 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5338 + # source://prism//lib/prism/node.rb#5575 def type; end end end @@ -6456,97 +7593,123 @@ end # Foo::Foo, Bar::Bar = baz # ^^^^^^^^ ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5347 +# source://prism//lib/prism/node.rb#5593 class Prism::ConstantPathTargetNode < ::Prism::Node - # def initialize: (Node? parent, Node child, Location delimiter_loc, Location location) -> void + # def initialize: (Prism::node? parent, ConstantReadNode | MissingNode child, Location delimiter_loc, Location location) -> void # # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5349 + # source://prism//lib/prism/node.rb#5595 + sig do + params( + source: Prism::Source, + parent: T.nilable(Prism::Node), + child: T.any(Prism::ConstantReadNode, Prism::MissingNode), + delimiter_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, parent, child, delimiter_loc, location); 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#5703 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5359 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5605 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader child: Node + # attr_reader child: ConstantReadNode | MissingNode # - # source://prism//lib/prism/node.rb#5404 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#5644 + sig { returns(T.any(Prism::ConstantReadNode, Prism::MissingNode)) } def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5364 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5610 + 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#5377 + # source://prism//lib/prism/node.rb#5623 + 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#5369 + # source://prism//lib/prism/node.rb#5615 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantPathTargetNode + # def copy: (?parent: Prism::node?, ?child: ConstantReadNode | MissingNode, ?delimiter_loc: Location, ?location: Location) -> ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5382 - sig { params(params: T.untyped).returns(Prism::ConstantPathTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5628 + sig do + params( + parent: T.nilable(Prism::Node), + child: T.any(Prism::ConstantReadNode, Prism::MissingNode), + delimiter_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ConstantPathTargetNode) + end + def copy(parent: T.unsafe(nil), child: T.unsafe(nil), delimiter_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#5610 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, child: ConstantReadNode | MissingNode, 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 + # source://prism//lib/prism/node.rb#5636 + 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#5414 + # source://prism//lib/prism/node.rb#5654 sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://prism//lib/prism/node.rb#5407 + # source://prism//lib/prism/node.rb#5647 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#152 + # source://prism//lib/prism/node_ext.rb#190 + 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#137 + # source://prism//lib/prism/node_ext.rb#170 + sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5419 + # source://prism//lib/prism/node.rb#5659 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader parent: Node? + # attr_reader parent: Prism::node? # - # source://prism//lib/prism/node.rb#5401 + # source://prism//lib/prism/node.rb#5641 sig { returns(T.nilable(Prism::Node)) } def parent; end @@ -6565,7 +7728,8 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5447 + # source://prism//lib/prism/node.rb#5687 + sig { override.returns(Symbol) } def type; end class << self @@ -6576,7 +7740,7 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5457 + # source://prism//lib/prism/node.rb#5697 def type; end end end @@ -6592,80 +7756,113 @@ end # ::Foo::Bar = 1 # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5472 +# source://prism//lib/prism/node.rb#5721 class Prism::ConstantPathWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Node value, Location location) -> void + # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void # # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5474 + # source://prism//lib/prism/node.rb#5723 + sig do + params( + source: Prism::Source, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, target, operator_loc, value, location); end - # def accept: (Visitor visitor) -> void + # 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#5484 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5836 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5733 + 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#5489 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5738 + 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#5499 + # source://prism//lib/prism/node.rb#5748 + 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#5494 + # source://prism//lib/prism/node.rb#5743 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantPathWriteNode + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5504 - sig { params(params: T.untyped).returns(Prism::ConstantPathWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5753 + sig do + params( + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::ConstantPathWriteNode) + end + def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#5738 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#5761 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5541 + # source://prism//lib/prism/node.rb#5796 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5536 + # source://prism//lib/prism/node.rb#5791 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the `=` operator. # - # source://prism//lib/prism/node.rb#5526 + # ::ABC = 123 + # ^ + # + # source://prism//lib/prism/node.rb#5778 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader target: ConstantPathNode + # A node representing the constant path being written to. # - # source://prism//lib/prism/node.rb#5523 + # Foo::Bar = 1 + # ^^^^^^^^ + # + # ::Foo = :abc + # ^^^^^ + # + # source://prism//lib/prism/node.rb#5772 sig { returns(Prism::ConstantPathNode) } def target; end @@ -6684,12 +7881,16 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5565 + # source://prism//lib/prism/node.rb#5820 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # 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#5532 + # source://prism//lib/prism/node.rb#5788 sig { returns(Prism::Node) } def value; end @@ -6701,7 +7902,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5575 + # source://prism//lib/prism/node.rb#5830 def type; end end end @@ -6711,74 +7912,85 @@ end # Foo # ^^^ # -# source://prism//lib/prism/node.rb#5584 +# source://prism//lib/prism/node.rb#5848 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 + # source://prism//lib/prism/node.rb#5850 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); 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#5934 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5594 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5858 + 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#5599 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5863 + 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#5609 + # source://prism//lib/prism/node.rb#5873 + 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#5604 + # source://prism//lib/prism/node.rb#5868 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantReadNode + # def copy: (?name: Symbol, ?location: Location) -> ConstantReadNode # - # source://prism//lib/prism/node.rb#5614 - sig { params(params: T.untyped).returns(Prism::ConstantReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5878 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#5863 + sig { override.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 + # source://prism//lib/prism/node.rb#5886 + 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#96 + # source://prism//lib/prism/node_ext.rb#107 + 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#91 + # source://prism//lib/prism/node_ext.rb#102 + sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5639 + # source://prism//lib/prism/node.rb#5898 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). @@ -6787,7 +7999,7 @@ class Prism::ConstantReadNode < ::Prism::Node # # SOME_CONSTANT # name `:SOME_CONSTANT` # - # source://prism//lib/prism/node.rb#5635 + # source://prism//lib/prism/node.rb#5895 sig { returns(Symbol) } def name; end @@ -6806,7 +8018,8 @@ class Prism::ConstantReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5659 + # source://prism//lib/prism/node.rb#5918 + sig { override.returns(Symbol) } def type; end class << self @@ -6817,7 +8030,7 @@ class Prism::ConstantReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5669 + # source://prism//lib/prism/node.rb#5928 def type; end end end @@ -6827,79 +8040,90 @@ end # Foo, Bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#5678 +# source://prism//lib/prism/node.rb#5944 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 + # source://prism//lib/prism/node.rb#5946 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); 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#6026 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5688 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#5954 + 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#5693 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#5959 + 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#5703 + # source://prism//lib/prism/node.rb#5969 + 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#5698 + # source://prism//lib/prism/node.rb#5964 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantTargetNode + # def copy: (?name: Symbol, ?location: Location) -> ConstantTargetNode # - # source://prism//lib/prism/node.rb#5708 - sig { params(params: T.untyped).returns(Prism::ConstantTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#5974 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantTargetNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#5959 + sig { override.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 + # source://prism//lib/prism/node.rb#5982 + 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#165 + # source://prism//lib/prism/node_ext.rb#203 + 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#160 + # source://prism//lib/prism/node_ext.rb#198 + sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5729 + # source://prism//lib/prism/node.rb#5990 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5725 + # source://prism//lib/prism/node.rb#5987 sig { returns(Symbol) } def name; end @@ -6918,7 +8142,8 @@ class Prism::ConstantTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5749 + # source://prism//lib/prism/node.rb#6010 + sig { override.returns(Symbol) } def type; end class << self @@ -6929,7 +8154,7 @@ class Prism::ConstantTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5759 + # source://prism//lib/prism/node.rb#6020 def type; end end end @@ -6939,86 +8164,135 @@ end # Foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#5768 +# source://prism//lib/prism/node.rb#6036 class Prism::ConstantWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [ConstantWriteNode] a new instance of ConstantWriteNode # - # source://prism//lib/prism/node.rb#5770 + # source://prism//lib/prism/node.rb#6038 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, value, operator_loc, location); 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#6163 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5781 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6049 + 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#5786 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6054 + 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#5796 + # source://prism//lib/prism/node.rb#6064 + 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#5791 + # source://prism//lib/prism/node.rb#6059 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ConstantWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ConstantWriteNode # - # source://prism//lib/prism/node.rb#5801 - sig { params(params: T.untyped).returns(Prism::ConstantWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#6069 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ConstantWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#6054 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#6077 + 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#120 + 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#115 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#5845 + # source://prism//lib/prism/node.rb#6123 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol + # The name of the [constant](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#constants). # - # source://prism//lib/prism/node.rb#5821 + # Foo = :bar # name `:Foo` + # + # XYZ = 1 # name `:XYZ` + # + # source://prism//lib/prism/node.rb#6086 sig { returns(Symbol) } def name; end - # attr_reader name_loc: Location + # The location of the constant name. + # + # FOO = 1 + # ^^^ # - # source://prism//lib/prism/node.rb#5824 + # source://prism//lib/prism/node.rb#6092 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5840 + # source://prism//lib/prism/node.rb#6118 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the `=` operator. + # + # FOO = :bar + # ^ # - # source://prism//lib/prism/node.rb#5833 + # source://prism//lib/prism/node.rb#6111 sig { returns(Prism::Location) } def operator_loc; end @@ -7037,12 +8311,19 @@ class Prism::ConstantWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#5869 + # source://prism//lib/prism/node.rb#6147 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # 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 + # ^^^^ # - # source://prism//lib/prism/node.rb#5830 + # MyClass = Class.new + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#6105 sig { returns(Prism::Node) } def value; end @@ -7054,13 +8335,11 @@ class Prism::ConstantWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#5879 + # source://prism//lib/prism/node.rb#6157 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: # @@ -7070,6 +8349,7 @@ class Prism::DATAComment < Prism::Comment; end # [ # Prism::IntegerNode.new( # Prism::IntegerBaseFlags::DECIMAL, +# 1, # Prism::Location.new(source, 1, 1), # source # ) @@ -7084,7 +8364,7 @@ class Prism::DATAComment < Prism::Comment; end # source = Prism::Source.new("[1]") # # ArrayNode( -# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, Location(source, 1, 1)), source), +# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, 1, Location(source, 1, 1)), source), # Location(source, 0, 1), # Location(source, 2, 1), # source @@ -7093,753 +8373,763 @@ class Prism::DATAComment < Prism::Comment; end # 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 +# source://prism//lib/prism/dsl.rb#42 module Prism::DSL private # Create a new AliasGlobalVariableNode node # - # source://prism//lib/prism/dsl.rb#49 + # source://prism//lib/prism/dsl.rb#51 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 + # source://prism//lib/prism/dsl.rb#56 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 + # source://prism//lib/prism/dsl.rb#61 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 + # source://prism//lib/prism/dsl.rb#66 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 + # source://prism//lib/prism/dsl.rb#71 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 + # source://prism//lib/prism/dsl.rb#76 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 + # source://prism//lib/prism/dsl.rb#81 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 + # source://prism//lib/prism/dsl.rb#86 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 + # source://prism//lib/prism/dsl.rb#91 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 + # source://prism//lib/prism/dsl.rb#96 def BackReferenceReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new BeginNode node # - # source://prism//lib/prism/dsl.rb#99 + # source://prism//lib/prism/dsl.rb#101 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 + # source://prism//lib/prism/dsl.rb#106 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 + # source://prism//lib/prism/dsl.rb#111 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 + # source://prism//lib/prism/dsl.rb#116 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 + # source://prism//lib/prism/dsl.rb#121 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 + # source://prism//lib/prism/dsl.rb#126 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 + # source://prism//lib/prism/dsl.rb#131 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 + # source://prism//lib/prism/dsl.rb#136 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 + # source://prism//lib/prism/dsl.rb#141 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 + # source://prism//lib/prism/dsl.rb#146 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 + # source://prism//lib/prism/dsl.rb#151 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 + # source://prism//lib/prism/dsl.rb#156 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 + # source://prism//lib/prism/dsl.rb#161 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 + # source://prism//lib/prism/dsl.rb#166 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 + # source://prism//lib/prism/dsl.rb#171 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 + # source://prism//lib/prism/dsl.rb#176 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 + # source://prism//lib/prism/dsl.rb#181 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 + # source://prism//lib/prism/dsl.rb#186 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 + # source://prism//lib/prism/dsl.rb#191 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 + # source://prism//lib/prism/dsl.rb#196 def ClassVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableTargetNode node # - # source://prism//lib/prism/dsl.rb#199 + # source://prism//lib/prism/dsl.rb#201 def ClassVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ClassVariableWriteNode node # - # source://prism//lib/prism/dsl.rb#204 + # source://prism//lib/prism/dsl.rb#206 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 + # source://prism//lib/prism/dsl.rb#211 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 + # source://prism//lib/prism/dsl.rb#216 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 + # source://prism//lib/prism/dsl.rb#221 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 + # source://prism//lib/prism/dsl.rb#226 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 + # source://prism//lib/prism/dsl.rb#231 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 + # source://prism//lib/prism/dsl.rb#236 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 + # source://prism//lib/prism/dsl.rb#241 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 + # source://prism//lib/prism/dsl.rb#246 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 + # source://prism//lib/prism/dsl.rb#251 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 + # source://prism//lib/prism/dsl.rb#256 def ConstantReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantTargetNode node # - # source://prism//lib/prism/dsl.rb#259 + # source://prism//lib/prism/dsl.rb#261 def ConstantTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ConstantWriteNode node # - # source://prism//lib/prism/dsl.rb#264 + # source://prism//lib/prism/dsl.rb#266 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 + # source://prism//lib/prism/dsl.rb#271 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 + # source://prism//lib/prism/dsl.rb#276 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 + # source://prism//lib/prism/dsl.rb#281 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 + # source://prism//lib/prism/dsl.rb#286 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 + # source://prism//lib/prism/dsl.rb#291 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 + # source://prism//lib/prism/dsl.rb#296 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 + # source://prism//lib/prism/dsl.rb#301 def FalseNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new FindPatternNode node # - # source://prism//lib/prism/dsl.rb#304 + # source://prism//lib/prism/dsl.rb#306 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 + # source://prism//lib/prism/dsl.rb#311 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 + # source://prism//lib/prism/dsl.rb#316 + def FloatNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ForNode node # - # source://prism//lib/prism/dsl.rb#319 + # source://prism//lib/prism/dsl.rb#321 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 + # source://prism//lib/prism/dsl.rb#326 def ForwardingArgumentsNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ForwardingParameterNode node # - # source://prism//lib/prism/dsl.rb#329 + # source://prism//lib/prism/dsl.rb#331 def ForwardingParameterNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ForwardingSuperNode node # - # source://prism//lib/prism/dsl.rb#334 + # source://prism//lib/prism/dsl.rb#336 def ForwardingSuperNode(block, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableAndWriteNode node # - # source://prism//lib/prism/dsl.rb#339 + # source://prism//lib/prism/dsl.rb#341 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 + # source://prism//lib/prism/dsl.rb#346 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 + # source://prism//lib/prism/dsl.rb#351 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 + # source://prism//lib/prism/dsl.rb#356 def GlobalVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableTargetNode node # - # source://prism//lib/prism/dsl.rb#359 + # source://prism//lib/prism/dsl.rb#361 def GlobalVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new GlobalVariableWriteNode node # - # source://prism//lib/prism/dsl.rb#364 + # source://prism//lib/prism/dsl.rb#366 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 + # source://prism//lib/prism/dsl.rb#371 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 + # source://prism//lib/prism/dsl.rb#376 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 + # source://prism//lib/prism/dsl.rb#381 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 + # source://prism//lib/prism/dsl.rb#386 def ImaginaryNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ImplicitNode node # - # source://prism//lib/prism/dsl.rb#389 + # source://prism//lib/prism/dsl.rb#391 def ImplicitNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ImplicitRestNode node # - # source://prism//lib/prism/dsl.rb#394 + # source://prism//lib/prism/dsl.rb#396 def ImplicitRestNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InNode node # - # source://prism//lib/prism/dsl.rb#399 + # source://prism//lib/prism/dsl.rb#401 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 + # source://prism//lib/prism/dsl.rb#406 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 + # source://prism//lib/prism/dsl.rb#411 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 + # source://prism//lib/prism/dsl.rb#416 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 + # source://prism//lib/prism/dsl.rb#421 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 + # source://prism//lib/prism/dsl.rb#426 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 + # source://prism//lib/prism/dsl.rb#431 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 + # source://prism//lib/prism/dsl.rb#436 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 + # source://prism//lib/prism/dsl.rb#441 def InstanceVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableTargetNode node # - # source://prism//lib/prism/dsl.rb#444 + # source://prism//lib/prism/dsl.rb#446 def InstanceVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InstanceVariableWriteNode node # - # source://prism//lib/prism/dsl.rb#449 + # source://prism//lib/prism/dsl.rb#451 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 + # source://prism//lib/prism/dsl.rb#456 + def IntegerNode(flags, value, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new InterpolatedMatchLastLineNode node # - # source://prism//lib/prism/dsl.rb#459 + # source://prism//lib/prism/dsl.rb#461 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 + # source://prism//lib/prism/dsl.rb#466 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 + # source://prism//lib/prism/dsl.rb#471 + def InterpolatedStringNode(flags, 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 + # source://prism//lib/prism/dsl.rb#476 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 + # source://prism//lib/prism/dsl.rb#481 def InterpolatedXStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # Create a new ItParametersNode node + # + # source://prism//lib/prism/dsl.rb#486 + def ItParametersNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # Create a new KeywordHashNode node # - # source://prism//lib/prism/dsl.rb#484 + # source://prism//lib/prism/dsl.rb#491 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 + # source://prism//lib/prism/dsl.rb#496 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 + # source://prism//lib/prism/dsl.rb#501 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 + # source://prism//lib/prism/dsl.rb#506 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 + # source://prism//lib/prism/dsl.rb#511 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 + # source://prism//lib/prism/dsl.rb#516 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 + # source://prism//lib/prism/dsl.rb#521 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 + # source://prism//lib/prism/dsl.rb#526 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 + # source://prism//lib/prism/dsl.rb#531 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 + # source://prism//lib/prism/dsl.rb#46 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 + # source://prism//lib/prism/dsl.rb#536 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 + # source://prism//lib/prism/dsl.rb#541 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 + # source://prism//lib/prism/dsl.rb#546 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 + # source://prism//lib/prism/dsl.rb#551 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 + # source://prism//lib/prism/dsl.rb#556 def MissingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ModuleNode node # - # source://prism//lib/prism/dsl.rb#554 + # source://prism//lib/prism/dsl.rb#561 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 + # source://prism//lib/prism/dsl.rb#566 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 + # source://prism//lib/prism/dsl.rb#571 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 + # source://prism//lib/prism/dsl.rb#576 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 + # source://prism//lib/prism/dsl.rb#581 def NilNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NoKeywordsParameterNode node # - # source://prism//lib/prism/dsl.rb#579 + # source://prism//lib/prism/dsl.rb#586 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 + # source://prism//lib/prism/dsl.rb#591 def NumberedParametersNode(maximum, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new NumberedReferenceReadNode node # - # source://prism//lib/prism/dsl.rb#589 + # source://prism//lib/prism/dsl.rb#596 def NumberedReferenceReadNode(number, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new OptionalKeywordParameterNode node # - # source://prism//lib/prism/dsl.rb#594 + # source://prism//lib/prism/dsl.rb#601 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 + # source://prism//lib/prism/dsl.rb#606 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 + # source://prism//lib/prism/dsl.rb#611 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 + # source://prism//lib/prism/dsl.rb#616 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 + # source://prism//lib/prism/dsl.rb#621 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 + # source://prism//lib/prism/dsl.rb#626 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 + # source://prism//lib/prism/dsl.rb#631 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 + # source://prism//lib/prism/dsl.rb#636 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 + # source://prism//lib/prism/dsl.rb#641 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 + # source://prism//lib/prism/dsl.rb#646 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 + # source://prism//lib/prism/dsl.rb#651 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 + # source://prism//lib/prism/dsl.rb#656 def RationalNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RedoNode node # - # source://prism//lib/prism/dsl.rb#654 + # source://prism//lib/prism/dsl.rb#661 def RedoNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new RegularExpressionNode node # - # source://prism//lib/prism/dsl.rb#659 + # source://prism//lib/prism/dsl.rb#666 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 + # source://prism//lib/prism/dsl.rb#671 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 + # source://prism//lib/prism/dsl.rb#676 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 + # source://prism//lib/prism/dsl.rb#681 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 + # source://prism//lib/prism/dsl.rb#686 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 + # source://prism//lib/prism/dsl.rb#691 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 + # source://prism//lib/prism/dsl.rb#696 def RetryNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new ReturnNode node # - # source://prism//lib/prism/dsl.rb#694 + # source://prism//lib/prism/dsl.rb#701 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 + # source://prism//lib/prism/dsl.rb#706 def SelfNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # Create a new ShareableConstantNode node + # + # source://prism//lib/prism/dsl.rb#711 + def ShareableConstantNode(flags, write, source = T.unsafe(nil), location = T.unsafe(nil)); end + # Create a new SingletonClassNode node # - # source://prism//lib/prism/dsl.rb#704 + # source://prism//lib/prism/dsl.rb#716 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 + # source://prism//lib/prism/dsl.rb#721 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 + # source://prism//lib/prism/dsl.rb#726 + def SourceFileNode(flags, filepath, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SourceLineNode node # - # source://prism//lib/prism/dsl.rb#719 + # source://prism//lib/prism/dsl.rb#731 def SourceLineNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new SplatNode node # - # source://prism//lib/prism/dsl.rb#724 + # source://prism//lib/prism/dsl.rb#736 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 + # source://prism//lib/prism/dsl.rb#741 def StatementsNode(body, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new StringNode node # - # source://prism//lib/prism/dsl.rb#734 + # source://prism//lib/prism/dsl.rb#746 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 + # source://prism//lib/prism/dsl.rb#751 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 + # source://prism//lib/prism/dsl.rb#756 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 + # source://prism//lib/prism/dsl.rb#761 def TrueNode(source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new UndefNode node # - # source://prism//lib/prism/dsl.rb#754 + # source://prism//lib/prism/dsl.rb#766 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 + # source://prism//lib/prism/dsl.rb#771 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 + # source://prism//lib/prism/dsl.rb#776 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 + # source://prism//lib/prism/dsl.rb#781 + def WhenNode(keyword_loc, conditions, then_keyword_loc, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end # Create a new WhileNode node # - # source://prism//lib/prism/dsl.rb#774 + # source://prism//lib/prism/dsl.rb#786 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 + # source://prism//lib/prism/dsl.rb#791 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 + # source://prism//lib/prism/dsl.rb#796 def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end end @@ -7860,6 +9150,7 @@ module Prism::Debug def format_errors(_arg0, _arg1); end def inspect_node(_arg0); end + def integer_parse(_arg0); end def memsize(_arg0); end def named_captures(_arg0); end @@ -7882,6 +9173,7 @@ module Prism::Debug def prism_locals(source); end def profile_file(_arg0); end + def static_inspect(*_arg0); end end end @@ -7893,6 +9185,70 @@ end # source://prism//lib/prism/debug.rb#90 Prism::Debug::AnonymousLocal = T.let(T.unsafe(nil), Object) +# A wrapping around prism's internal encoding data structures. This is used +# for reflection and debugging purposes. +# +# source://prism//lib/prism/debug.rb#208 +class Prism::Debug::Encoding + # Initialize a new encoding with the given name and whether or not it is + # a multibyte encoding. + # + # @return [Encoding] a new instance of Encoding + # + # source://prism//lib/prism/debug.rb#214 + def initialize(name, multibyte); end + + # Returns true if the first character in the source string is a valid + # alphanumeric character for the encoding. + # + # @return [Boolean] + # + # source://prism//lib/prism/debug.rb#232 + def alnum?(source); end + + # Returns true if the first character in the source string is a valid + # alphabetic character for the encoding. + # + # @return [Boolean] + # + # source://prism//lib/prism/debug.rb#238 + def alpha?(source); end + + # Whether or not the encoding is a multibyte encoding. + # + # @return [Boolean] + # + # source://prism//lib/prism/debug.rb#220 + def multibyte?; end + + # The name of the encoding, that can be passed to Encoding.find. + # + # source://prism//lib/prism/debug.rb#210 + def name; end + + # Returns true if the first character in the source string is a valid + # uppercase character for the encoding. + # + # @return [Boolean] + # + # source://prism//lib/prism/debug.rb#244 + def upper?(source); end + + # Returns the number of bytes of the first character in the source string, + # if it is valid for the encoding. Otherwise, returns 0. + # + # source://prism//lib/prism/debug.rb#226 + def width(source); end + + class << self + def _alnum?(_arg0, _arg1); end + def _alpha?(_arg0, _arg1); end + def _upper?(_arg0, _arg1); end + def _width(_arg0, _arg1); end + def all; end + end +end + # A wrapper around a RubyVM::InstructionSequence that provides a more # convenient interface for accessing parts of the iseq. # @@ -7925,170 +9281,212 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5889 +# source://prism//lib/prism/node.rb#6177 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 + # def initialize: (Symbol name, Location name_loc, Prism::node? receiver, ParametersNode? parameters, Prism::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 + # source://prism//lib/prism/node.rb#6179 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(Prism::Node), + 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), + location: Prism::Location + ).void + end 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 + # 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#6421 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5910 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6198 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Node? + # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#5977 + # source://prism//lib/prism/node.rb#6251 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)]) } + # source://prism//lib/prism/node.rb#6203 + 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#5929 + # source://prism//lib/prism/node.rb#6217 + 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#5920 + # source://prism//lib/prism/node.rb#6208 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> DefNode + # def copy: (?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: Prism::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) -> DefNode # - # source://prism//lib/prism/node.rb#5934 - sig { params(params: T.untyped).returns(Prism::DefNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#6222 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(Prism::Node), + 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), + location: Prism::Location + ).returns(Prism::DefNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#6203 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: Prism::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 + # source://prism//lib/prism/node.rb#6230 + 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#6050 + # source://prism//lib/prism/node.rb#6329 sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # - # source://prism//lib/prism/node.rb#5983 + # source://prism//lib/prism/node.rb#6257 sig { returns(Prism::Location) } def def_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6075 + # source://prism//lib/prism/node.rb#6354 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6037 + # source://prism//lib/prism/node.rb#6316 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # - # source://prism//lib/prism/node.rb#6070 + # source://prism//lib/prism/node.rb#6349 sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # - # source://prism//lib/prism/node.rb#6025 + # source://prism//lib/prism/node.rb#6303 sig { returns(T.nilable(Prism::Location)) } def equal_loc; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6080 + # source://prism//lib/prism/node.rb#6359 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#5980 + # source://prism//lib/prism/node.rb#6254 sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6060 + # source://prism//lib/prism/node.rb#6339 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6001 + # source://prism//lib/prism/node.rb#6277 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5962 + # source://prism//lib/prism/node.rb#6235 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5965 + # source://prism//lib/prism/node.rb#6238 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#6055 + # source://prism//lib/prism/node.rb#6334 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#5989 + # source://prism//lib/prism/node.rb#6264 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#5974 + # source://prism//lib/prism/node.rb#6248 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#5971 + # source://prism//lib/prism/node.rb#6245 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6065 + # source://prism//lib/prism/node.rb#6344 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6013 + # source://prism//lib/prism/node.rb#6290 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -8107,7 +9505,8 @@ class Prism::DefNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6126 + # source://prism//lib/prism/node.rb#6405 + sig { override.returns(Symbol) } def type; end class << self @@ -8118,7 +9517,7 @@ class Prism::DefNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6136 + # source://prism//lib/prism/node.rb#6415 def type; end end end @@ -8128,98 +9527,124 @@ end # defined?(a) # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6145 +# source://prism//lib/prism/node.rb#6443 class Prism::DefinedNode < ::Prism::Node - # def initialize: (Location? lparen_loc, Node value, Location? rparen_loc, Location keyword_loc, Location location) -> void + # def initialize: (Location? lparen_loc, Prism::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 + # source://prism//lib/prism/node.rb#6445 + sig do + params( + source: Prism::Source, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, lparen_loc, value, rparen_loc, keyword_loc, location); 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#6580 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6158 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6456 + 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#6163 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6461 + 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#6173 + # source://prism//lib/prism/node.rb#6471 + 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#6168 + # source://prism//lib/prism/node.rb#6466 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> DefinedNode + # def copy: (?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location, ?location: Location) -> DefinedNode # - # source://prism//lib/prism/node.rb#6178 - sig { params(params: T.untyped).returns(Prism::DefinedNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#6476 + sig do + params( + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::DefinedNode) + end + def copy(lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#6461 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { lparen_loc: Location?, value: Prism::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 + # source://prism//lib/prism/node.rb#6484 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6247 + # source://prism//lib/prism/node.rb#6540 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#6242 + # source://prism//lib/prism/node.rb#6535 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#6225 + # source://prism//lib/prism/node.rb#6518 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6232 + # source://prism//lib/prism/node.rb#6525 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6198 + # source://prism//lib/prism/node.rb#6489 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6237 + # source://prism//lib/prism/node.rb#6530 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6213 + # source://prism//lib/prism/node.rb#6505 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -8238,12 +9663,13 @@ class Prism::DefinedNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6271 + # source://prism//lib/prism/node.rb#6564 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#6210 + # source://prism//lib/prism/node.rb#6502 sig { returns(Prism::Node) } def value; end @@ -8255,7 +9681,7 @@ class Prism::DefinedNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6281 + # source://prism//lib/prism/node.rb#6574 def type; end end end @@ -8301,15 +9727,17 @@ 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 +# source://prism//lib/prism/desugar_compiler.rb#218 class Prism::DesugarCompiler < ::Prism::MutationCompiler + Result = type_member { { fixed: Prism::Node } } + # @@foo &&= bar # # becomes # # @@foo && @@foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#222 + # source://prism//lib/prism/desugar_compiler.rb#224 def visit_class_variable_and_write_node(node); end # @@foo += bar @@ -8318,7 +9746,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # @@foo = @@foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#240 + # source://prism//lib/prism/desugar_compiler.rb#242 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar @@ -8327,7 +9755,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(@@foo) ? @@foo : @@foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#231 + # source://prism//lib/prism/desugar_compiler.rb#233 def visit_class_variable_or_write_node(node); end # Foo &&= bar @@ -8336,7 +9764,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo && Foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#249 + # source://prism//lib/prism/desugar_compiler.rb#251 def visit_constant_and_write_node(node); end # Foo += bar @@ -8345,7 +9773,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo = Foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#267 + # source://prism//lib/prism/desugar_compiler.rb#269 def visit_constant_operator_write_node(node); end # Foo ||= bar @@ -8354,7 +9782,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(Foo) ? Foo : Foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#258 + # source://prism//lib/prism/desugar_compiler.rb#260 def visit_constant_or_write_node(node); end # $foo &&= bar @@ -8363,7 +9791,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo && $foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#276 + # source://prism//lib/prism/desugar_compiler.rb#278 def visit_global_variable_and_write_node(node); end # $foo += bar @@ -8372,7 +9800,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo = $foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#294 + # source://prism//lib/prism/desugar_compiler.rb#296 def visit_global_variable_operator_write_node(node); end # $foo ||= bar @@ -8381,22 +9809,22 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?($foo) ? $foo : $foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#285 + # source://prism//lib/prism/desugar_compiler.rb#287 def visit_global_variable_or_write_node(node); end # becomes # - # source://prism//lib/prism/desugar_compiler.rb#303 + # source://prism//lib/prism/desugar_compiler.rb#305 def visit_instance_variable_and_write_node(node); end # becomes # - # source://prism//lib/prism/desugar_compiler.rb#321 + # source://prism//lib/prism/desugar_compiler.rb#323 def visit_instance_variable_operator_write_node(node); end # becomes # - # source://prism//lib/prism/desugar_compiler.rb#312 + # source://prism//lib/prism/desugar_compiler.rb#314 def visit_instance_variable_or_write_node(node); end # foo &&= bar @@ -8405,7 +9833,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo && foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#330 + # source://prism//lib/prism/desugar_compiler.rb#332 def visit_local_variable_and_write_node(node); end # foo += bar @@ -8414,7 +9842,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo = foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#348 + # source://prism//lib/prism/desugar_compiler.rb#350 def visit_local_variable_operator_write_node(node); end # foo ||= bar @@ -8423,7 +9851,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo || foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#339 + # source://prism//lib/prism/desugar_compiler.rb#341 def visit_local_variable_or_write_node(node); end end @@ -8503,41 +9931,41 @@ class Prism::DesugarOrWriteDefinedNode def write_class; end end -# source://prism//lib/prism/desugar_compiler.rb#99 +# source://prism//lib/prism/desugar_compiler.rb#101 class Prism::DesugarOrWriteNode # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode # - # source://prism//lib/prism/desugar_compiler.rb#102 + # source://prism//lib/prism/desugar_compiler.rb#104 def initialize(node, source, read_class, write_class, *arguments); end # Returns the value of attribute arguments. # - # source://prism//lib/prism/desugar_compiler.rb#100 + # source://prism//lib/prism/desugar_compiler.rb#102 def arguments; end # Desugar `x ||= y` to `x || x = y` # - # source://prism//lib/prism/desugar_compiler.rb#111 + # source://prism//lib/prism/desugar_compiler.rb#113 def compile; end # Returns the value of attribute node. # - # source://prism//lib/prism/desugar_compiler.rb#100 + # source://prism//lib/prism/desugar_compiler.rb#102 def node; end # Returns the value of attribute read_class. # - # source://prism//lib/prism/desugar_compiler.rb#100 + # source://prism//lib/prism/desugar_compiler.rb#102 def read_class; end # Returns the value of attribute source. # - # source://prism//lib/prism/desugar_compiler.rb#100 + # source://prism//lib/prism/desugar_compiler.rb#102 def source; end # Returns the value of attribute write_class. # - # source://prism//lib/prism/desugar_compiler.rb#100 + # source://prism//lib/prism/desugar_compiler.rb#102 def write_class; end end @@ -8572,2443 +10000,2475 @@ end # integer = result.value.statements.body.first.receiver.receiver # dispatcher.dispatch_once(integer) # -# source://prism//lib/prism/dispatcher.rb#40 +# source://prism//lib/prism/dispatcher.rb#41 class Prism::Dispatcher < ::Prism::Visitor # Initialize a new dispatcher. # # @return [Dispatcher] a new instance of Dispatcher # - # source://prism//lib/prism/dispatcher.rb#45 + # source://prism//lib/prism/dispatcher.rb#46 def initialize; end # Walks `root` dispatching events to all registered listeners. # # def dispatch: (Node) -> void # - # source://prism//lib/prism/visitor.rb#16 + # 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#64 + # source://prism//lib/prism/dispatcher.rb#65 def dispatch_once(node); end # attr_reader listeners: Hash[Symbol, Array[Listener]] # - # source://prism//lib/prism/dispatcher.rb#42 + # source://prism//lib/prism/dispatcher.rb#43 def listeners; end # Register a listener for one or more events. # # def register: (Listener, *Symbol) -> void # - # source://prism//lib/prism/dispatcher.rb#52 + # source://prism//lib/prism/dispatcher.rb#53 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 + # source://prism//lib/prism/dispatcher.rb#71 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 + # source://prism//lib/prism/dispatcher.rb#79 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 + # source://prism//lib/prism/dispatcher.rb#87 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 + # source://prism//lib/prism/dispatcher.rb#95 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 + # source://prism//lib/prism/dispatcher.rb#103 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 + # source://prism//lib/prism/dispatcher.rb#111 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 + # source://prism//lib/prism/dispatcher.rb#119 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 + # source://prism//lib/prism/dispatcher.rb#127 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 + # source://prism//lib/prism/dispatcher.rb#135 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 + # source://prism//lib/prism/dispatcher.rb#143 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 + # source://prism//lib/prism/dispatcher.rb#151 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 + # source://prism//lib/prism/dispatcher.rb#159 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 + # source://prism//lib/prism/dispatcher.rb#167 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 + # source://prism//lib/prism/dispatcher.rb#175 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 + # source://prism//lib/prism/dispatcher.rb#183 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 + # source://prism//lib/prism/dispatcher.rb#191 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 + # source://prism//lib/prism/dispatcher.rb#199 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 + # source://prism//lib/prism/dispatcher.rb#207 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 + # source://prism//lib/prism/dispatcher.rb#215 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 + # source://prism//lib/prism/dispatcher.rb#223 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 + # source://prism//lib/prism/dispatcher.rb#231 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 + # source://prism//lib/prism/dispatcher.rb#239 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 + # source://prism//lib/prism/dispatcher.rb#247 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 + # source://prism//lib/prism/dispatcher.rb#255 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 + # source://prism//lib/prism/dispatcher.rb#263 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 + # source://prism//lib/prism/dispatcher.rb#271 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 + # source://prism//lib/prism/dispatcher.rb#279 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 + # source://prism//lib/prism/dispatcher.rb#287 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 + # source://prism//lib/prism/dispatcher.rb#295 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 + # source://prism//lib/prism/dispatcher.rb#303 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 + # source://prism//lib/prism/dispatcher.rb#311 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 + # source://prism//lib/prism/dispatcher.rb#319 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 + # source://prism//lib/prism/dispatcher.rb#327 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 + # source://prism//lib/prism/dispatcher.rb#335 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 + # source://prism//lib/prism/dispatcher.rb#343 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 + # source://prism//lib/prism/dispatcher.rb#351 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 + # source://prism//lib/prism/dispatcher.rb#359 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 + # source://prism//lib/prism/dispatcher.rb#367 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 + # source://prism//lib/prism/dispatcher.rb#375 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 + # source://prism//lib/prism/dispatcher.rb#383 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 + # source://prism//lib/prism/dispatcher.rb#391 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 + # source://prism//lib/prism/dispatcher.rb#399 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 + # source://prism//lib/prism/dispatcher.rb#407 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 + # source://prism//lib/prism/dispatcher.rb#415 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 + # source://prism//lib/prism/dispatcher.rb#423 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 + # source://prism//lib/prism/dispatcher.rb#431 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 + # source://prism//lib/prism/dispatcher.rb#439 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 + # source://prism//lib/prism/dispatcher.rb#447 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 + # source://prism//lib/prism/dispatcher.rb#455 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 + # source://prism//lib/prism/dispatcher.rb#463 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 + # source://prism//lib/prism/dispatcher.rb#471 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 + # source://prism//lib/prism/dispatcher.rb#479 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 + # source://prism//lib/prism/dispatcher.rb#487 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 + # source://prism//lib/prism/dispatcher.rb#495 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 + # source://prism//lib/prism/dispatcher.rb#503 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 + # source://prism//lib/prism/dispatcher.rb#511 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 + # source://prism//lib/prism/dispatcher.rb#519 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 + # source://prism//lib/prism/dispatcher.rb#527 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 + # source://prism//lib/prism/dispatcher.rb#535 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 + # source://prism//lib/prism/dispatcher.rb#543 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 + # source://prism//lib/prism/dispatcher.rb#551 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 + # source://prism//lib/prism/dispatcher.rb#559 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 + # source://prism//lib/prism/dispatcher.rb#567 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 + # source://prism//lib/prism/dispatcher.rb#575 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 + # source://prism//lib/prism/dispatcher.rb#583 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 + # source://prism//lib/prism/dispatcher.rb#591 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 + # source://prism//lib/prism/dispatcher.rb#599 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 + # source://prism//lib/prism/dispatcher.rb#607 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 + # source://prism//lib/prism/dispatcher.rb#615 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 + # source://prism//lib/prism/dispatcher.rb#623 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 + # source://prism//lib/prism/dispatcher.rb#631 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 + # source://prism//lib/prism/dispatcher.rb#639 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 + # source://prism//lib/prism/dispatcher.rb#647 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 + # source://prism//lib/prism/dispatcher.rb#655 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 + # source://prism//lib/prism/dispatcher.rb#663 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 + # source://prism//lib/prism/dispatcher.rb#671 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 + # source://prism//lib/prism/dispatcher.rb#679 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 + # source://prism//lib/prism/dispatcher.rb#687 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 + # source://prism//lib/prism/dispatcher.rb#695 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 + # source://prism//lib/prism/dispatcher.rb#703 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 + # source://prism//lib/prism/dispatcher.rb#711 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 + # source://prism//lib/prism/dispatcher.rb#719 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 + # source://prism//lib/prism/dispatcher.rb#727 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 + # source://prism//lib/prism/dispatcher.rb#735 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 + # source://prism//lib/prism/dispatcher.rb#743 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 + # source://prism//lib/prism/dispatcher.rb#751 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 + # source://prism//lib/prism/dispatcher.rb#759 def visit_interpolated_x_string_node(node); end + # Dispatch enter and leave events for ItParametersNode nodes and continue + # walking the tree. + # + # source://prism//lib/prism/dispatcher.rb#767 + 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#766 + # source://prism//lib/prism/dispatcher.rb#775 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 + # source://prism//lib/prism/dispatcher.rb#783 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 + # source://prism//lib/prism/dispatcher.rb#791 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 + # source://prism//lib/prism/dispatcher.rb#799 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 + # source://prism//lib/prism/dispatcher.rb#807 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 + # source://prism//lib/prism/dispatcher.rb#815 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 + # source://prism//lib/prism/dispatcher.rb#823 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 + # source://prism//lib/prism/dispatcher.rb#831 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 + # source://prism//lib/prism/dispatcher.rb#839 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 + # source://prism//lib/prism/dispatcher.rb#847 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 + # source://prism//lib/prism/dispatcher.rb#855 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 + # source://prism//lib/prism/dispatcher.rb#863 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 + # source://prism//lib/prism/dispatcher.rb#871 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 + # source://prism//lib/prism/dispatcher.rb#879 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 + # source://prism//lib/prism/dispatcher.rb#887 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 + # source://prism//lib/prism/dispatcher.rb#895 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 + # source://prism//lib/prism/dispatcher.rb#903 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 + # source://prism//lib/prism/dispatcher.rb#911 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 + # source://prism//lib/prism/dispatcher.rb#919 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 + # source://prism//lib/prism/dispatcher.rb#927 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 + # source://prism//lib/prism/dispatcher.rb#935 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 + # source://prism//lib/prism/dispatcher.rb#943 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 + # source://prism//lib/prism/dispatcher.rb#951 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 + # source://prism//lib/prism/dispatcher.rb#959 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 + # source://prism//lib/prism/dispatcher.rb#967 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 + # source://prism//lib/prism/dispatcher.rb#975 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 + # source://prism//lib/prism/dispatcher.rb#983 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 + # source://prism//lib/prism/dispatcher.rb#991 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 + # source://prism//lib/prism/dispatcher.rb#999 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 + # source://prism//lib/prism/dispatcher.rb#1007 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 + # source://prism//lib/prism/dispatcher.rb#1015 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 + # source://prism//lib/prism/dispatcher.rb#1023 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 + # source://prism//lib/prism/dispatcher.rb#1031 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 + # source://prism//lib/prism/dispatcher.rb#1039 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 + # source://prism//lib/prism/dispatcher.rb#1047 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 + # source://prism//lib/prism/dispatcher.rb#1055 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 + # source://prism//lib/prism/dispatcher.rb#1063 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 + # source://prism//lib/prism/dispatcher.rb#1071 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 + # source://prism//lib/prism/dispatcher.rb#1079 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 + # source://prism//lib/prism/dispatcher.rb#1087 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 + # source://prism//lib/prism/dispatcher.rb#1095 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 + # source://prism//lib/prism/dispatcher.rb#1103 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 + # source://prism//lib/prism/dispatcher.rb#1111 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 + # source://prism//lib/prism/dispatcher.rb#1119 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#1127 + 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#1118 + # source://prism//lib/prism/dispatcher.rb#1135 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 + # source://prism//lib/prism/dispatcher.rb#1143 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 + # source://prism//lib/prism/dispatcher.rb#1151 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 + # source://prism//lib/prism/dispatcher.rb#1159 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 + # source://prism//lib/prism/dispatcher.rb#1167 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 + # source://prism//lib/prism/dispatcher.rb#1175 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 + # source://prism//lib/prism/dispatcher.rb#1183 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 + # source://prism//lib/prism/dispatcher.rb#1191 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 + # source://prism//lib/prism/dispatcher.rb#1199 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 + # source://prism//lib/prism/dispatcher.rb#1207 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 + # source://prism//lib/prism/dispatcher.rb#1215 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 + # source://prism//lib/prism/dispatcher.rb#1223 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 + # source://prism//lib/prism/dispatcher.rb#1231 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 + # source://prism//lib/prism/dispatcher.rb#1239 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 + # source://prism//lib/prism/dispatcher.rb#1247 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 + # source://prism//lib/prism/dispatcher.rb#1255 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 + # source://prism//lib/prism/dispatcher.rb#1263 def visit_yield_node(node); end end -# source://prism//lib/prism/dispatcher.rb#1252 +# source://prism//lib/prism/dispatcher.rb#1269 class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor # @return [DispatchOnce] a new instance of DispatchOnce # - # source://prism//lib/prism/dispatcher.rb#1255 + # source://prism//lib/prism/dispatcher.rb#1272 def initialize(listeners); end # Returns the value of attribute listeners. # - # source://prism//lib/prism/dispatcher.rb#1253 + # source://prism//lib/prism/dispatcher.rb#1270 def listeners; end # Dispatch enter and leave events for AliasGlobalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1260 + # source://prism//lib/prism/dispatcher.rb#1277 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1266 + # source://prism//lib/prism/dispatcher.rb#1283 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1272 + # source://prism//lib/prism/dispatcher.rb#1289 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1278 + # source://prism//lib/prism/dispatcher.rb#1295 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1284 + # source://prism//lib/prism/dispatcher.rb#1301 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1290 + # source://prism//lib/prism/dispatcher.rb#1307 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1296 + # source://prism//lib/prism/dispatcher.rb#1313 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1302 + # source://prism//lib/prism/dispatcher.rb#1319 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1308 + # source://prism//lib/prism/dispatcher.rb#1325 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1314 + # source://prism//lib/prism/dispatcher.rb#1331 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1320 + # source://prism//lib/prism/dispatcher.rb#1337 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1326 + # source://prism//lib/prism/dispatcher.rb#1343 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1332 + # source://prism//lib/prism/dispatcher.rb#1349 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1338 + # source://prism//lib/prism/dispatcher.rb#1355 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1344 + # source://prism//lib/prism/dispatcher.rb#1361 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1350 + # source://prism//lib/prism/dispatcher.rb#1367 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1356 + # source://prism//lib/prism/dispatcher.rb#1373 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1362 + # source://prism//lib/prism/dispatcher.rb#1379 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1368 + # source://prism//lib/prism/dispatcher.rb#1385 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1374 + # source://prism//lib/prism/dispatcher.rb#1391 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1380 + # source://prism//lib/prism/dispatcher.rb#1397 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CallTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1386 + # source://prism//lib/prism/dispatcher.rb#1403 def visit_call_target_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1392 + # source://prism//lib/prism/dispatcher.rb#1409 def visit_capture_pattern_node(node); end # Dispatch enter and leave events for CaseMatchNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1398 + # source://prism//lib/prism/dispatcher.rb#1415 def visit_case_match_node(node); end # Dispatch enter and leave events for CaseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1404 + # source://prism//lib/prism/dispatcher.rb#1421 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1410 + # source://prism//lib/prism/dispatcher.rb#1427 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1416 + # source://prism//lib/prism/dispatcher.rb#1433 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1422 + # source://prism//lib/prism/dispatcher.rb#1439 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1428 + # source://prism//lib/prism/dispatcher.rb#1445 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1434 + # source://prism//lib/prism/dispatcher.rb#1451 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1440 + # source://prism//lib/prism/dispatcher.rb#1457 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1446 + # source://prism//lib/prism/dispatcher.rb#1463 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1452 + # source://prism//lib/prism/dispatcher.rb#1469 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1458 + # source://prism//lib/prism/dispatcher.rb#1475 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1464 + # source://prism//lib/prism/dispatcher.rb#1481 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1470 + # source://prism//lib/prism/dispatcher.rb#1487 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1476 + # source://prism//lib/prism/dispatcher.rb#1493 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1482 + # source://prism//lib/prism/dispatcher.rb#1499 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1488 + # source://prism//lib/prism/dispatcher.rb#1505 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1494 + # source://prism//lib/prism/dispatcher.rb#1511 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1500 + # source://prism//lib/prism/dispatcher.rb#1517 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1506 + # source://prism//lib/prism/dispatcher.rb#1523 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1512 + # source://prism//lib/prism/dispatcher.rb#1529 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1518 + # source://prism//lib/prism/dispatcher.rb#1535 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1524 + # source://prism//lib/prism/dispatcher.rb#1541 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1530 + # source://prism//lib/prism/dispatcher.rb#1547 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1536 + # source://prism//lib/prism/dispatcher.rb#1553 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1542 + # source://prism//lib/prism/dispatcher.rb#1559 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1548 + # source://prism//lib/prism/dispatcher.rb#1565 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1554 + # source://prism//lib/prism/dispatcher.rb#1571 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1560 + # source://prism//lib/prism/dispatcher.rb#1577 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1566 + # source://prism//lib/prism/dispatcher.rb#1583 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1572 + # source://prism//lib/prism/dispatcher.rb#1589 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1578 + # source://prism//lib/prism/dispatcher.rb#1595 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1584 + # source://prism//lib/prism/dispatcher.rb#1601 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1590 + # source://prism//lib/prism/dispatcher.rb#1607 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1596 + # source://prism//lib/prism/dispatcher.rb#1613 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1602 + # source://prism//lib/prism/dispatcher.rb#1619 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1608 + # source://prism//lib/prism/dispatcher.rb#1625 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1614 + # source://prism//lib/prism/dispatcher.rb#1631 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1620 + # source://prism//lib/prism/dispatcher.rb#1637 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1626 + # source://prism//lib/prism/dispatcher.rb#1643 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1632 + # source://prism//lib/prism/dispatcher.rb#1649 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1638 + # source://prism//lib/prism/dispatcher.rb#1655 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1644 + # source://prism//lib/prism/dispatcher.rb#1661 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1650 + # source://prism//lib/prism/dispatcher.rb#1667 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1656 + # source://prism//lib/prism/dispatcher.rb#1673 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1662 + # source://prism//lib/prism/dispatcher.rb#1679 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1668 + # source://prism//lib/prism/dispatcher.rb#1685 def visit_implicit_node(node); end # Dispatch enter and leave events for ImplicitRestNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1674 + # source://prism//lib/prism/dispatcher.rb#1691 def visit_implicit_rest_node(node); end # Dispatch enter and leave events for InNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1680 + # source://prism//lib/prism/dispatcher.rb#1697 def visit_in_node(node); end # Dispatch enter and leave events for IndexAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1686 + # source://prism//lib/prism/dispatcher.rb#1703 def visit_index_and_write_node(node); end # Dispatch enter and leave events for IndexOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1692 + # source://prism//lib/prism/dispatcher.rb#1709 def visit_index_operator_write_node(node); end # Dispatch enter and leave events for IndexOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1698 + # source://prism//lib/prism/dispatcher.rb#1715 def visit_index_or_write_node(node); end # Dispatch enter and leave events for IndexTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1704 + # source://prism//lib/prism/dispatcher.rb#1721 def visit_index_target_node(node); end # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1710 + # source://prism//lib/prism/dispatcher.rb#1727 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1716 + # source://prism//lib/prism/dispatcher.rb#1733 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1722 + # source://prism//lib/prism/dispatcher.rb#1739 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1728 + # source://prism//lib/prism/dispatcher.rb#1745 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1734 + # source://prism//lib/prism/dispatcher.rb#1751 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1740 + # source://prism//lib/prism/dispatcher.rb#1757 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1746 + # source://prism//lib/prism/dispatcher.rb#1763 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1752 + # source://prism//lib/prism/dispatcher.rb#1769 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1758 + # source://prism//lib/prism/dispatcher.rb#1775 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1764 + # source://prism//lib/prism/dispatcher.rb#1781 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1770 + # source://prism//lib/prism/dispatcher.rb#1787 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1776 + # source://prism//lib/prism/dispatcher.rb#1793 def visit_interpolated_x_string_node(node); end + # Dispatch enter and leave events for ItParametersNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1799 + def visit_it_parameters_node(node); end + # Dispatch enter and leave events for KeywordHashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1782 + # source://prism//lib/prism/dispatcher.rb#1805 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1788 + # source://prism//lib/prism/dispatcher.rb#1811 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1794 + # source://prism//lib/prism/dispatcher.rb#1817 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1800 + # source://prism//lib/prism/dispatcher.rb#1823 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1806 + # source://prism//lib/prism/dispatcher.rb#1829 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1812 + # source://prism//lib/prism/dispatcher.rb#1835 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1818 + # source://prism//lib/prism/dispatcher.rb#1841 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1824 + # source://prism//lib/prism/dispatcher.rb#1847 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1830 + # source://prism//lib/prism/dispatcher.rb#1853 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1836 + # source://prism//lib/prism/dispatcher.rb#1859 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1842 + # source://prism//lib/prism/dispatcher.rb#1865 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1848 + # source://prism//lib/prism/dispatcher.rb#1871 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1854 + # source://prism//lib/prism/dispatcher.rb#1877 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1860 + # source://prism//lib/prism/dispatcher.rb#1883 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1866 + # source://prism//lib/prism/dispatcher.rb#1889 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1872 + # source://prism//lib/prism/dispatcher.rb#1895 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1878 + # source://prism//lib/prism/dispatcher.rb#1901 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1884 + # source://prism//lib/prism/dispatcher.rb#1907 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1890 + # source://prism//lib/prism/dispatcher.rb#1913 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1896 + # source://prism//lib/prism/dispatcher.rb#1919 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1902 + # source://prism//lib/prism/dispatcher.rb#1925 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1908 + # source://prism//lib/prism/dispatcher.rb#1931 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1914 + # source://prism//lib/prism/dispatcher.rb#1937 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1920 + # source://prism//lib/prism/dispatcher.rb#1943 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1926 + # source://prism//lib/prism/dispatcher.rb#1949 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1932 + # source://prism//lib/prism/dispatcher.rb#1955 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1938 + # source://prism//lib/prism/dispatcher.rb#1961 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1944 + # source://prism//lib/prism/dispatcher.rb#1967 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1950 + # source://prism//lib/prism/dispatcher.rb#1973 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1956 + # source://prism//lib/prism/dispatcher.rb#1979 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1962 + # source://prism//lib/prism/dispatcher.rb#1985 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1968 + # source://prism//lib/prism/dispatcher.rb#1991 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1974 + # source://prism//lib/prism/dispatcher.rb#1997 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1980 + # source://prism//lib/prism/dispatcher.rb#2003 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1986 + # source://prism//lib/prism/dispatcher.rb#2009 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1992 + # source://prism//lib/prism/dispatcher.rb#2015 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1998 + # source://prism//lib/prism/dispatcher.rb#2021 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2004 + # source://prism//lib/prism/dispatcher.rb#2027 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2010 + # source://prism//lib/prism/dispatcher.rb#2033 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2016 + # source://prism//lib/prism/dispatcher.rb#2039 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2022 + # source://prism//lib/prism/dispatcher.rb#2045 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2028 + # source://prism//lib/prism/dispatcher.rb#2051 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2034 + # source://prism//lib/prism/dispatcher.rb#2057 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2040 + # source://prism//lib/prism/dispatcher.rb#2063 def visit_self_node(node); end + # Dispatch enter and leave events for ShareableConstantNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#2069 + def visit_shareable_constant_node(node); end + # Dispatch enter and leave events for SingletonClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2046 + # source://prism//lib/prism/dispatcher.rb#2075 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2052 + # source://prism//lib/prism/dispatcher.rb#2081 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2058 + # source://prism//lib/prism/dispatcher.rb#2087 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2064 + # source://prism//lib/prism/dispatcher.rb#2093 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2070 + # source://prism//lib/prism/dispatcher.rb#2099 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2076 + # source://prism//lib/prism/dispatcher.rb#2105 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2082 + # source://prism//lib/prism/dispatcher.rb#2111 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2088 + # source://prism//lib/prism/dispatcher.rb#2117 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2094 + # source://prism//lib/prism/dispatcher.rb#2123 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2100 + # source://prism//lib/prism/dispatcher.rb#2129 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2106 + # source://prism//lib/prism/dispatcher.rb#2135 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2112 + # source://prism//lib/prism/dispatcher.rb#2141 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2118 + # source://prism//lib/prism/dispatcher.rb#2147 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2124 + # source://prism//lib/prism/dispatcher.rb#2153 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2130 + # source://prism//lib/prism/dispatcher.rb#2159 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2136 + # source://prism//lib/prism/dispatcher.rb#2165 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2142 + # source://prism//lib/prism/dispatcher.rb#2171 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 +# 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#105 + # source://prism//lib/prism/dot_visitor.rb#106 def initialize; end # The digraph that is being built. # - # source://prism//lib/prism/dot_visitor.rb#102 + # 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#110 + # source://prism//lib/prism/dot_visitor.rb#111 def to_dot; end # Visit a AliasGlobalVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#115 + # 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#140 + # 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#165 + # 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#190 + # 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#215 + # 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#245 + # 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#285 + # 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#347 + # 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#374 + # 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#397 + # 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#414 + # 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#462 + # 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#485 + # 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#505 + # 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#540 + # 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#568 + # 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#611 + # 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#634 + # 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#680 + # 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#738 + # 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#787 + # 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#833 + # 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#863 + # 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#888 + # 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#933 + # 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#978 + # 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#1025 + # 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#1052 + # 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#1082 + # 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#1109 + # 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#1126 + # 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#1143 + # 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#1172 + # 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#1199 + # 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#1229 + # 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#1256 + # 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#1281 + # 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#1308 + # source://prism//lib/prism/dot_visitor.rb#1307 def visit_constant_path_operator_write_node(node); end # Visit a ConstantPathOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1336 + # source://prism//lib/prism/dot_visitor.rb#1335 def visit_constant_path_or_write_node(node); end # Visit a ConstantPathTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1361 + # source://prism//lib/prism/dot_visitor.rb#1360 def visit_constant_path_target_node(node); end # Visit a ConstantPathWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1388 + # source://prism//lib/prism/dot_visitor.rb#1387 def visit_constant_path_write_node(node); end # Visit a ConstantReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#1413 + # source://prism//lib/prism/dot_visitor.rb#1412 def visit_constant_read_node(node); end # Visit a ConstantTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1430 + # source://prism//lib/prism/dot_visitor.rb#1429 def visit_constant_target_node(node); end # Visit a ConstantWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1447 + # source://prism//lib/prism/dot_visitor.rb#1446 def visit_constant_write_node(node); end # Visit a DefNode node. # - # source://prism//lib/prism/dot_visitor.rb#1474 + # source://prism//lib/prism/dot_visitor.rb#1473 def visit_def_node(node); end # Visit a DefinedNode node. # - # source://prism//lib/prism/dot_visitor.rb#1543 + # source://prism//lib/prism/dot_visitor.rb#1542 def visit_defined_node(node); end # Visit a ElseNode node. # - # source://prism//lib/prism/dot_visitor.rb#1574 + # source://prism//lib/prism/dot_visitor.rb#1573 def visit_else_node(node); end # Visit a EmbeddedStatementsNode node. # - # source://prism//lib/prism/dot_visitor.rb#1602 + # source://prism//lib/prism/dot_visitor.rb#1601 def visit_embedded_statements_node(node); end # Visit a EmbeddedVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#1628 + # source://prism//lib/prism/dot_visitor.rb#1627 def visit_embedded_variable_node(node); end # Visit a EnsureNode node. # - # source://prism//lib/prism/dot_visitor.rb#1649 + # source://prism//lib/prism/dot_visitor.rb#1648 def visit_ensure_node(node); end # Visit a FalseNode node. # - # source://prism//lib/prism/dot_visitor.rb#1675 + # source://prism//lib/prism/dot_visitor.rb#1674 def visit_false_node(node); end # Visit a FindPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#1689 + # source://prism//lib/prism/dot_visitor.rb#1688 def visit_find_pattern_node(node); end # Visit a FlipFlopNode node. # - # source://prism//lib/prism/dot_visitor.rb#1740 + # source://prism//lib/prism/dot_visitor.rb#1739 def visit_flip_flop_node(node); end # Visit a FloatNode node. # - # source://prism//lib/prism/dot_visitor.rb#1772 + # source://prism//lib/prism/dot_visitor.rb#1771 def visit_float_node(node); end # Visit a ForNode node. # - # source://prism//lib/prism/dot_visitor.rb#1786 + # source://prism//lib/prism/dot_visitor.rb#1788 def visit_for_node(node); end # Visit a ForwardingArgumentsNode node. # - # source://prism//lib/prism/dot_visitor.rb#1828 + # source://prism//lib/prism/dot_visitor.rb#1830 def visit_forwarding_arguments_node(node); end # Visit a ForwardingParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#1842 + # source://prism//lib/prism/dot_visitor.rb#1844 def visit_forwarding_parameter_node(node); end # Visit a ForwardingSuperNode node. # - # source://prism//lib/prism/dot_visitor.rb#1856 + # source://prism//lib/prism/dot_visitor.rb#1858 def visit_forwarding_super_node(node); end # Visit a GlobalVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1876 + # source://prism//lib/prism/dot_visitor.rb#1878 def visit_global_variable_and_write_node(node); end # Visit a GlobalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1903 + # source://prism//lib/prism/dot_visitor.rb#1905 def visit_global_variable_operator_write_node(node); end # Visit a GlobalVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1933 + # source://prism//lib/prism/dot_visitor.rb#1935 def visit_global_variable_or_write_node(node); end # Visit a GlobalVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#1960 + # source://prism//lib/prism/dot_visitor.rb#1962 def visit_global_variable_read_node(node); end # Visit a GlobalVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#1977 + # source://prism//lib/prism/dot_visitor.rb#1979 def visit_global_variable_target_node(node); end # Visit a GlobalVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#1994 + # source://prism//lib/prism/dot_visitor.rb#1996 def visit_global_variable_write_node(node); end # Visit a HashNode node. # - # source://prism//lib/prism/dot_visitor.rb#2021 + # source://prism//lib/prism/dot_visitor.rb#2023 def visit_hash_node(node); end # Visit a HashPatternNode node. # - # source://prism//lib/prism/dot_visitor.rb#2054 + # source://prism//lib/prism/dot_visitor.rb#2056 def visit_hash_pattern_node(node); end # Visit a IfNode node. # - # source://prism//lib/prism/dot_visitor.rb#2103 + # source://prism//lib/prism/dot_visitor.rb#2105 def visit_if_node(node); end # Visit a ImaginaryNode node. # - # source://prism//lib/prism/dot_visitor.rb#2148 + # source://prism//lib/prism/dot_visitor.rb#2150 def visit_imaginary_node(node); end # Visit a ImplicitNode node. # - # source://prism//lib/prism/dot_visitor.rb#2166 + # source://prism//lib/prism/dot_visitor.rb#2168 def visit_implicit_node(node); end # Visit a ImplicitRestNode node. # - # source://prism//lib/prism/dot_visitor.rb#2184 + # source://prism//lib/prism/dot_visitor.rb#2186 def visit_implicit_rest_node(node); end # Visit a InNode node. # - # source://prism//lib/prism/dot_visitor.rb#2198 + # source://prism//lib/prism/dot_visitor.rb#2200 def visit_in_node(node); end # Visit a IndexAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2230 + # source://prism//lib/prism/dot_visitor.rb#2232 def visit_index_and_write_node(node); end # Visit a IndexOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2283 + # source://prism//lib/prism/dot_visitor.rb#2285 def visit_index_operator_write_node(node); end # Visit a IndexOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2339 + # source://prism//lib/prism/dot_visitor.rb#2341 def visit_index_or_write_node(node); end # Visit a IndexTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#2392 + # source://prism//lib/prism/dot_visitor.rb#2394 def visit_index_target_node(node); end # Visit a InstanceVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2431 + # source://prism//lib/prism/dot_visitor.rb#2433 def visit_instance_variable_and_write_node(node); end # Visit a InstanceVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2458 + # source://prism//lib/prism/dot_visitor.rb#2460 def visit_instance_variable_operator_write_node(node); end # Visit a InstanceVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2488 + # source://prism//lib/prism/dot_visitor.rb#2490 def visit_instance_variable_or_write_node(node); end # Visit a InstanceVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#2515 + # source://prism//lib/prism/dot_visitor.rb#2517 def visit_instance_variable_read_node(node); end # Visit a InstanceVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#2532 + # source://prism//lib/prism/dot_visitor.rb#2534 def visit_instance_variable_target_node(node); end # Visit a InstanceVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2549 + # source://prism//lib/prism/dot_visitor.rb#2551 def visit_instance_variable_write_node(node); end # Visit a IntegerNode node. # - # source://prism//lib/prism/dot_visitor.rb#2576 + # source://prism//lib/prism/dot_visitor.rb#2578 def visit_integer_node(node); end # Visit a InterpolatedMatchLastLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#2593 + # source://prism//lib/prism/dot_visitor.rb#2598 def visit_interpolated_match_last_line_node(node); end # Visit a InterpolatedRegularExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#2629 + # source://prism//lib/prism/dot_visitor.rb#2634 def visit_interpolated_regular_expression_node(node); end # Visit a InterpolatedStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#2665 + # source://prism//lib/prism/dot_visitor.rb#2670 def visit_interpolated_string_node(node); end # Visit a InterpolatedSymbolNode node. # - # source://prism//lib/prism/dot_visitor.rb#2702 + # source://prism//lib/prism/dot_visitor.rb#2710 def visit_interpolated_symbol_node(node); end # Visit a InterpolatedXStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#2739 + # source://prism//lib/prism/dot_visitor.rb#2747 def visit_interpolated_x_string_node(node); end + # Visit a ItParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2780 + def visit_it_parameters_node(node); end + # Visit a KeywordHashNode node. # - # source://prism//lib/prism/dot_visitor.rb#2772 + # source://prism//lib/prism/dot_visitor.rb#2794 def visit_keyword_hash_node(node); end # Visit a KeywordRestParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#2802 + # source://prism//lib/prism/dot_visitor.rb#2824 def visit_keyword_rest_parameter_node(node); end # Visit a LambdaNode node. # - # source://prism//lib/prism/dot_visitor.rb#2830 + # source://prism//lib/prism/dot_visitor.rb#2852 def visit_lambda_node(node); end # Visit a LocalVariableAndWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2868 + # source://prism//lib/prism/dot_visitor.rb#2890 def visit_local_variable_and_write_node(node); end # Visit a LocalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2898 + # source://prism//lib/prism/dot_visitor.rb#2920 def visit_local_variable_operator_write_node(node); end # Visit a LocalVariableOrWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#2931 + # source://prism//lib/prism/dot_visitor.rb#2953 def visit_local_variable_or_write_node(node); end # Visit a LocalVariableReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#2961 + # source://prism//lib/prism/dot_visitor.rb#2983 def visit_local_variable_read_node(node); end # Visit a LocalVariableTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#2981 + # source://prism//lib/prism/dot_visitor.rb#3003 def visit_local_variable_target_node(node); end # Visit a LocalVariableWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3001 + # source://prism//lib/prism/dot_visitor.rb#3023 def visit_local_variable_write_node(node); end # Visit a MatchLastLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#3031 + # source://prism//lib/prism/dot_visitor.rb#3053 def visit_match_last_line_node(node); end # Visit a MatchPredicateNode node. # - # source://prism//lib/prism/dot_visitor.rb#3060 + # source://prism//lib/prism/dot_visitor.rb#3082 def visit_match_predicate_node(node); end # Visit a MatchRequiredNode node. # - # source://prism//lib/prism/dot_visitor.rb#3085 + # source://prism//lib/prism/dot_visitor.rb#3107 def visit_match_required_node(node); end # Visit a MatchWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3110 + # source://prism//lib/prism/dot_visitor.rb#3132 def visit_match_write_node(node); end # Visit a MissingNode node. # - # source://prism//lib/prism/dot_visitor.rb#3141 + # source://prism//lib/prism/dot_visitor.rb#3163 def visit_missing_node(node); end # Visit a ModuleNode node. # - # source://prism//lib/prism/dot_visitor.rb#3155 + # source://prism//lib/prism/dot_visitor.rb#3177 def visit_module_node(node); end # Visit a MultiTargetNode node. # - # source://prism//lib/prism/dot_visitor.rb#3191 + # source://prism//lib/prism/dot_visitor.rb#3213 def visit_multi_target_node(node); end # Visit a MultiWriteNode node. # - # source://prism//lib/prism/dot_visitor.rb#3247 + # source://prism//lib/prism/dot_visitor.rb#3269 def visit_multi_write_node(node); end # Visit a NextNode node. # - # source://prism//lib/prism/dot_visitor.rb#3310 + # source://prism//lib/prism/dot_visitor.rb#3332 def visit_next_node(node); end # Visit a NilNode node. # - # source://prism//lib/prism/dot_visitor.rb#3333 + # source://prism//lib/prism/dot_visitor.rb#3355 def visit_nil_node(node); end # Visit a NoKeywordsParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3347 + # source://prism//lib/prism/dot_visitor.rb#3369 def visit_no_keywords_parameter_node(node); end # Visit a NumberedParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#3367 + # source://prism//lib/prism/dot_visitor.rb#3389 def visit_numbered_parameters_node(node); end # Visit a NumberedReferenceReadNode node. # - # source://prism//lib/prism/dot_visitor.rb#3384 + # source://prism//lib/prism/dot_visitor.rb#3406 def visit_numbered_reference_read_node(node); end # Visit a OptionalKeywordParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3401 + # source://prism//lib/prism/dot_visitor.rb#3423 def visit_optional_keyword_parameter_node(node); end # Visit a OptionalParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3428 + # source://prism//lib/prism/dot_visitor.rb#3450 def visit_optional_parameter_node(node); end # Visit a OrNode node. # - # source://prism//lib/prism/dot_visitor.rb#3458 + # source://prism//lib/prism/dot_visitor.rb#3480 def visit_or_node(node); end # Visit a ParametersNode node. # - # source://prism//lib/prism/dot_visitor.rb#3483 + # source://prism//lib/prism/dot_visitor.rb#3505 def visit_parameters_node(node); end # Visit a ParenthesesNode node. # - # source://prism//lib/prism/dot_visitor.rb#3567 + # source://prism//lib/prism/dot_visitor.rb#3589 def visit_parentheses_node(node); end # Visit a PinnedExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3593 + # source://prism//lib/prism/dot_visitor.rb#3615 def visit_pinned_expression_node(node); end # Visit a PinnedVariableNode node. # - # source://prism//lib/prism/dot_visitor.rb#3620 + # source://prism//lib/prism/dot_visitor.rb#3642 def visit_pinned_variable_node(node); end # Visit a PostExecutionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3641 + # source://prism//lib/prism/dot_visitor.rb#3663 def visit_post_execution_node(node); end # Visit a PreExecutionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3670 + # source://prism//lib/prism/dot_visitor.rb#3692 def visit_pre_execution_node(node); end # Visit a ProgramNode node. # - # source://prism//lib/prism/dot_visitor.rb#3699 + # source://prism//lib/prism/dot_visitor.rb#3721 def visit_program_node(node); end # Visit a RangeNode node. # - # source://prism//lib/prism/dot_visitor.rb#3720 + # source://prism//lib/prism/dot_visitor.rb#3742 def visit_range_node(node); end # Visit a RationalNode node. # - # source://prism//lib/prism/dot_visitor.rb#3752 + # source://prism//lib/prism/dot_visitor.rb#3774 def visit_rational_node(node); end # Visit a RedoNode node. # - # source://prism//lib/prism/dot_visitor.rb#3770 + # source://prism//lib/prism/dot_visitor.rb#3792 def visit_redo_node(node); end # Visit a RegularExpressionNode node. # - # source://prism//lib/prism/dot_visitor.rb#3784 + # source://prism//lib/prism/dot_visitor.rb#3806 def visit_regular_expression_node(node); end # Visit a RequiredKeywordParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3813 + # source://prism//lib/prism/dot_visitor.rb#3835 def visit_required_keyword_parameter_node(node); end # Visit a RequiredParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3836 + # source://prism//lib/prism/dot_visitor.rb#3858 def visit_required_parameter_node(node); end # Visit a RescueModifierNode node. # - # source://prism//lib/prism/dot_visitor.rb#3856 + # source://prism//lib/prism/dot_visitor.rb#3878 def visit_rescue_modifier_node(node); end # Visit a RescueNode node. # - # source://prism//lib/prism/dot_visitor.rb#3881 + # source://prism//lib/prism/dot_visitor.rb#3903 def visit_rescue_node(node); end # Visit a RestParameterNode node. # - # source://prism//lib/prism/dot_visitor.rb#3934 + # source://prism//lib/prism/dot_visitor.rb#3956 def visit_rest_parameter_node(node); end # Visit a RetryNode node. # - # source://prism//lib/prism/dot_visitor.rb#3962 + # source://prism//lib/prism/dot_visitor.rb#3984 def visit_retry_node(node); end # Visit a ReturnNode node. # - # source://prism//lib/prism/dot_visitor.rb#3976 + # source://prism//lib/prism/dot_visitor.rb#3998 def visit_return_node(node); end # Visit a SelfNode node. # - # source://prism//lib/prism/dot_visitor.rb#3999 + # source://prism//lib/prism/dot_visitor.rb#4021 def visit_self_node(node); end + # Visit a ShareableConstantNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4035 + def visit_shareable_constant_node(node); end + # Visit a SingletonClassNode node. # - # source://prism//lib/prism/dot_visitor.rb#4013 + # source://prism//lib/prism/dot_visitor.rb#4056 def visit_singleton_class_node(node); end # Visit a SourceEncodingNode node. # - # source://prism//lib/prism/dot_visitor.rb#4049 + # source://prism//lib/prism/dot_visitor.rb#4092 def visit_source_encoding_node(node); end # Visit a SourceFileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4063 + # source://prism//lib/prism/dot_visitor.rb#4106 def visit_source_file_node(node); end # Visit a SourceLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#4080 + # source://prism//lib/prism/dot_visitor.rb#4126 def visit_source_line_node(node); end # Visit a SplatNode node. # - # source://prism//lib/prism/dot_visitor.rb#4094 + # source://prism//lib/prism/dot_visitor.rb#4140 def visit_splat_node(node); end # Visit a StatementsNode node. # - # source://prism//lib/prism/dot_visitor.rb#4117 + # source://prism//lib/prism/dot_visitor.rb#4163 def visit_statements_node(node); end # Visit a StringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4144 + # source://prism//lib/prism/dot_visitor.rb#4190 def visit_string_node(node); end # Visit a SuperNode node. # - # source://prism//lib/prism/dot_visitor.rb#4177 + # source://prism//lib/prism/dot_visitor.rb#4223 def visit_super_node(node); end # Visit a SymbolNode node. # - # source://prism//lib/prism/dot_visitor.rb#4216 + # source://prism//lib/prism/dot_visitor.rb#4262 def visit_symbol_node(node); end # Visit a TrueNode node. # - # source://prism//lib/prism/dot_visitor.rb#4251 + # source://prism//lib/prism/dot_visitor.rb#4297 def visit_true_node(node); end # Visit a UndefNode node. # - # source://prism//lib/prism/dot_visitor.rb#4265 + # source://prism//lib/prism/dot_visitor.rb#4311 def visit_undef_node(node); end # Visit a UnlessNode node. # - # source://prism//lib/prism/dot_visitor.rb#4295 + # source://prism//lib/prism/dot_visitor.rb#4341 def visit_unless_node(node); end # Visit a UntilNode node. # - # source://prism//lib/prism/dot_visitor.rb#4338 + # source://prism//lib/prism/dot_visitor.rb#4384 def visit_until_node(node); end # Visit a WhenNode node. # - # source://prism//lib/prism/dot_visitor.rb#4373 + # source://prism//lib/prism/dot_visitor.rb#4419 def visit_when_node(node); end # Visit a WhileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4409 + # source://prism//lib/prism/dot_visitor.rb#4460 def visit_while_node(node); end # Visit a XStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4444 + # source://prism//lib/prism/dot_visitor.rb#4495 def visit_x_string_node(node); end # Visit a YieldNode node. # - # source://prism//lib/prism/dot_visitor.rb#4473 + # source://prism//lib/prism/dot_visitor.rb#4524 def visit_yield_node(node); end private @@ -11016,168 +12476,180 @@ class Prism::DotVisitor < ::Prism::Visitor # 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 + # source://prism//lib/prism/dot_visitor.rb#4570 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 + # source://prism//lib/prism/dot_visitor.rb#4578 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 + # source://prism//lib/prism/dot_visitor.rb#4586 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 + # source://prism//lib/prism/dot_visitor.rb#4597 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 + # source://prism//lib/prism/dot_visitor.rb#4606 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#4617 + 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#4566 + # source://prism//lib/prism/dot_visitor.rb#4626 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 + # source://prism//lib/prism/dot_visitor.rb#4564 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 + # source://prism//lib/prism/dot_visitor.rb#4634 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 + # source://prism//lib/prism/dot_visitor.rb#4559 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 + # source://prism//lib/prism/dot_visitor.rb#4642 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 + # source://prism//lib/prism/dot_visitor.rb#4650 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 + # source://prism//lib/prism/dot_visitor.rb#4658 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#4676 + 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#4616 + # source://prism//lib/prism/dot_visitor.rb#4686 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 + # source://prism//lib/prism/dot_visitor.rb#4697 def symbol_flags_inspect(node); end end -# source://prism//lib/prism/dot_visitor.rb#58 +# 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#61 + # source://prism//lib/prism/dot_visitor.rb#62 def initialize; end - # source://prism//lib/prism/dot_visitor.rb#75 + # 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#59 + # source://prism//lib/prism/dot_visitor.rb#60 def edges; end - # source://prism//lib/prism/dot_visitor.rb#67 + # 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#59 + # source://prism//lib/prism/dot_visitor.rb#60 def nodes; end - # source://prism//lib/prism/dot_visitor.rb#79 + # source://prism//lib/prism/dot_visitor.rb#80 def to_dot; end - # source://prism//lib/prism/dot_visitor.rb#71 + # 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#59 + # source://prism//lib/prism/dot_visitor.rb#60 def waypoints; end end -# source://prism//lib/prism/dot_visitor.rb#14 +# 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#17 + # 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#15 + # source://prism//lib/prism/dot_visitor.rb#16 def name; end # Returns the value of attribute port. # - # source://prism//lib/prism/dot_visitor.rb#15 + # source://prism//lib/prism/dot_visitor.rb#16 def port; end - # source://prism//lib/prism/dot_visitor.rb#23 + # 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#15 + # source://prism//lib/prism/dot_visitor.rb#16 def value; end end -# source://prism//lib/prism/dot_visitor.rb#32 +# 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#35 + # source://prism//lib/prism/dot_visitor.rb#36 def initialize(name); end - # source://prism//lib/prism/dot_visitor.rb#40 + # 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#33 + # source://prism//lib/prism/dot_visitor.rb#34 def fields; end # Returns the value of attribute name. # - # source://prism//lib/prism/dot_visitor.rb#33 + # source://prism//lib/prism/dot_visitor.rb#34 def name; end - # source://prism//lib/prism/dot_visitor.rb#44 + # source://prism//lib/prism/dot_visitor.rb#45 def to_dot; end end @@ -11186,92 +12658,116 @@ end # if a then b else c end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6290 +# source://prism//lib/prism/node.rb#6593 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 + # source://prism//lib/prism/node.rb#6595 + sig do + params( + source: Prism::Source, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, else_keyword_loc, statements, end_keyword_loc, location); 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#6716 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6302 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6605 + 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#6307 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6610 + 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#6319 + # source://prism//lib/prism/node.rb#6622 + 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#6312 + # source://prism//lib/prism/node.rb#6615 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ElseNode + # def copy: (?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?, ?location: Location) -> ElseNode # - # source://prism//lib/prism/node.rb#6324 - sig { params(params: T.untyped).returns(Prism::ElseNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#6627 + sig do + params( + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::ElseNode) + end + def copy(else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#6610 + sig { override.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 + # source://prism//lib/prism/node.rb#6635 + 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#6365 + # source://prism//lib/prism/node.rb#6663 sig { returns(String) } def else_keyword; end # attr_reader else_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6343 + # source://prism//lib/prism/node.rb#6640 sig { returns(Prism::Location) } def else_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6370 + # source://prism//lib/prism/node.rb#6668 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6352 + # source://prism//lib/prism/node.rb#6650 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6375 + # source://prism//lib/prism/node.rb#6673 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6349 + # source://prism//lib/prism/node.rb#6647 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -11290,7 +12786,8 @@ class Prism::ElseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6402 + # source://prism//lib/prism/node.rb#6700 + sig { override.returns(Symbol) } def type; end class << self @@ -11301,7 +12798,7 @@ class Prism::ElseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6412 + # source://prism//lib/prism/node.rb#6710 def type; end end end @@ -11309,18 +12806,20 @@ end # EmbDocComment objects correspond to comments that are surrounded by =begin # and =end. # -# source://prism//lib/prism/parse_result.rb#290 +# source://prism//lib/prism/parse_result.rb#325 class Prism::EmbDocComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#297 + # source://prism//lib/prism/parse_result.rb#332 + sig { returns(String) } def inspect; end # This can only be true for inline comments. # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#292 + # source://prism//lib/prism/parse_result.rb#327 + sig { override.returns(T::Boolean) } def trailing?; end end @@ -11329,92 +12828,116 @@ end # "foo #{bar}" # ^^^^^^ # -# source://prism//lib/prism/node.rb#6421 +# source://prism//lib/prism/node.rb#6728 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 + # source://prism//lib/prism/node.rb#6730 + sig do + params( + source: Prism::Source, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, opening_loc, statements, closing_loc, location); 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#6845 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6433 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6740 + 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#6438 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6745 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#6495 + # source://prism//lib/prism/node.rb#6797 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#6483 + # source://prism//lib/prism/node.rb#6785 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6450 + # source://prism//lib/prism/node.rb#6757 + 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#6443 + # source://prism//lib/prism/node.rb#6750 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> EmbeddedStatementsNode + # def copy: (?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location, ?location: Location) -> EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6455 - sig { params(params: T.untyped).returns(Prism::EmbeddedStatementsNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#6762 + sig do + params( + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end + def copy(opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#6745 + sig { override.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 + # source://prism//lib/prism/node.rb#6770 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6500 + # source://prism//lib/prism/node.rb#6802 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#6490 + # source://prism//lib/prism/node.rb#6792 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#6474 + # source://prism//lib/prism/node.rb#6775 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6480 + # source://prism//lib/prism/node.rb#6782 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -11433,7 +12956,8 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6527 + # source://prism//lib/prism/node.rb#6829 + sig { override.returns(Symbol) } def type; end class << self @@ -11444,7 +12968,7 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6537 + # source://prism//lib/prism/node.rb#6839 def type; end end end @@ -11454,74 +12978,96 @@ end # "foo #@bar" # ^^^^^ # -# source://prism//lib/prism/node.rb#6546 +# source://prism//lib/prism/node.rb#6857 class Prism::EmbeddedVariableNode < ::Prism::Node - # def initialize: (Location operator_loc, Node variable, Location location) -> void + # def initialize: (Location operator_loc, Prism::node variable, Location location) -> void # # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6548 + # source://prism//lib/prism/node.rb#6859 + sig do + params( + source: Prism::Source, + operator_loc: Prism::Location, + variable: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, operator_loc, variable, location); 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#6954 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6557 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6868 + 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#6562 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6873 + 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#6572 + # source://prism//lib/prism/node.rb#6883 + 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#6567 + # source://prism//lib/prism/node.rb#6878 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> EmbeddedVariableNode + # def copy: (?operator_loc: Location, ?variable: Prism::node, ?location: Location) -> EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6577 - sig { params(params: T.untyped).returns(Prism::EmbeddedVariableNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#6888 + sig do + params( + operator_loc: Prism::Location, + variable: Prism::Node, + location: Prism::Location + ).returns(Prism::EmbeddedVariableNode) + end + def copy(operator_loc: T.unsafe(nil), variable: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#6873 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Prism::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 + # source://prism//lib/prism/node.rb#6896 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6610 + # source://prism//lib/prism/node.rb#6916 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6605 + # source://prism//lib/prism/node.rb#6911 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#6595 + # source://prism//lib/prism/node.rb#6901 sig { returns(Prism::Location) } def operator_loc; end @@ -11540,12 +13086,13 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6632 + # source://prism//lib/prism/node.rb#6938 + sig { override.returns(Symbol) } def type; end - # attr_reader variable: Node + # attr_reader variable: Prism::node # - # source://prism//lib/prism/node.rb#6601 + # source://prism//lib/prism/node.rb#6908 sig { returns(Prism::Node) } def variable; end @@ -11557,24 +13104,24 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6642 + # source://prism//lib/prism/node.rb#6948 def type; end end end # Flags for nodes that have unescaped content. # -# source://prism//lib/prism/node.rb#19268 +# source://prism//lib/prism/node.rb#20364 module Prism::EncodingFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19273 +# source://prism//lib/prism/node.rb#20369 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 +# source://prism//lib/prism/node.rb#20366 Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents an `ensure` clause in a `begin` statement. @@ -11586,92 +13133,116 @@ Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # bar # end # -# source://prism//lib/prism/node.rb#6655 +# source://prism//lib/prism/node.rb#6969 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 + # source://prism//lib/prism/node.rb#6971 + sig do + params( + source: Prism::Source, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, ensure_keyword_loc, statements, end_keyword_loc, location); 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#7086 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6667 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#6981 + 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#6672 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#6986 + 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#6684 + # source://prism//lib/prism/node.rb#6998 + 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#6677 + # source://prism//lib/prism/node.rb#6991 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> EnsureNode + # def copy: (?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location, ?location: Location) -> EnsureNode # - # source://prism//lib/prism/node.rb#6689 - sig { params(params: T.untyped).returns(Prism::EnsureNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7003 + sig do + params( + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::EnsureNode) + end + def copy(ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#6986 + sig { override.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 + # source://prism//lib/prism/node.rb#7011 + 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#6729 + # source://prism//lib/prism/node.rb#7038 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6717 + # source://prism//lib/prism/node.rb#7026 sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # - # source://prism//lib/prism/node.rb#6724 + # source://prism//lib/prism/node.rb#7033 sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6708 + # source://prism//lib/prism/node.rb#7016 sig { returns(Prism::Location) } def ensure_keyword_loc; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6734 + # source://prism//lib/prism/node.rb#7043 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6714 + # source://prism//lib/prism/node.rb#7023 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -11690,7 +13261,8 @@ class Prism::EnsureNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6761 + # source://prism//lib/prism/node.rb#7070 + sig { override.returns(Symbol) } def type; end class << self @@ -11701,7 +13273,7 @@ class Prism::EnsureNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6771 + # source://prism//lib/prism/node.rb#7080 def type; end end end @@ -11711,63 +13283,72 @@ end # false # ^^^^^ # -# source://prism//lib/prism/node.rb#6780 +# source://prism//lib/prism/node.rb#7098 class Prism::FalseNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [FalseNode] a new instance of FalseNode # - # source://prism//lib/prism/node.rb#6782 + # source://prism//lib/prism/node.rb#7100 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); 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#7175 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6789 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7107 + 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#6794 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7112 + 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#6804 + # source://prism//lib/prism/node.rb#7122 + 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#6799 + # source://prism//lib/prism/node.rb#7117 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> FalseNode + # def copy: (?location: Location) -> FalseNode # - # source://prism//lib/prism/node.rb#6809 - sig { params(params: T.untyped).returns(Prism::FalseNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7127 + sig { params(location: Prism::Location).returns(Prism::FalseNode) } + def copy(location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#7112 + sig { override.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 + # source://prism//lib/prism/node.rb#7135 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6826 + # source://prism//lib/prism/node.rb#7140 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -11785,7 +13366,8 @@ class Prism::FalseNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#6845 + # source://prism//lib/prism/node.rb#7159 + sig { override.returns(Symbol) } def type; end class << self @@ -11796,7 +13378,7 @@ class Prism::FalseNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#6855 + # source://prism//lib/prism/node.rb#7169 def type; end end end @@ -11812,110 +13394,140 @@ end # foo in Foo(*bar, baz, *qux) # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6870 +# source://prism//lib/prism/node.rb#7190 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 + # def initialize: (Prism::node? constant, Prism::node left, Array[Prism::node] requireds, Prism::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 + # source://prism//lib/prism/node.rb#7192 + sig do + params( + source: Prism::Source, + constant: T.nilable(Prism::Node), + left: Prism::Node, + requireds: T::Array[Prism::Node], + right: Prism::Node, + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, constant, left, requireds, right, opening_loc, closing_loc, location); 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#7339 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6885 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7205 + 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#6890 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7210 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#6974 + # source://prism//lib/prism/node.rb#7286 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#6956 + # source://prism//lib/prism/node.rb#7268 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6905 + # source://prism//lib/prism/node.rb#7225 + 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#6895 + # source://prism//lib/prism/node.rb#7215 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Node? + # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#6932 + # source://prism//lib/prism/node.rb#7243 sig { returns(T.nilable(Prism::Node)) } def constant; end - # def copy: (**params) -> FindPatternNode + # def copy: (?constant: Prism::node?, ?left: Prism::node, ?requireds: Array[Prism::node], ?right: Prism::node, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> FindPatternNode # - # source://prism//lib/prism/node.rb#6910 - sig { params(params: T.untyped).returns(Prism::FindPatternNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7230 + sig do + params( + constant: T.nilable(Prism::Node), + left: Prism::Node, + requireds: T::Array[Prism::Node], + right: Prism::Node, + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::FindPatternNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#7210 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, left: Prism::node, requireds: Array[Prism::node], right: Prism::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 + # source://prism//lib/prism/node.rb#7238 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#6979 + # source://prism//lib/prism/node.rb#7291 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader left: Node + # attr_reader left: Prism::node # - # source://prism//lib/prism/node.rb#6935 + # source://prism//lib/prism/node.rb#7246 sig { returns(Prism::Node) } def left; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#6969 + # source://prism//lib/prism/node.rb#7281 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#6944 + # source://prism//lib/prism/node.rb#7255 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # attr_reader requireds: Array[Node] + # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#6938 + # source://prism//lib/prism/node.rb#7249 sig { returns(T::Array[Prism::Node]) } def requireds; end - # attr_reader right: Node + # attr_reader right: Prism::node # - # source://prism//lib/prism/node.rb#6941 + # source://prism//lib/prism/node.rb#7252 sig { returns(Prism::Node) } def right; end @@ -11934,7 +13546,8 @@ class Prism::FindPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7011 + # source://prism//lib/prism/node.rb#7323 + sig { override.returns(Symbol) } def type; end class << self @@ -11945,7 +13558,7 @@ class Prism::FindPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7021 + # source://prism//lib/prism/node.rb#7333 def type; end end end @@ -11955,94 +13568,120 @@ end # baz if foo .. bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7030 +# source://prism//lib/prism/node.rb#7355 class Prism::FlipFlopNode < ::Prism::Node - # def initialize: (Integer flags, Node? left, Node? right, Location operator_loc, Location location) -> void + # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void # # @return [FlipFlopNode] a new instance of FlipFlopNode # - # source://prism//lib/prism/node.rb#7032 + # source://prism//lib/prism/node.rb#7357 + sig do + params( + source: Prism::Source, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, left, right, operator_loc, location); 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#7481 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7043 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7368 + 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#7048 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7373 + 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#7061 + # source://prism//lib/prism/node.rb#7386 + 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#7053 + # source://prism//lib/prism/node.rb#7378 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> FlipFlopNode + # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> FlipFlopNode # - # source://prism//lib/prism/node.rb#7066 - sig { params(params: T.untyped).returns(Prism::FlipFlopNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7391 + sig do + params( + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::FlipFlopNode) + end + def copy(flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#7373 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::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 + # source://prism//lib/prism/node.rb#7399 + 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#7103 + # source://prism//lib/prism/node.rb#7421 sig { returns(T::Boolean) } def exclude_end?; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7113 + # source://prism//lib/prism/node.rb#7431 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader left: Node? + # attr_reader left: Prism::node? # - # source://prism//lib/prism/node.rb#7090 + # source://prism//lib/prism/node.rb#7408 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7108 + # source://prism//lib/prism/node.rb#7426 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7096 + # source://prism//lib/prism/node.rb#7414 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader right: Node? + # attr_reader right: Prism::node? # - # source://prism//lib/prism/node.rb#7093 + # source://prism//lib/prism/node.rb#7411 sig { returns(T.nilable(Prism::Node)) } def right; end @@ -12061,14 +13700,15 @@ class Prism::FlipFlopNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7147 + # source://prism//lib/prism/node.rb#7465 + sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#7086 + # source://prism//lib/prism/node.rb#7404 sig { returns(Integer) } def flags; end @@ -12080,7 +13720,7 @@ class Prism::FlipFlopNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7157 + # source://prism//lib/prism/node.rb#7475 def type; end end end @@ -12090,63 +13730,72 @@ end # 1.0 # ^^^ # -# source://prism//lib/prism/node.rb#7166 +# source://prism//lib/prism/node.rb#7494 class Prism::FloatNode < ::Prism::Node - # def initialize: (Location location) -> void + # def initialize: (Float value, Location location) -> void # # @return [FloatNode] a new instance of FloatNode # - # source://prism//lib/prism/node.rb#7168 - def initialize(source, location); end + # source://prism//lib/prism/node.rb#7496 + sig { params(source: Prism::Source, value: Float, location: Prism::Location).void } + def initialize(source, value, location); 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#7576 + def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7175 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7504 + 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#7180 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7509 + 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#7190 + # source://prism//lib/prism/node.rb#7519 + 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#7185 + # source://prism//lib/prism/node.rb#7514 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> FloatNode + # def copy: (?value: Float, ?location: Location) -> FloatNode # - # source://prism//lib/prism/node.rb#7195 - sig { params(params: T.untyped).returns(Prism::FloatNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7524 + sig { params(value: Float, location: Prism::Location).returns(Prism::FloatNode) } + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#7509 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Float, 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 + # source://prism//lib/prism/node.rb#7532 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7212 + # source://prism//lib/prism/node.rb#7540 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -12164,12 +13813,14 @@ class Prism::FloatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7231 + # source://prism//lib/prism/node.rb#7560 + sig { override.returns(Symbol) } def type; end - # Returns the value of the node as a Ruby Float. + # The value of the floating point number as a Float. # - # source://prism//lib/prism/node_ext.rb#62 + # source://prism//lib/prism/node.rb#7537 + sig { returns(Float) } def value; end class << self @@ -12180,7 +13831,7 @@ class Prism::FloatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7241 + # source://prism//lib/prism/node.rb#7570 def type; end end end @@ -12190,128 +13841,160 @@ end # for i in a end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7250 +# source://prism//lib/prism/node.rb#7586 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 + # def initialize: (Prism::node index, Prism::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 + # source://prism//lib/prism/node.rb#7588 + sig do + params( + source: Prism::Source, + index: Prism::Node, + 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, + location: Prism::Location + ).void + end def initialize(source, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); 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#7751 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7266 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7602 + 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#7271 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7607 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end - # attr_reader collection: Node + # attr_reader collection: Prism::node # - # source://prism//lib/prism/node.rb#7316 + # source://prism//lib/prism/node.rb#7642 sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7285 + # source://prism//lib/prism/node.rb#7621 + 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#7276 + # source://prism//lib/prism/node.rb#7612 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ForNode + # def copy: (?index: Prism::node, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location, ?location: Location) -> ForNode # - # source://prism//lib/prism/node.rb#7290 - sig { params(params: T.untyped).returns(Prism::ForNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7626 + sig do + params( + index: Prism::Node, + 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, + location: Prism::Location + ).returns(Prism::ForNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#7607 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { index: Prism::node, collection: Prism::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 + # source://prism//lib/prism/node.rb#7634 + 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#7363 + # source://prism//lib/prism/node.rb#7692 sig { returns(T.nilable(String)) } def do_keyword; end # attr_reader do_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#7334 + # source://prism//lib/prism/node.rb#7662 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#7368 + # source://prism//lib/prism/node.rb#7697 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7346 + # source://prism//lib/prism/node.rb#7675 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#7353 + # source://prism//lib/prism/node.rb#7682 sig { returns(String) } def for_keyword; end # attr_reader for_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7322 + # source://prism//lib/prism/node.rb#7648 sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # - # source://prism//lib/prism/node.rb#7358 + # source://prism//lib/prism/node.rb#7687 sig { returns(String) } def in_keyword; end # attr_reader in_keyword_loc: Location # - # source://prism//lib/prism/node.rb#7328 + # source://prism//lib/prism/node.rb#7655 sig { returns(Prism::Location) } def in_keyword_loc; end - # attr_reader index: Node + # attr_reader index: Prism::node # - # source://prism//lib/prism/node.rb#7313 + # source://prism//lib/prism/node.rb#7639 sig { returns(Prism::Node) } def index; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7373 + # source://prism//lib/prism/node.rb#7702 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#7319 + # source://prism//lib/prism/node.rb#7645 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -12330,7 +14013,8 @@ class Prism::ForNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7406 + # source://prism//lib/prism/node.rb#7735 + sig { override.returns(Symbol) } def type; end class << self @@ -12341,7 +14025,7 @@ class Prism::ForNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7416 + # source://prism//lib/prism/node.rb#7745 def type; end end end @@ -12353,63 +14037,72 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7427 +# source://prism//lib/prism/node.rb#7769 class Prism::ForwardingArgumentsNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7429 + # source://prism//lib/prism/node.rb#7771 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); 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#7846 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7436 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7778 + 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#7441 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7783 + 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#7451 + # source://prism//lib/prism/node.rb#7793 + 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#7446 + # source://prism//lib/prism/node.rb#7788 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ForwardingArgumentsNode + # def copy: (?location: Location) -> ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7456 - sig { params(params: T.untyped).returns(Prism::ForwardingArgumentsNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7798 + sig { params(location: Prism::Location).returns(Prism::ForwardingArgumentsNode) } + def copy(location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#7783 + sig { override.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 + # source://prism//lib/prism/node.rb#7806 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7473 + # source://prism//lib/prism/node.rb#7811 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -12427,7 +14120,8 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7492 + # source://prism//lib/prism/node.rb#7830 + sig { override.returns(Symbol) } def type; end class << self @@ -12438,7 +14132,7 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7502 + # source://prism//lib/prism/node.rb#7840 def type; end end end @@ -12449,63 +14143,72 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7512 +# source://prism//lib/prism/node.rb#7856 class Prism::ForwardingParameterNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7514 + # source://prism//lib/prism/node.rb#7858 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); 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#7933 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7521 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7865 + 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#7526 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#7870 + 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#7536 + # source://prism//lib/prism/node.rb#7880 + 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#7531 + # source://prism//lib/prism/node.rb#7875 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ForwardingParameterNode + # def copy: (?location: Location) -> ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7541 - sig { params(params: T.untyped).returns(Prism::ForwardingParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7885 + sig { params(location: Prism::Location).returns(Prism::ForwardingParameterNode) } + def copy(location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#7870 + sig { override.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 + # source://prism//lib/prism/node.rb#7893 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7558 + # source://prism//lib/prism/node.rb#7898 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -12523,7 +14226,8 @@ class Prism::ForwardingParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7577 + # source://prism//lib/prism/node.rb#7917 + sig { override.returns(Symbol) } def type; end class << self @@ -12534,7 +14238,7 @@ class Prism::ForwardingParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7587 + # source://prism//lib/prism/node.rb#7927 def type; end end end @@ -12544,69 +14248,78 @@ end # super # ^^^^^ # -# source://prism//lib/prism/node.rb#7596 +# source://prism//lib/prism/node.rb#7942 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 + # source://prism//lib/prism/node.rb#7944 + sig { params(source: Prism::Source, block: T.nilable(Prism::BlockNode), location: Prism::Location).void } def initialize(source, block, location); 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#8031 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7606 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#7952 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockNode? # - # source://prism//lib/prism/node.rb#7645 + # source://prism//lib/prism/node.rb#7987 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)]) } + # source://prism//lib/prism/node.rb#7957 + 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#7623 + # source://prism//lib/prism/node.rb#7969 + 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#7616 + # source://prism//lib/prism/node.rb#7962 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ForwardingSuperNode + # def copy: (?block: BlockNode?, ?location: Location) -> ForwardingSuperNode # - # source://prism//lib/prism/node.rb#7628 - sig { params(params: T.untyped).returns(Prism::ForwardingSuperNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#7974 + sig { params(block: T.nilable(Prism::BlockNode), location: Prism::Location).returns(Prism::ForwardingSuperNode) } + def copy(block: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#7957 + sig { override.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 + # source://prism//lib/prism/node.rb#7982 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7649 + # source://prism//lib/prism/node.rb#7990 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -12624,7 +14337,8 @@ class Prism::ForwardingSuperNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7674 + # source://prism//lib/prism/node.rb#8015 + sig { override.returns(Symbol) } def type; end class << self @@ -12635,7 +14349,7 @@ class Prism::ForwardingSuperNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7684 + # source://prism//lib/prism/node.rb#8025 def type; end end end @@ -12645,89 +14359,115 @@ end # $target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7693 +# source://prism//lib/prism/node.rb#8041 class Prism::GlobalVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#7695 + # source://prism//lib/prism/node.rb#8043 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, operator_loc, value, location); 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#8152 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7706 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8054 + 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#7711 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8059 + 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#7721 + # source://prism//lib/prism/node.rb#8069 + 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#7716 + # source://prism//lib/prism/node.rb#8064 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableAndWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#7726 - sig { params(params: T.untyped).returns(Prism::GlobalVariableAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8074 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::GlobalVariableAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#8059 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#8082 + 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#161 + # source://prism//lib/prism/desugar_compiler.rb#163 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7770 + # source://prism//lib/prism/node.rb#8112 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7746 + # source://prism//lib/prism/node.rb#8087 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7749 + # source://prism//lib/prism/node.rb#8090 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7765 + # source://prism//lib/prism/node.rb#8107 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7755 + # source://prism//lib/prism/node.rb#8097 sig { returns(Prism::Location) } def operator_loc; end @@ -12746,12 +14486,13 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7794 + # source://prism//lib/prism/node.rb#8136 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7761 + # source://prism//lib/prism/node.rb#8104 sig { returns(Prism::Node) } def value; end @@ -12763,7 +14504,7 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7804 + # source://prism//lib/prism/node.rb#8146 def type; end end end @@ -12773,89 +14514,117 @@ end # $target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7813 +# source://prism//lib/prism/node.rb#8165 class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#7815 + # source://prism//lib/prism/node.rb#8167 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, operator_loc, value, operator, location); 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#8276 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7827 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8179 + 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#7832 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8184 + 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#7842 + # source://prism//lib/prism/node.rb#8194 + 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#7837 + # source://prism//lib/prism/node.rb#8189 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableOperatorWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#7847 - sig { params(params: T.untyped).returns(Prism::GlobalVariableOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8199 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).returns(Prism::GlobalVariableOperatorWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), operator: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#8184 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#8207 + 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#173 + # source://prism//lib/prism/desugar_compiler.rb#175 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#7890 + # source://prism//lib/prism/node.rb#8235 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7868 + # source://prism//lib/prism/node.rb#8212 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7871 + # source://prism//lib/prism/node.rb#8215 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#7886 + # source://prism//lib/prism/node.rb#8232 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7877 + # source://prism//lib/prism/node.rb#8222 sig { returns(Prism::Location) } def operator_loc; end @@ -12874,12 +14643,13 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#7915 + # source://prism//lib/prism/node.rb#8260 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7883 + # source://prism//lib/prism/node.rb#8229 sig { returns(Prism::Node) } def value; end @@ -12891,7 +14661,7 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#7925 + # source://prism//lib/prism/node.rb#8270 def type; end end end @@ -12901,89 +14671,115 @@ end # $target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7934 +# source://prism//lib/prism/node.rb#8290 class Prism::GlobalVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#7936 + # source://prism//lib/prism/node.rb#8292 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, operator_loc, value, location); 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#8401 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7947 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8303 + 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#7952 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8308 + 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#7962 + # source://prism//lib/prism/node.rb#8318 + 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#7957 + # source://prism//lib/prism/node.rb#8313 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableOrWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#7967 - sig { params(params: T.untyped).returns(Prism::GlobalVariableOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8323 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::GlobalVariableOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#8308 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#8331 + 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#167 + # source://prism//lib/prism/desugar_compiler.rb#169 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8011 + # source://prism//lib/prism/node.rb#8361 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7987 + # source://prism//lib/prism/node.rb#8336 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7990 + # source://prism//lib/prism/node.rb#8339 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8006 + # source://prism//lib/prism/node.rb#8356 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7996 + # source://prism//lib/prism/node.rb#8346 sig { returns(Prism::Location) } def operator_loc; end @@ -13002,12 +14798,13 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8035 + # source://prism//lib/prism/node.rb#8385 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8002 + # source://prism//lib/prism/node.rb#8353 sig { returns(Prism::Node) } def value; end @@ -13019,7 +14816,7 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8045 + # source://prism//lib/prism/node.rb#8395 def type; end end end @@ -13029,63 +14826,72 @@ end # $foo # ^^^^ # -# source://prism//lib/prism/node.rb#8054 +# source://prism//lib/prism/node.rb#8414 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 + # source://prism//lib/prism/node.rb#8416 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); 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#8500 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8064 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8424 + 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#8069 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8429 + 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#8079 + # source://prism//lib/prism/node.rb#8439 + 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#8074 + # source://prism//lib/prism/node.rb#8434 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableReadNode + # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#8084 - sig { params(params: T.untyped).returns(Prism::GlobalVariableReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8444 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#8429 + sig { override.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 + # source://prism//lib/prism/node.rb#8452 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8109 + # source://prism//lib/prism/node.rb#8464 + sig { params(inspector: T.untyped).returns(String) } 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. @@ -13094,7 +14900,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # $_Test # name `:$_Test` # - # source://prism//lib/prism/node.rb#8105 + # source://prism//lib/prism/node.rb#8461 sig { returns(Symbol) } def name; end @@ -13113,7 +14919,8 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8129 + # source://prism//lib/prism/node.rb#8484 + sig { override.returns(Symbol) } def type; end class << self @@ -13124,7 +14931,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8139 + # source://prism//lib/prism/node.rb#8494 def type; end end end @@ -13134,68 +14941,77 @@ end # $foo, $bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#8148 +# source://prism//lib/prism/node.rb#8510 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 + # source://prism//lib/prism/node.rb#8512 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); 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#8592 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8158 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8520 + 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#8163 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8525 + 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#8173 + # source://prism//lib/prism/node.rb#8535 + 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#8168 + # source://prism//lib/prism/node.rb#8530 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableTargetNode + # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#8178 - sig { params(params: T.untyped).returns(Prism::GlobalVariableTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8540 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableTargetNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#8525 + sig { override.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 + # source://prism//lib/prism/node.rb#8548 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8199 + # source://prism//lib/prism/node.rb#8556 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8195 + # source://prism//lib/prism/node.rb#8553 sig { returns(Symbol) } def name; end @@ -13214,7 +15030,8 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8219 + # source://prism//lib/prism/node.rb#8576 + sig { override.returns(Symbol) } def type; end class << self @@ -13225,7 +15042,7 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8229 + # source://prism//lib/prism/node.rb#8586 def type; end end end @@ -13235,86 +15052,122 @@ end # $foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#8238 +# source://prism//lib/prism/node.rb#8602 class Prism::GlobalVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8240 + # source://prism//lib/prism/node.rb#8604 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, value, operator_loc, location); 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#8729 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8251 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8615 + 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#8256 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8620 + 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#8266 + # source://prism//lib/prism/node.rb#8630 + 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#8261 + # source://prism//lib/prism/node.rb#8625 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8271 - sig { params(params: T.untyped).returns(Prism::GlobalVariableWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8635 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#8620 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#8643 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8315 + # source://prism//lib/prism/node.rb#8689 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol + # 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` # - # source://prism//lib/prism/node.rb#8291 + # $_Test = 123 # name `:$_Test` + # + # source://prism//lib/prism/node.rb#8652 sig { returns(Symbol) } def name; end - # attr_reader name_loc: Location + # The location of the global variable's name. + # + # $foo = :bar + # ^^^^ # - # source://prism//lib/prism/node.rb#8294 + # source://prism//lib/prism/node.rb#8658 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8310 + # source://prism//lib/prism/node.rb#8684 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the `=` operator. # - # source://prism//lib/prism/node.rb#8303 + # $foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#8677 sig { returns(Prism::Location) } def operator_loc; end @@ -13333,12 +15186,19 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8339 + # source://prism//lib/prism/node.rb#8713 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # 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#8300 + # source://prism//lib/prism/node.rb#8671 sig { returns(Prism::Node) } def value; end @@ -13350,7 +15210,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8349 + # source://prism//lib/prism/node.rb#8723 def type; end end end @@ -13360,30 +15220,45 @@ end # { a => b } # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8358 +# source://prism//lib/prism/node.rb#8742 class Prism::HashNode < ::Prism::Node - # def initialize: (Location opening_loc, Array[Node] elements, Location closing_loc, Location location) -> void + # def initialize: (Location opening_loc, Array[AssocNode | AssocSplatNode] elements, Location closing_loc, Location location) -> void # # @return [HashNode] a new instance of HashNode # - # source://prism//lib/prism/node.rb#8360 + # source://prism//lib/prism/node.rb#8744 + sig do + params( + source: Prism::Source, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, opening_loc, elements, closing_loc, location); 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#8864 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8370 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8754 + 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#8375 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8759 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#8442 + # source://prism//lib/prism/node.rb#8821 sig { returns(String) } def closing; end @@ -13392,41 +15267,46 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8430 + # source://prism//lib/prism/node.rb#8809 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8385 + # source://prism//lib/prism/node.rb#8769 + 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#8380 + # source://prism//lib/prism/node.rb#8764 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> HashNode + # def copy: (?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location, ?location: Location) -> HashNode # - # source://prism//lib/prism/node.rb#8390 - sig { params(params: T.untyped).returns(Prism::HashNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8774 + sig do + params( + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::HashNode) + end + def copy(opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#8759 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], 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 + # source://prism//lib/prism/node.rb#8782 + 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. @@ -13437,18 +15317,22 @@ class Prism::HashNode < ::Prism::Node # { **foo } # ^^^^^ # - # source://prism//lib/prism/node.rb#8424 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#8803 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8447 + # source://prism//lib/prism/node.rb#8826 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#8437 + # source://prism//lib/prism/node.rb#8816 sig { returns(String) } def opening; end @@ -13457,7 +15341,7 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8412 + # source://prism//lib/prism/node.rb#8790 sig { returns(Prism::Location) } def opening_loc; end @@ -13476,7 +15360,8 @@ class Prism::HashNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8469 + # source://prism//lib/prism/node.rb#8848 + sig { override.returns(Symbol) } def type; end class << self @@ -13487,7 +15372,7 @@ class Prism::HashNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8479 + # source://prism//lib/prism/node.rb#8858 def type; end end end @@ -13500,105 +15385,133 @@ end # foo => { a: 1, b: 2, **c } # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8491 +# source://prism//lib/prism/node.rb#8880 class Prism::HashPatternNode < ::Prism::Node - # def initialize: (Node? constant, Array[Node] elements, Node? rest, Location? opening_loc, Location? closing_loc, Location location) -> void + # def initialize: (Prism::node? constant, Array[AssocNode] elements, AssocSplatNode | NoKeywordsParameterNode | nil rest, Location? opening_loc, Location? closing_loc, Location location) -> void # # @return [HashPatternNode] a new instance of HashPatternNode # - # source://prism//lib/prism/node.rb#8493 + # source://prism//lib/prism/node.rb#8882 + sig do + params( + source: Prism::Source, + constant: T.nilable(Prism::Node), + 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), + location: Prism::Location + ).void + end def initialize(source, constant, elements, rest, opening_loc, closing_loc, location); 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#9026 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8505 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#8894 + 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#8510 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#8899 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#8589 + # source://prism//lib/prism/node.rb#8971 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#8571 + # source://prism//lib/prism/node.rb#8953 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8524 + # source://prism//lib/prism/node.rb#8913 + 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#8515 + # source://prism//lib/prism/node.rb#8904 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Node? + # attr_reader constant: Prism::node? # - # source://prism//lib/prism/node.rb#8550 + # source://prism//lib/prism/node.rb#8931 sig { returns(T.nilable(Prism::Node)) } def constant; end - # def copy: (**params) -> HashPatternNode + # def copy: (?constant: Prism::node?, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> HashPatternNode # - # source://prism//lib/prism/node.rb#8529 - sig { params(params: T.untyped).returns(Prism::HashPatternNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#8918 + sig do + params( + constant: T.nilable(Prism::Node), + 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), + location: Prism::Location + ).returns(Prism::HashPatternNode) + end + def copy(constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#8899 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, 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 + # source://prism//lib/prism/node.rb#8926 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader elements: Array[Node] + # attr_reader elements: Array[AssocNode] # - # source://prism//lib/prism/node.rb#8553 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#8934 + sig { returns(T::Array[Prism::AssocNode]) } def elements; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8594 + # source://prism//lib/prism/node.rb#8976 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#8584 + # source://prism//lib/prism/node.rb#8966 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#8559 + # source://prism//lib/prism/node.rb#8940 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # attr_reader rest: Node? + # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#8556 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#8937 + sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } def rest; end # Sometimes you want to check an instance of a node against a list of @@ -13616,7 +15529,8 @@ class Prism::HashPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8628 + # source://prism//lib/prism/node.rb#9010 + sig { override.returns(Symbol) } def type; end class << self @@ -13627,7 +15541,7 @@ class Prism::HashPatternNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8638 + # source://prism//lib/prism/node.rb#9020 def type; end end end @@ -13642,7 +15556,7 @@ module Prism::HeredocQuery def heredoc?; end end -# Represents the use of the `if` keyword, either in the block form or the modifier form. +# Represents the use of the `if` keyword, either in the block form or the modifier form, or a ternary expression. # # bar if foo # ^^^^^^^^^^ @@ -13650,119 +15564,198 @@ end # if foo then bar end # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8650 +# foo ? bar : baz +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9047 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 + # def initialize: (Location? if_keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, Prism::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 - + # source://prism//lib/prism/node.rb#9049 + sig do + params( + source: Prism::Source, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::Node), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end + def initialize(source, if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); 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#9264 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8665 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#9062 + 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#8674 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9071 + 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#8688 + # source://prism//lib/prism/node.rb#9085 + 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#8679 + # source://prism//lib/prism/node.rb#9076 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader consequent: Node? + # 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 + # ^^^ # - # source://prism//lib/prism/node.rb#8745 + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#9176 sig { returns(T.nilable(Prism::Node)) } def consequent; end - # def copy: (**params) -> IfNode + # def copy: (?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: Prism::node?, ?end_keyword_loc: Location?, ?location: Location) -> IfNode # - # source://prism//lib/prism/node.rb#8693 - sig { params(params: T.untyped).returns(Prism::IfNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#9090 + sig do + params( + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::Node), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::IfNode) + end + def copy(if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#9071 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Prism::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 + # source://prism//lib/prism/node.rb#9098 + 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#8771 + # source://prism//lib/prism/node.rb#9207 sig { returns(T.nilable(String)) } def end_keyword; end - # attr_reader end_keyword_loc: Location? + # The location of the `end` keyword if present, `nil` otherwise. + # + # if foo + # bar + # end + # ^^^ # - # source://prism//lib/prism/node.rb#8748 + # source://prism//lib/prism/node.rb#9184 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#8761 + # source://prism//lib/prism/node.rb#9197 sig { returns(T.nilable(String)) } def if_keyword; end - # attr_reader if_keyword_loc: Location? + # The location of the `if` keyword if present. + # + # bar if foo + # ^^ # - # source://prism//lib/prism/node.rb#8715 + # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. + # + # source://prism//lib/prism/node.rb#9108 sig { returns(T.nilable(Prism::Location)) } def if_keyword_loc; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8776 + # source://prism//lib/prism/node.rb#9212 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader predicate: Node + # 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#8727 + # source://prism//lib/prism/node.rb#9132 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#8669 + # source://prism//lib/prism/node.rb#9066 def set_newline_flag(newline_marked); end - # attr_reader statements: StatementsNode? + # 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#8742 + # source://prism//lib/prism/node.rb#9161 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8766 + # source://prism//lib/prism/node.rb#9202 sig { returns(T.nilable(String)) } def then_keyword; end - # attr_reader then_keyword_loc: Location? + # 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#8730 + # source://prism//lib/prism/node.rb#9141 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end @@ -13781,7 +15774,8 @@ class Prism::IfNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8812 + # source://prism//lib/prism/node.rb#9248 + sig { override.returns(Symbol) } def type; end class << self @@ -13792,7 +15786,7 @@ class Prism::IfNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8822 + # source://prism//lib/prism/node.rb#9258 def type; end end end @@ -13802,69 +15796,89 @@ end # 1.0i # ^^^^ # -# source://prism//lib/prism/node.rb#8831 +# source://prism//lib/prism/node.rb#9279 class Prism::ImaginaryNode < ::Prism::Node - # def initialize: (Node numeric, Location location) -> void + # def initialize: (FloatNode | IntegerNode | RationalNode numeric, Location location) -> void # # @return [ImaginaryNode] a new instance of ImaginaryNode # - # source://prism//lib/prism/node.rb#8833 + # source://prism//lib/prism/node.rb#9281 + sig do + params( + source: Prism::Source, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), + location: Prism::Location + ).void + end def initialize(source, numeric, location); 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#9362 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8841 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#9289 + 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#8846 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9294 + 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#8856 + # source://prism//lib/prism/node.rb#9304 + 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#8851 + # source://prism//lib/prism/node.rb#9299 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ImaginaryNode + # def copy: (?numeric: FloatNode | IntegerNode | RationalNode, ?location: Location) -> ImaginaryNode # - # source://prism//lib/prism/node.rb#8861 - sig { params(params: T.untyped).returns(Prism::ImaginaryNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#9309 + sig do + params( + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), + location: Prism::Location + ).returns(Prism::ImaginaryNode) + end + def copy(numeric: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#9294 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: FloatNode | IntegerNode | RationalNode, 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 + # source://prism//lib/prism/node.rb#9317 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8882 + # source://prism//lib/prism/node.rb#9325 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader numeric: Node + # attr_reader numeric: FloatNode | IntegerNode | RationalNode # - # source://prism//lib/prism/node.rb#8878 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#9322 + sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } def numeric; end # Sometimes you want to check an instance of a node against a list of @@ -13882,12 +15896,14 @@ class Prism::ImaginaryNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#8903 + # source://prism//lib/prism/node.rb#9346 + sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Complex. # - # source://prism//lib/prism/node_ext.rb#69 + # source://prism//lib/prism/node_ext.rb#87 + sig { returns(Complex) } def value; end class << self @@ -13898,7 +15914,7 @@ class Prism::ImaginaryNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#8913 + # source://prism//lib/prism/node.rb#9356 def type; end end end @@ -13914,63 +15930,72 @@ end # foo in { bar: } # ^^^^ # -# source://prism//lib/prism/node.rb#8928 +# source://prism//lib/prism/node.rb#9378 class Prism::ImplicitNode < ::Prism::Node - # def initialize: (Node value, Location location) -> void + # def initialize: (Prism::node value, Location location) -> void # # @return [ImplicitNode] a new instance of ImplicitNode # - # source://prism//lib/prism/node.rb#8930 + # source://prism//lib/prism/node.rb#9380 + sig { params(source: Prism::Source, value: Prism::Node, location: Prism::Location).void } def initialize(source, value, location); 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#9461 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8938 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#9388 + 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#8943 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9393 + 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#8953 + # source://prism//lib/prism/node.rb#9403 + 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#8948 + # source://prism//lib/prism/node.rb#9398 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ImplicitNode + # def copy: (?value: Prism::node, ?location: Location) -> ImplicitNode # - # source://prism//lib/prism/node.rb#8958 - sig { params(params: T.untyped).returns(Prism::ImplicitNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#9408 + sig { params(value: Prism::Node, location: Prism::Location).returns(Prism::ImplicitNode) } + def copy(value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#9393 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::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 + # source://prism//lib/prism/node.rb#9416 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#8979 + # source://prism//lib/prism/node.rb#9424 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -13988,12 +16013,13 @@ class Prism::ImplicitNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9000 + # source://prism//lib/prism/node.rb#9445 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#8975 + # source://prism//lib/prism/node.rb#9421 sig { returns(Prism::Node) } def value; end @@ -14005,7 +16031,7 @@ class Prism::ImplicitNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9010 + # source://prism//lib/prism/node.rb#9455 def type; end end end @@ -14024,63 +16050,72 @@ end # foo, = bar # ^ # -# source://prism//lib/prism/node.rb#9028 +# source://prism//lib/prism/node.rb#9480 class Prism::ImplicitRestNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [ImplicitRestNode] a new instance of ImplicitRestNode # - # source://prism//lib/prism/node.rb#9030 + # source://prism//lib/prism/node.rb#9482 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); 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#9557 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9037 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#9489 + 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#9042 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9494 + 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#9052 + # source://prism//lib/prism/node.rb#9504 + 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#9047 + # source://prism//lib/prism/node.rb#9499 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ImplicitRestNode + # def copy: (?location: Location) -> ImplicitRestNode # - # source://prism//lib/prism/node.rb#9057 - sig { params(params: T.untyped).returns(Prism::ImplicitRestNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#9509 + sig { params(location: Prism::Location).returns(Prism::ImplicitRestNode) } + def copy(location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#9494 + sig { override.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 + # source://prism//lib/prism/node.rb#9517 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9074 + # source://prism//lib/prism/node.rb#9522 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -14098,7 +16133,8 @@ class Prism::ImplicitRestNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9093 + # source://prism//lib/prism/node.rb#9541 + sig { override.returns(Symbol) } def type; end class << self @@ -14109,7 +16145,7 @@ class Prism::ImplicitRestNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9103 + # source://prism//lib/prism/node.rb#9551 def type; end end end @@ -14119,98 +16155,124 @@ end # case a; in b then c end # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9112 +# source://prism//lib/prism/node.rb#9566 class Prism::InNode < ::Prism::Node - # def initialize: (Node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, Location location) -> void + # def initialize: (Prism::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 + # source://prism//lib/prism/node.rb#9568 + sig do + params( + source: Prism::Source, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, pattern, statements, in_loc, then_loc, location); 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#9696 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9125 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#9579 + 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#9130 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#9584 + 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#9143 + # source://prism//lib/prism/node.rb#9597 + 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#9135 + # source://prism//lib/prism/node.rb#9589 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InNode + # def copy: (?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?, ?location: Location) -> InNode # - # source://prism//lib/prism/node.rb#9148 - sig { params(params: T.untyped).returns(Prism::InNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#9602 + sig do + params( + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::InNode) + end + def copy(pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#9584 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { pattern: Prism::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 + # source://prism//lib/prism/node.rb#9610 + 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#9193 + # source://prism//lib/prism/node.rb#9641 sig { returns(String) } def in; end # attr_reader in_loc: Location # - # source://prism//lib/prism/node.rb#9174 + # source://prism//lib/prism/node.rb#9621 sig { returns(Prism::Location) } def in_loc; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9203 + # source://prism//lib/prism/node.rb#9651 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader pattern: Node + # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#9168 + # source://prism//lib/prism/node.rb#9615 sig { returns(Prism::Node) } def pattern; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#9171 + # source://prism//lib/prism/node.rb#9618 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then: () -> String? # - # source://prism//lib/prism/node.rb#9198 + # source://prism//lib/prism/node.rb#9646 sig { returns(T.nilable(String)) } def then; end # attr_reader then_loc: Location? # - # source://prism//lib/prism/node.rb#9180 + # source://prism//lib/prism/node.rb#9628 sig { returns(T.nilable(Prism::Location)) } def then_loc; end @@ -14229,7 +16291,8 @@ class Prism::InNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9232 + # source://prism//lib/prism/node.rb#9680 + sig { override.returns(Symbol) } def type; end class << self @@ -14240,7 +16303,7 @@ class Prism::InNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9242 + # source://prism//lib/prism/node.rb#9690 def type; end end end @@ -14250,24 +16313,45 @@ end # foo.bar[baz] &&= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9251 +# source://prism//lib/prism/node.rb#9709 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 + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void # # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9253 + # source://prism//lib/prism/node.rb#9711 + sig do + params( + source: Prism::Source, + 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::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); 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#9916 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9269 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#9727 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9344 + # source://prism//lib/prism/node.rb#9792 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -14275,119 +16359,134 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9376 + # source://prism//lib/prism/node.rb#9825 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Node? + # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#9353 + # source://prism//lib/prism/node.rb#9802 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9386 + # source://prism//lib/prism/node.rb#9835 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9326 + # source://prism//lib/prism/node.rb#9772 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)]) } + # source://prism//lib/prism/node.rb#9732 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9396 + # source://prism//lib/prism/node.rb#9845 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9347 + # source://prism//lib/prism/node.rb#9795 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9289 + # source://prism//lib/prism/node.rb#9747 + 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#9279 + # source://prism//lib/prism/node.rb#9737 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> IndexAndWriteNode + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9294 - sig { params(params: T.untyped).returns(Prism::IndexAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#9752 + sig do + params( + 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::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::IndexAndWriteNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#9732 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#9760 + 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#9381 + # source://prism//lib/prism/node.rb#9830 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9406 + # source://prism//lib/prism/node.rb#9855 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9391 + # source://prism//lib/prism/node.rb#9840 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9338 + # source://prism//lib/prism/node.rb#9785 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9401 + # source://prism//lib/prism/node.rb#9850 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9356 + # source://prism//lib/prism/node.rb#9805 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9323 + # source://prism//lib/prism/node.rb#9769 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -14395,7 +16494,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9366 + # source://prism//lib/prism/node.rb#9815 sig { returns(T::Boolean) } def safe_navigation?; end @@ -14414,12 +16513,13 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9451 + # source://prism//lib/prism/node.rb#9900 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9362 + # source://prism//lib/prism/node.rb#9812 sig { returns(Prism::Node) } def value; end @@ -14427,15 +16527,15 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9371 + # source://prism//lib/prism/node.rb#9820 sig { returns(T::Boolean) } def variable_call?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9319 + # source://prism//lib/prism/node.rb#9765 sig { returns(Integer) } def flags; end @@ -14447,7 +16547,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9461 + # source://prism//lib/prism/node.rb#9910 def type; end end end @@ -14457,24 +16557,46 @@ end # foo.bar[baz] += value # ^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9470 +# source://prism//lib/prism/node.rb#9934 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 + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Symbol operator, Location operator_loc, Prism::node value, Location location) -> void # # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode # - # source://prism//lib/prism/node.rb#9472 + # source://prism//lib/prism/node.rb#9936 + sig do + params( + source: Prism::Source, + 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::Node), + operator: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location); 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#10141 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9489 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#9953 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9565 + # source://prism//lib/prism/node.rb#10018 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -14482,119 +16604,135 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9600 + # source://prism//lib/prism/node.rb#10054 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Node? + # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#9574 + # source://prism//lib/prism/node.rb#10028 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9610 + # source://prism//lib/prism/node.rb#10064 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9547 + # source://prism//lib/prism/node.rb#9998 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)]) } + # source://prism//lib/prism/node.rb#9958 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9620 + # source://prism//lib/prism/node.rb#10074 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9568 + # source://prism//lib/prism/node.rb#10021 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9509 + # source://prism//lib/prism/node.rb#9973 + 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#9499 + # source://prism//lib/prism/node.rb#9963 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> IndexOperatorWriteNode + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOperatorWriteNode # - # source://prism//lib/prism/node.rb#9514 - sig { params(params: T.untyped).returns(Prism::IndexOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#9978 + sig do + params( + 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::Node), + operator: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::IndexOperatorWriteNode) + end + def copy(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: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#9958 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator: Symbol, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#9986 + 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#9605 + # source://prism//lib/prism/node.rb#10059 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9625 + # source://prism//lib/prism/node.rb#10079 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9615 + # source://prism//lib/prism/node.rb#10069 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9559 + # source://prism//lib/prism/node.rb#10011 sig { returns(Prism::Location) } def opening_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#9577 + # source://prism//lib/prism/node.rb#10031 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9580 + # source://prism//lib/prism/node.rb#10034 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9544 + # source://prism//lib/prism/node.rb#9995 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -14602,7 +16740,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9590 + # source://prism//lib/prism/node.rb#10044 sig { returns(T::Boolean) } def safe_navigation?; end @@ -14621,12 +16759,13 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9671 + # source://prism//lib/prism/node.rb#10125 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9586 + # source://prism//lib/prism/node.rb#10041 sig { returns(Prism::Node) } def value; end @@ -14634,15 +16773,15 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9595 + # source://prism//lib/prism/node.rb#10049 sig { returns(T::Boolean) } def variable_call?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9540 + # source://prism//lib/prism/node.rb#9991 sig { returns(Integer) } def flags; end @@ -14654,7 +16793,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9681 + # source://prism//lib/prism/node.rb#10135 def type; end end end @@ -14664,24 +16803,45 @@ end # foo.bar[baz] ||= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9690 +# source://prism//lib/prism/node.rb#10160 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 + # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void # # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode # - # source://prism//lib/prism/node.rb#9692 + # source://prism//lib/prism/node.rb#10162 + sig do + params( + source: Prism::Source, + 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::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); 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#10367 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9708 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#10178 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9783 + # source://prism//lib/prism/node.rb#10243 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -14689,119 +16849,134 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9815 + # source://prism//lib/prism/node.rb#10276 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Node? + # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#9792 + # source://prism//lib/prism/node.rb#10253 sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9825 + # source://prism//lib/prism/node.rb#10286 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9765 + # source://prism//lib/prism/node.rb#10223 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)]) } + # source://prism//lib/prism/node.rb#10183 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9835 + # source://prism//lib/prism/node.rb#10296 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9786 + # source://prism//lib/prism/node.rb#10246 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9728 + # source://prism//lib/prism/node.rb#10198 + 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#9718 + # source://prism//lib/prism/node.rb#10188 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> IndexOrWriteNode + # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOrWriteNode # - # source://prism//lib/prism/node.rb#9733 - sig { params(params: T.untyped).returns(Prism::IndexOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10203 + sig do + params( + 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::Node), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::IndexOrWriteNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#10183 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#10211 + 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#9820 + # source://prism//lib/prism/node.rb#10281 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#9845 + # source://prism//lib/prism/node.rb#10306 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9830 + # source://prism//lib/prism/node.rb#10291 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9777 + # source://prism//lib/prism/node.rb#10236 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9840 + # source://prism//lib/prism/node.rb#10301 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9795 + # source://prism//lib/prism/node.rb#10256 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader receiver: Node? + # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9762 + # source://prism//lib/prism/node.rb#10220 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -14809,7 +16984,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9805 + # source://prism//lib/prism/node.rb#10266 sig { returns(T::Boolean) } def safe_navigation?; end @@ -14828,12 +17003,13 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#9890 + # source://prism//lib/prism/node.rb#10351 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9801 + # source://prism//lib/prism/node.rb#10263 sig { returns(Prism::Node) } def value; end @@ -14841,15 +17017,15 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9810 + # source://prism//lib/prism/node.rb#10271 sig { returns(T::Boolean) } def variable_call?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9758 + # source://prism//lib/prism/node.rb#10216 sig { returns(Integer) } def flags; end @@ -14861,7 +17037,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#9900 + # source://prism//lib/prism/node.rb#10361 def type; end end end @@ -14879,24 +17055,42 @@ end # for foo[bar] in baz do end # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#9917 +# source://prism//lib/prism/node.rb#10393 class Prism::IndexTargetNode < ::Prism::Node - # def initialize: (Integer flags, Node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Node? block, Location location) -> void + # def initialize: (Integer flags, Prism::node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location location) -> void # # @return [IndexTargetNode] a new instance of IndexTargetNode # - # source://prism//lib/prism/node.rb#9919 + # source://prism//lib/prism/node.rb#10395 + sig do + params( + source: Prism::Source, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + location: Prism::Location + ).void + end def initialize(source, flags, receiver, opening_loc, arguments, closing_loc, block, location); 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#10555 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9932 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#10408 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9991 + # source://prism//lib/prism/node.rb#10459 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -14904,95 +17098,107 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10014 + # source://prism//lib/prism/node.rb#10482 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Node? + # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#10000 + # source://prism//lib/prism/node.rb#10469 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)]) } + # source://prism//lib/prism/node.rb#10413 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10029 + # source://prism//lib/prism/node.rb#10497 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9994 + # source://prism//lib/prism/node.rb#10462 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9951 + # source://prism//lib/prism/node.rb#10427 + 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#9942 + # source://prism//lib/prism/node.rb#10418 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> IndexTargetNode + # def copy: (?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?location: Location) -> IndexTargetNode # - # source://prism//lib/prism/node.rb#9956 - sig { params(params: T.untyped).returns(Prism::IndexTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10432 + sig do + params( + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::IndexTargetNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#10413 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::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 + # source://prism//lib/prism/node.rb#10440 + 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#10019 + # source://prism//lib/prism/node.rb#10487 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10034 + # source://prism//lib/prism/node.rb#10502 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10024 + # source://prism//lib/prism/node.rb#10492 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9985 + # source://prism//lib/prism/node.rb#10452 sig { returns(Prism::Location) } def opening_loc; end - # attr_reader receiver: Node + # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#9982 + # source://prism//lib/prism/node.rb#10449 sig { returns(Prism::Node) } def receiver; end @@ -15000,7 +17206,7 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10004 + # source://prism//lib/prism/node.rb#10472 sig { returns(T::Boolean) } def safe_navigation?; end @@ -15019,22 +17225,23 @@ class Prism::IndexTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10071 + # source://prism//lib/prism/node.rb#10539 + sig { override.returns(Symbol) } def type; end # def variable_call?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10009 + # source://prism//lib/prism/node.rb#10477 sig { returns(T::Boolean) } def variable_call?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#9978 + # source://prism//lib/prism/node.rb#10445 sig { returns(Integer) } def flags; end @@ -15046,7 +17253,7 @@ class Prism::IndexTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10081 + # source://prism//lib/prism/node.rb#10549 def type; end end end @@ -15054,11 +17261,12 @@ 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 +# source://prism//lib/prism/parse_result.rb#310 class Prism::InlineComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#283 + # source://prism//lib/prism/parse_result.rb#318 + sig { returns(String) } def inspect; end # Returns true if this comment happens on the same line as other code and @@ -15066,7 +17274,7 @@ class Prism::InlineComment < ::Prism::Comment # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#278 + # source://prism//lib/prism/parse_result.rb#313 sig { override.returns(T::Boolean) } def trailing?; end end @@ -15076,89 +17284,115 @@ end # @target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10090 +# source://prism//lib/prism/node.rb#10570 class Prism::InstanceVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#10092 + # source://prism//lib/prism/node.rb#10572 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, operator_loc, value, location); 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#10681 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10103 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#10583 + 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#10108 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10588 + 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#10118 + # source://prism//lib/prism/node.rb#10598 + 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#10113 + # source://prism//lib/prism/node.rb#10593 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InstanceVariableAndWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#10123 - sig { params(params: T.untyped).returns(Prism::InstanceVariableAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10603 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::InstanceVariableAndWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#10588 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#10611 + 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#179 + # source://prism//lib/prism/desugar_compiler.rb#181 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10167 + # source://prism//lib/prism/node.rb#10641 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10143 + # source://prism//lib/prism/node.rb#10616 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10146 + # source://prism//lib/prism/node.rb#10619 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10162 + # source://prism//lib/prism/node.rb#10636 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10152 + # source://prism//lib/prism/node.rb#10626 sig { returns(Prism::Location) } def operator_loc; end @@ -15177,12 +17411,13 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10191 + # source://prism//lib/prism/node.rb#10665 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10158 + # source://prism//lib/prism/node.rb#10633 sig { returns(Prism::Node) } def value; end @@ -15194,7 +17429,7 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10201 + # source://prism//lib/prism/node.rb#10675 def type; end end end @@ -15204,89 +17439,117 @@ end # @target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10210 +# source://prism//lib/prism/node.rb#10694 class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Symbol operator, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Symbol operator, Location location) -> void # # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#10212 + # source://prism//lib/prism/node.rb#10696 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, operator_loc, value, operator, location); 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#10805 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10224 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#10708 + 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#10229 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10713 + 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#10239 + # source://prism//lib/prism/node.rb#10723 + 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#10234 + # source://prism//lib/prism/node.rb#10718 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InstanceVariableOperatorWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#10244 - sig { params(params: T.untyped).returns(Prism::InstanceVariableOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10728 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + operator: Symbol, + location: Prism::Location + ).returns(Prism::InstanceVariableOperatorWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), operator: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#10713 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#10736 + 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#191 + # source://prism//lib/prism/desugar_compiler.rb#193 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10287 + # source://prism//lib/prism/node.rb#10764 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10265 + # source://prism//lib/prism/node.rb#10741 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10268 + # source://prism//lib/prism/node.rb#10744 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#10283 + # source://prism//lib/prism/node.rb#10761 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10274 + # source://prism//lib/prism/node.rb#10751 sig { returns(Prism::Location) } def operator_loc; end @@ -15305,12 +17568,13 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10312 + # source://prism//lib/prism/node.rb#10789 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10280 + # source://prism//lib/prism/node.rb#10758 sig { returns(Prism::Node) } def value; end @@ -15322,7 +17586,7 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10322 + # source://prism//lib/prism/node.rb#10799 def type; end end end @@ -15332,89 +17596,115 @@ end # @target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10331 +# source://prism//lib/prism/node.rb#10819 class Prism::InstanceVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10333 + # source://prism//lib/prism/node.rb#10821 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, operator_loc, value, location); 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#10930 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10344 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#10832 + 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#10349 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10837 + 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#10359 + # source://prism//lib/prism/node.rb#10847 + 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#10354 + # source://prism//lib/prism/node.rb#10842 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InstanceVariableOrWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10364 - sig { params(params: T.untyped).returns(Prism::InstanceVariableOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10852 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::InstanceVariableOrWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#10837 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#10860 + 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#185 + # source://prism//lib/prism/desugar_compiler.rb#187 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10408 + # source://prism//lib/prism/node.rb#10890 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10384 + # source://prism//lib/prism/node.rb#10865 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10387 + # source://prism//lib/prism/node.rb#10868 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10403 + # source://prism//lib/prism/node.rb#10885 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10393 + # source://prism//lib/prism/node.rb#10875 sig { returns(Prism::Location) } def operator_loc; end @@ -15433,12 +17723,13 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10432 + # source://prism//lib/prism/node.rb#10914 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10399 + # source://prism//lib/prism/node.rb#10882 sig { returns(Prism::Node) } def value; end @@ -15450,7 +17741,7 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10442 + # source://prism//lib/prism/node.rb#10924 def type; end end end @@ -15460,63 +17751,72 @@ end # @foo # ^^^^ # -# source://prism//lib/prism/node.rb#10451 +# source://prism//lib/prism/node.rb#10943 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 + # source://prism//lib/prism/node.rb#10945 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); 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#11029 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10461 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#10953 + 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#10466 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#10958 + 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#10476 + # source://prism//lib/prism/node.rb#10968 + 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#10471 + # source://prism//lib/prism/node.rb#10963 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InstanceVariableReadNode + # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableReadNode # - # source://prism//lib/prism/node.rb#10481 - sig { params(params: T.untyped).returns(Prism::InstanceVariableReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#10973 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableReadNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#10958 + sig { override.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 + # source://prism//lib/prism/node.rb#10981 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10506 + # source://prism//lib/prism/node.rb#10993 + sig { params(inspector: T.untyped).returns(String) } 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). @@ -15525,7 +17825,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # @_test # name `:@_test` # - # source://prism//lib/prism/node.rb#10502 + # source://prism//lib/prism/node.rb#10990 sig { returns(Symbol) } def name; end @@ -15544,7 +17844,8 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10526 + # source://prism//lib/prism/node.rb#11013 + sig { override.returns(Symbol) } def type; end class << self @@ -15555,7 +17856,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10536 + # source://prism//lib/prism/node.rb#11023 def type; end end end @@ -15565,68 +17866,77 @@ end # @foo, @bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#10545 +# source://prism//lib/prism/node.rb#11039 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 + # source://prism//lib/prism/node.rb#11041 + sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } def initialize(source, name, location); end - # def accept: (Visitor visitor) -> void + # 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#10555 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11121 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#11049 + 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#10560 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11054 + 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#10570 + # source://prism//lib/prism/node.rb#11064 + 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#10565 + # source://prism//lib/prism/node.rb#11059 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InstanceVariableTargetNode + # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableTargetNode # - # source://prism//lib/prism/node.rb#10575 - sig { params(params: T.untyped).returns(Prism::InstanceVariableTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11069 + sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableTargetNode) } + def copy(name: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#11054 + sig { override.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 + # source://prism//lib/prism/node.rb#11077 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10596 + # source://prism//lib/prism/node.rb#11085 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10592 + # source://prism//lib/prism/node.rb#11082 sig { returns(Symbol) } def name; end @@ -15645,7 +17955,8 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10616 + # source://prism//lib/prism/node.rb#11105 + sig { override.returns(Symbol) } def type; end class << self @@ -15656,7 +17967,7 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10626 + # source://prism//lib/prism/node.rb#11115 def type; end end end @@ -15666,86 +17977,122 @@ end # @foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#10635 +# source://prism//lib/prism/node.rb#11131 class Prism::InstanceVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Node value, Location operator_loc, Location location) -> void + # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#10637 + # source://prism//lib/prism/node.rb#11133 + sig do + params( + source: Prism::Source, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, name, name_loc, value, operator_loc, location); 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#11258 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10648 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11144 + 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#10653 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11149 + 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#10663 + # source://prism//lib/prism/node.rb#11159 + 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#10658 + # source://prism//lib/prism/node.rb#11154 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InstanceVariableWriteNode + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#10668 - sig { params(params: T.untyped).returns(Prism::InstanceVariableWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11164 + sig do + params( + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end + def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#11149 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#11172 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10712 + # source://prism//lib/prism/node.rb#11218 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol + # 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` # - # source://prism//lib/prism/node.rb#10688 + # @_foo = "bar" # name `@_foo` + # + # source://prism//lib/prism/node.rb#11181 sig { returns(Symbol) } def name; end - # attr_reader name_loc: Location + # The location of the variable name. + # + # @_x = 1 + # ^^^ # - # source://prism//lib/prism/node.rb#10691 + # source://prism//lib/prism/node.rb#11187 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10707 + # source://prism//lib/prism/node.rb#11213 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the `=` operator. # - # source://prism//lib/prism/node.rb#10700 + # @x = y + # ^ + # + # source://prism//lib/prism/node.rb#11206 sig { returns(Prism::Location) } def operator_loc; end @@ -15764,12 +18111,19 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10736 + # source://prism//lib/prism/node.rb#11242 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # 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#10697 + # source://prism//lib/prism/node.rb#11200 sig { returns(Prism::Node) } def value; end @@ -15781,34 +18135,34 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10746 + # source://prism//lib/prism/node.rb#11252 def type; end end end # Flags for integer nodes that correspond to the base of the integer. # -# source://prism//lib/prism/node.rb#19277 +# source://prism//lib/prism/node.rb#20373 module Prism::IntegerBaseFlags; end # 0b prefix # -# source://prism//lib/prism/node.rb#19279 +# source://prism//lib/prism/node.rb#20375 Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) # 0d or no prefix # -# source://prism//lib/prism/node.rb#19282 +# source://prism//lib/prism/node.rb#20378 Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) # 0x prefix # -# source://prism//lib/prism/node.rb#19288 +# source://prism//lib/prism/node.rb#20384 Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) # 0o or 0 prefix # -# source://prism//lib/prism/node.rb#19285 +# source://prism//lib/prism/node.rb#20381 Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # Represents an integer number literal. @@ -15816,94 +18170,103 @@ Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # 1 # ^ # -# source://prism//lib/prism/node.rb#10755 +# source://prism//lib/prism/node.rb#11271 class Prism::IntegerNode < ::Prism::Node - # def initialize: (Integer flags, Location location) -> void + # def initialize: (Integer flags, Integer value, Location location) -> void # # @return [IntegerNode] a new instance of IntegerNode # - # source://prism//lib/prism/node.rb#10757 - def initialize(source, flags, location); end + # source://prism//lib/prism/node.rb#11273 + sig { params(source: Prism::Source, flags: Integer, value: Integer, location: Prism::Location).void } + def initialize(source, flags, value, location); 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#11380 + def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10765 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11282 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def binary?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10807 + # source://prism//lib/prism/node.rb#11322 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)]) } + # source://prism//lib/prism/node.rb#11287 + 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#10780 + # source://prism//lib/prism/node.rb#11297 + 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#10775 + # source://prism//lib/prism/node.rb#11292 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> IntegerNode + # def copy: (?flags: Integer, ?value: Integer, ?location: Location) -> IntegerNode # - # source://prism//lib/prism/node.rb#10785 - sig { params(params: T.untyped).returns(Prism::IntegerNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11302 + sig { params(flags: Integer, value: Integer, location: Prism::Location).returns(Prism::IntegerNode) } + def copy(flags: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end # def decimal?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10812 + # source://prism//lib/prism/node.rb#11327 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)]) } + # source://prism//lib/prism/node.rb#11287 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, value: 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 + # source://prism//lib/prism/node.rb#11310 + 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#10822 + # source://prism//lib/prism/node.rb#11337 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#10827 + # source://prism//lib/prism/node.rb#11342 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def octal?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10817 + # source://prism//lib/prism/node.rb#11332 sig { returns(T::Boolean) } def octal?; end @@ -15922,19 +18285,21 @@ class Prism::IntegerNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#10848 + # source://prism//lib/prism/node.rb#11364 + sig { override.returns(Symbol) } def type; end - # Returns the value of the node as a Ruby Integer. + # The value of the integer literal as a number. # - # source://prism//lib/prism/node_ext.rb#76 + # source://prism//lib/prism/node.rb#11319 + sig { returns(Integer) } def value; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#10802 + # source://prism//lib/prism/node.rb#11315 sig { returns(Integer) } def flags; end @@ -15946,7 +18311,7 @@ class Prism::IntegerNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#10858 + # source://prism//lib/prism/node.rb#11374 def type; end end end @@ -15956,87 +18321,109 @@ end # if /foo #{bar} baz/ then end # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10867 +# source://prism//lib/prism/node.rb#11391 class Prism::InterpolatedMatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions - # def initialize: (Integer flags, Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void + # def initialize: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void # # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#10869 + # source://prism//lib/prism/node.rb#11393 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, parts, closing_loc, location); 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#11568 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10880 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11404 + 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#10970 + # source://prism//lib/prism/node.rb#11488 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)]) } + # source://prism//lib/prism/node.rb#11414 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11005 + # source://prism//lib/prism/node.rb#11523 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10938 + # source://prism//lib/prism/node.rb#11456 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10900 + # source://prism//lib/prism/node.rb#11424 + 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#10895 + # source://prism//lib/prism/node.rb#11419 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InterpolatedMatchLastLineNode + # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#10905 - sig { params(params: T.untyped).returns(Prism::InterpolatedMatchLastLineNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11429 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InterpolatedMatchLastLineNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#11414 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], 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 + # source://prism//lib/prism/node.rb#11437 + 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#10965 + # source://prism//lib/prism/node.rb#11483 sig { returns(T::Boolean) } def euc_jp?; end @@ -16044,15 +18431,18 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10950 + # source://prism//lib/prism/node.rb#11468 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#10990 + # source://prism//lib/prism/node.rb#11508 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -16060,7 +18450,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10995 + # source://prism//lib/prism/node.rb#11513 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -16068,7 +18458,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10985 + # source://prism//lib/prism/node.rb#11503 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -16076,20 +18466,21 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10945 + # source://prism//lib/prism/node.rb#11463 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11010 + # source://prism//lib/prism/node.rb#11528 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10955 + # source://prism//lib/prism/node.rb#11473 sig { returns(T::Boolean) } def multi_line?; end @@ -16097,29 +18488,32 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10960 + # source://prism//lib/prism/node.rb#11478 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11000 + # source://prism//lib/prism/node.rb#11518 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10929 + # source://prism//lib/prism/node.rb#11446 sig { returns(Prism::Location) } def opening_loc; end - # attr_reader parts: Array[Node] + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#10935 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#11453 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#10884 + # source://prism//lib/prism/node.rb#11408 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -16137,14 +18531,15 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11034 + # source://prism//lib/prism/node.rb#11552 + sig { override.returns(Symbol) } def type; end # def utf_8?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10980 + # source://prism//lib/prism/node.rb#11498 sig { returns(T::Boolean) } def utf_8?; end @@ -16152,15 +18547,15 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10975 + # source://prism//lib/prism/node.rb#11493 sig { returns(T::Boolean) } def windows_31j?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#10925 + # source://prism//lib/prism/node.rb#11442 sig { returns(Integer) } def flags; end @@ -16172,7 +18567,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11044 + # source://prism//lib/prism/node.rb#11562 def type; end end end @@ -16182,87 +18577,109 @@ end # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11053 +# source://prism//lib/prism/node.rb#11582 class Prism::InterpolatedRegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions - # def initialize: (Integer flags, Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void + # def initialize: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void # # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#11055 + # source://prism//lib/prism/node.rb#11584 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, parts, closing_loc, location); 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#11759 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11066 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11595 + 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 + # source://prism//lib/prism/node.rb#11679 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)]) } + # source://prism//lib/prism/node.rb#11605 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11191 + # source://prism//lib/prism/node.rb#11714 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11124 + # source://prism//lib/prism/node.rb#11647 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11086 + # source://prism//lib/prism/node.rb#11615 + 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#11081 + # source://prism//lib/prism/node.rb#11610 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InterpolatedRegularExpressionNode + # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#11091 - sig { params(params: T.untyped).returns(Prism::InterpolatedRegularExpressionNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11620 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InterpolatedRegularExpressionNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#11605 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], 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 + # source://prism//lib/prism/node.rb#11628 + 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 + # source://prism//lib/prism/node.rb#11674 sig { returns(T::Boolean) } def euc_jp?; end @@ -16270,15 +18687,18 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11136 + # source://prism//lib/prism/node.rb#11659 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 + # source://prism//lib/prism/node.rb#11699 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -16286,7 +18706,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11181 + # source://prism//lib/prism/node.rb#11704 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -16294,7 +18714,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11171 + # source://prism//lib/prism/node.rb#11694 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -16302,20 +18722,21 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11131 + # source://prism//lib/prism/node.rb#11654 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11196 + # source://prism//lib/prism/node.rb#11719 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11141 + # source://prism//lib/prism/node.rb#11664 sig { returns(T::Boolean) } def multi_line?; end @@ -16323,29 +18744,32 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11146 + # source://prism//lib/prism/node.rb#11669 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11186 + # source://prism//lib/prism/node.rb#11709 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11115 + # source://prism//lib/prism/node.rb#11637 sig { returns(Prism::Location) } def opening_loc; end - # attr_reader parts: Array[Node] + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11121 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#11644 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11070 + # source://prism//lib/prism/node.rb#11599 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -16363,14 +18787,15 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11220 + # source://prism//lib/prism/node.rb#11743 + sig { override.returns(Symbol) } def type; end # def utf_8?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11166 + # source://prism//lib/prism/node.rb#11689 sig { returns(T::Boolean) } def utf_8?; end @@ -16378,15 +18803,15 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11161 + # source://prism//lib/prism/node.rb#11684 sig { returns(T::Boolean) } def windows_31j?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11111 + # source://prism//lib/prism/node.rb#11633 sig { returns(Integer) } def flags; end @@ -16398,7 +18823,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11230 + # source://prism//lib/prism/node.rb#11753 def type; end end end @@ -16408,98 +18833,145 @@ end # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11239 +# source://prism//lib/prism/node.rb#11773 class Prism::InterpolatedStringNode < ::Prism::Node include ::Prism::HeredocQuery - # def initialize: (Location? opening_loc, Array[Node] parts, Location? closing_loc, Location location) -> void + # def initialize: (Integer flags, Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] 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 + # source://prism//lib/prism/node.rb#11775 + sig do + params( + source: Prism::Source, + 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), + location: Prism::Location + ).void + end + def initialize(source, flags, opening_loc, parts, closing_loc, location); 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#11917 + def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11251 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11786 + 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#11261 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11796 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11328 + # source://prism//lib/prism/node.rb#11872 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11310 + # source://prism//lib/prism/node.rb#11844 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11271 + # source://prism//lib/prism/node.rb#11806 + 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#11266 + # source://prism//lib/prism/node.rb#11801 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InterpolatedStringNode + # def copy: (?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedStringNode # - # source://prism//lib/prism/node.rb#11276 - sig { params(params: T.untyped).returns(Prism::InterpolatedStringNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11811 + sig do + params( + 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), + location: Prism::Location + ).returns(Prism::InterpolatedStringNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#11796 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], 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 + # source://prism//lib/prism/node.rb#11819 + 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#11857 + sig { returns(T::Boolean) } + def frozen?; end + + sig { returns(T::Boolean) } + def heredoc?; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11333 + # source://prism//lib/prism/node.rb#11877 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11862 + sig { returns(T::Boolean) } + def mutable?; end + # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11323 + # source://prism//lib/prism/node.rb#11867 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11295 + # source://prism//lib/prism/node.rb#11828 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # attr_reader parts: Array[Node] + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] # - # source://prism//lib/prism/node.rb#11307 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#11841 + sig do + returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)]) + end def parts; end - # source://prism//lib/prism/node.rb#11255 + # source://prism//lib/prism/node.rb#11790 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -16517,9 +18989,18 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11355 + # source://prism//lib/prism/node.rb#11901 + sig { override.returns(Symbol) } def type; end + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#11824 + 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. @@ -16528,106 +19009,141 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11365 + # source://prism//lib/prism/node.rb#11911 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#20388 +module Prism::InterpolatedStringNodeFlags; end + +# source://prism//lib/prism/node.rb#20390 +Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/node.rb#20393 +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#11374 +# source://prism//lib/prism/node.rb#11931 class Prism::InterpolatedSymbolNode < ::Prism::Node - # def initialize: (Location? opening_loc, Array[Node] parts, Location? closing_loc, Location location) -> void + # def initialize: (Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location? closing_loc, Location location) -> void # # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#11376 + # source://prism//lib/prism/node.rb#11933 + sig do + params( + source: Prism::Source, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, opening_loc, parts, closing_loc, location); 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#12058 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11386 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#11943 + 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#11396 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#11953 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11463 + # source://prism//lib/prism/node.rb#12015 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11445 + # source://prism//lib/prism/node.rb#11997 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11406 + # source://prism//lib/prism/node.rb#11963 + 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#11401 + # source://prism//lib/prism/node.rb#11958 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InterpolatedSymbolNode + # def copy: (?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#11411 - sig { params(params: T.untyped).returns(Prism::InterpolatedSymbolNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#11968 + sig do + params( + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::InterpolatedSymbolNode) + end + def copy(opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#11953 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], 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 + # source://prism//lib/prism/node.rb#11976 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11468 + # source://prism//lib/prism/node.rb#12020 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11458 + # source://prism//lib/prism/node.rb#12010 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11430 + # source://prism//lib/prism/node.rb#11981 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # attr_reader parts: Array[Node] + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11442 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#11994 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11390 + # source://prism//lib/prism/node.rb#11947 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -16645,7 +19161,8 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11490 + # source://prism//lib/prism/node.rb#12042 + sig { override.returns(Symbol) } def type; end class << self @@ -16656,7 +19173,7 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11500 + # source://prism//lib/prism/node.rb#12052 def type; end end end @@ -16666,98 +19183,125 @@ end # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11509 +# source://prism//lib/prism/node.rb#12071 class Prism::InterpolatedXStringNode < ::Prism::Node include ::Prism::HeredocQuery - # def initialize: (Location opening_loc, Array[Node] parts, Location closing_loc, Location location) -> void + # def initialize: (Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void # # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#11511 + # source://prism//lib/prism/node.rb#12073 + sig do + params( + source: Prism::Source, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, opening_loc, parts, closing_loc, location); 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#12186 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11521 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12083 + 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#11531 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11586 + # source://prism//lib/prism/node.rb#12143 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11574 + # source://prism//lib/prism/node.rb#12131 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11541 + # source://prism//lib/prism/node.rb#12103 + 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#11536 + # source://prism//lib/prism/node.rb#12098 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> InterpolatedXStringNode + # def copy: (?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#11546 - sig { params(params: T.untyped).returns(Prism::InterpolatedXStringNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12108 + sig do + params( + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end + def copy(opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#12093 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], 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 + # source://prism//lib/prism/node.rb#12116 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11591 + # source://prism//lib/prism/node.rb#12148 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11581 + # source://prism//lib/prism/node.rb#12138 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11565 + # source://prism//lib/prism/node.rb#12121 sig { returns(Prism::Location) } def opening_loc; end - # attr_reader parts: Array[Node] + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11571 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#12128 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # source://prism//lib/prism/node.rb#11525 + # source://prism//lib/prism/node.rb#12087 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -16775,7 +19319,8 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11613 + # source://prism//lib/prism/node.rb#12170 + sig { override.returns(Symbol) } def type; end class << self @@ -16786,89 +19331,84 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11623 + # source://prism//lib/prism/node.rb#12180 def type; end end end -# Represents a hash literal without opening and closing braces. +# Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda. # -# foo(a: b) -# ^^^^ +# -> { it + it } +# ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11632 -class Prism::KeywordHashNode < ::Prism::Node - # def initialize: (Integer flags, Array[Node] elements, Location location) -> void +# source://prism//lib/prism/node.rb#12199 +class Prism::ItParametersNode < ::Prism::Node + # def initialize: (Location location) -> void # - # @return [KeywordHashNode] a new instance of KeywordHashNode + # @return [ItParametersNode] a new instance of ItParametersNode # - # source://prism//lib/prism/node.rb#11634 - def initialize(source, flags, elements, location); end + # source://prism//lib/prism/node.rb#12201 + sig { params(source: Prism::Source, location: Prism::Location).void } + def initialize(source, location); 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#12276 + def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11643 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12208 + 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#11648 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12213 + 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#11658 + # source://prism//lib/prism/node.rb#12223 + 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#11653 + # source://prism//lib/prism/node.rb#12218 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> KeywordHashNode + # def copy: (?location: Location) -> ItParametersNode # - # source://prism//lib/prism/node.rb#11663 - sig { params(params: T.untyped).returns(Prism::KeywordHashNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12228 + sig { params(location: Prism::Location).returns(Prism::ItParametersNode) } + def copy(location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#12213 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Node], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { 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 + # source://prism//lib/prism/node.rb#12236 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } 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 + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11694 + # source://prism//lib/prism/node.rb#12241 + sig { params(inspector: T.untyped).returns(String) } 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 @@ -16884,17 +19424,10 @@ class Prism::KeywordHashNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11716 + # source://prism//lib/prism/node.rb#12260 + sig { override.returns(Symbol) } 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. @@ -16903,107 +19436,273 @@ class Prism::KeywordHashNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11726 + # source://prism//lib/prism/node.rb#12270 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. +# Represents a hash literal without opening and closing braces. # -# def a(**b) -# ^^^ -# end +# foo(a: b) +# ^^^^ # -# 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 +# source://prism//lib/prism/node.rb#12285 +class Prism::KeywordHashNode < ::Prism::Node + # def initialize: (Integer flags, Array[AssocNode | AssocSplatNode] elements, Location location) -> void # - # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode + # @return [KeywordHashNode] a new instance of KeywordHashNode # - # source://prism//lib/prism/node.rb#11738 - def initialize(source, flags, name, name_loc, operator_loc, location); end + # source://prism//lib/prism/node.rb#12287 + sig do + params( + source: Prism::Source, + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + location: Prism::Location + ).void + end + def initialize(source, flags, elements, location); 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#12379 + def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11749 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12296 + 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#11754 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12301 + 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#11764 + # source://prism//lib/prism/node.rb#12311 + 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#11759 + # source://prism//lib/prism/node.rb#12306 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> KeywordRestParameterNode + # def copy: (?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode], ?location: Location) -> KeywordHashNode # - # source://prism//lib/prism/node.rb#11769 - sig { params(params: T.untyped).returns(Prism::KeywordRestParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12316 + sig do + params( + flags: Integer, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + location: Prism::Location + ).returns(Prism::KeywordHashNode) + end + def copy(flags: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#12301 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[AssocNode | AssocSplatNode], location: Location } # - # source://prism//lib/prism/node.rb#11784 + # source://prism//lib/prism/node.rb#12324 + 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#12333 + 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(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#12341 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def symbol_keys?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12336 + 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#12363 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#12329 + 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#12373 + def type; end + end +end + +# Flags for keyword hash nodes. +# +# source://prism//lib/prism/node.rb#20397 +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#20399 +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#12392 +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#12394 + sig do + params( + source: Prism::Source, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, flags, name, name_loc, operator_loc, location); 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#12519 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#12405 + 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#12410 + 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#12420 + 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#12415 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> KeywordRestParameterNode + # + # source://prism//lib/prism/node.rb#12425 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))]) + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::KeywordRestParameterNode) end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12410 + sig { override.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#12433 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11825 + # source://prism//lib/prism/node.rb#12475 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#11793 + # source://prism//lib/prism/node.rb#12442 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#11796 + # source://prism//lib/prism/node.rb#12445 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11820 + # source://prism//lib/prism/node.rb#12470 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11808 + # source://prism//lib/prism/node.rb#12458 sig { returns(Prism::Location) } def operator_loc; end @@ -17011,7 +19710,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11815 + # source://prism//lib/prism/node.rb#12465 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -17030,14 +19729,15 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#11853 + # source://prism//lib/prism/node.rb#12503 + sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#11789 + # source://prism//lib/prism/node.rb#12438 sig { returns(Integer) } def flags; end @@ -17049,7 +19749,7 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#11863 + # source://prism//lib/prism/node.rb#12513 def type; end end end @@ -17059,116 +19759,146 @@ end # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11872 +# source://prism//lib/prism/node.rb#12532 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 + # def initialize: (Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, Prism::node? parameters, Prism::node? body, Location location) -> void # # @return [LambdaNode] a new instance of LambdaNode # - # source://prism//lib/prism/node.rb#11874 + # source://prism//lib/prism/node.rb#12534 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + location: Prism::Location + ).void + end def initialize(source, locals, operator_loc, opening_loc, closing_loc, parameters, body, location); 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#12679 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11887 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12547 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Node? + # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#11956 + # source://prism//lib/prism/node.rb#12610 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)]) } + # source://prism//lib/prism/node.rb#12552 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11970 + # source://prism//lib/prism/node.rb#12623 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11947 + # source://prism//lib/prism/node.rb#12600 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11905 + # source://prism//lib/prism/node.rb#12565 + 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#11897 + # source://prism//lib/prism/node.rb#12557 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LambdaNode + # def copy: (?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: Prism::node?, ?body: Prism::node?, ?location: Location) -> LambdaNode # - # source://prism//lib/prism/node.rb#11910 - sig { params(params: T.untyped).returns(Prism::LambdaNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12570 + sig do + params( + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(Prism::Node), + body: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::LambdaNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#12552 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Prism::node?, body: Prism::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 + # source://prism//lib/prism/node.rb#12578 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#11975 + # source://prism//lib/prism/node.rb#12628 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#11932 + # source://prism//lib/prism/node.rb#12583 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11965 + # source://prism//lib/prism/node.rb#12618 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11941 + # source://prism//lib/prism/node.rb#12593 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11960 + # source://prism//lib/prism/node.rb#12613 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11935 + # source://prism//lib/prism/node.rb#12586 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader parameters: Node? + # attr_reader parameters: Prism::node? # - # source://prism//lib/prism/node.rb#11953 + # source://prism//lib/prism/node.rb#12607 sig { returns(T.nilable(Prism::Node)) } def parameters; end @@ -17187,7 +19917,8 @@ class Prism::LambdaNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12010 + # source://prism//lib/prism/node.rb#12663 + sig { override.returns(Symbol) } def type; end class << self @@ -17198,7 +19929,7 @@ class Prism::LambdaNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12020 + # source://prism//lib/prism/node.rb#12673 def type; end end end @@ -17213,29 +19944,29 @@ end class Prism::LexCompat # @return [LexCompat] a new instance of LexCompat # - # source://prism//lib/prism/lex_compat.rb#600 + # 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#598 + # source://prism//lib/prism/lex_compat.rb#617 def options; end - # source://prism//lib/prism/lex_compat.rb#605 + # source://prism//lib/prism/lex_compat.rb#624 def result; end # Returns the value of attribute source. # - # source://prism//lib/prism/lex_compat.rb#598 + # 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#211 +# source://prism//lib/prism/lex_compat.rb#230 class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#212 + # source://prism//lib/prism/lex_compat.rb#231 def ==(other); end end @@ -17243,13 +19974,13 @@ end # heredoc that should be appended onto the list of tokens when the heredoc # closes. # -# source://prism//lib/prism/lex_compat.rb#272 +# 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#584 + # source://prism//lib/prism/lex_compat.rb#603 def build(opening); end end end @@ -17258,23 +19989,23 @@ end # 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 +# 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#299 + # source://prism//lib/prism/lex_compat.rb#318 def initialize(split); end - # source://prism//lib/prism/lex_compat.rb#304 + # source://prism//lib/prism/lex_compat.rb#323 def <<(token); end - # source://prism//lib/prism/lex_compat.rb#297 + # source://prism//lib/prism/lex_compat.rb#316 def split; end - # source://prism//lib/prism/lex_compat.rb#308 + # source://prism//lib/prism/lex_compat.rb#327 def to_a; end - # source://prism//lib/prism/lex_compat.rb#297 + # source://prism//lib/prism/lex_compat.rb#316 def tokens; end end @@ -17289,45 +20020,45 @@ end # 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 +# 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#360 + # 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#371 + # source://prism//lib/prism/lex_compat.rb#390 def <<(token); end # Returns the value of attribute dedent. # - # source://prism//lib/prism/lex_compat.rb#358 + # 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#358 + # 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#358 + # source://prism//lib/prism/lex_compat.rb#377 def embexpr_balance; end - # source://prism//lib/prism/lex_compat.rb#408 + # 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#358 + # source://prism//lib/prism/lex_compat.rb#377 def tokens; end end -# source://prism//lib/prism/lex_compat.rb#356 +# 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. @@ -17335,20 +20066,20 @@ Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), In # 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 +# 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#280 + # source://prism//lib/prism/lex_compat.rb#299 def initialize; end - # source://prism//lib/prism/lex_compat.rb#284 + # source://prism//lib/prism/lex_compat.rb#303 def <<(token); end - # source://prism//lib/prism/lex_compat.rb#288 + # source://prism//lib/prism/lex_compat.rb#307 def to_a; end - # source://prism//lib/prism/lex_compat.rb#278 + # source://prism//lib/prism/lex_compat.rb#297 def tokens; end end @@ -17357,27 +20088,27 @@ end # through named captures in regular expressions). In that case we don't # compare the state. # -# source://prism//lib/prism/lex_compat.rb#229 +# source://prism//lib/prism/lex_compat.rb#248 class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#230 + # 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#219 +# source://prism//lib/prism/lex_compat.rb#238 class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#220 + # 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#240 +# source://prism//lib/prism/lex_compat.rb#259 class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#241 + # source://prism//lib/prism/lex_compat.rb#260 def ==(other); end end @@ -17390,9 +20121,9 @@ end # more accurately, so we need to allow comparing against both END and # END|LABEL. # -# source://prism//lib/prism/lex_compat.rb#260 +# source://prism//lib/prism/lex_compat.rb#279 class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#261 + # source://prism//lib/prism/lex_compat.rb#280 def ==(other); end end @@ -17400,55 +20131,112 @@ end # 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 +# 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#187 +# 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#194 + # 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#189 + # 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#204 + # 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#199 + # 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#515 +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#520 + 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#526 + 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#517 + 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#853 +# 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#856 + # source://prism//lib/prism/lex_compat.rb#875 def initialize(source); end - # source://prism//lib/prism/lex_compat.rb#860 + # source://prism//lib/prism/lex_compat.rb#879 def result; end - # source://prism//lib/prism/lex_compat.rb#854 + # source://prism//lib/prism/lex_compat.rb#873 def source; end private - # source://prism//lib/prism/lex_compat.rb#894 + # source://prism//lib/prism/lex_compat.rb#913 def lex(source); end end @@ -17457,95 +20245,123 @@ end # target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12029 +# source://prism//lib/prism/node.rb#12695 class Prism::LocalVariableAndWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Integer depth, Location location) -> void + # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void # # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#12031 + # source://prism//lib/prism/node.rb#12697 + sig do + params( + source: Prism::Source, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).void + end def initialize(source, name_loc, operator_loc, value, name, depth, location); 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#12811 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12043 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12709 + 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#12048 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12714 + 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#12058 + # source://prism//lib/prism/node.rb#12724 + 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#12053 + # source://prism//lib/prism/node.rb#12719 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LocalVariableAndWriteNode + # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#12063 - sig { params(params: T.untyped).returns(Prism::LocalVariableAndWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12729 + sig do + params( + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).returns(Prism::LocalVariableAndWriteNode) + end + def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#12714 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#12737 + 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#12102 + # source://prism//lib/prism/node.rb#12762 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#197 + # source://prism//lib/prism/desugar_compiler.rb#199 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12111 + # source://prism//lib/prism/node.rb#12770 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12099 + # source://prism//lib/prism/node.rb#12759 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12084 + # source://prism//lib/prism/node.rb#12742 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12106 + # source://prism//lib/prism/node.rb#12765 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12090 + # source://prism//lib/prism/node.rb#12749 sig { returns(Prism::Location) } def operator_loc; end @@ -17564,12 +20380,13 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12136 + # source://prism//lib/prism/node.rb#12795 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12096 + # source://prism//lib/prism/node.rb#12756 sig { returns(Prism::Node) } def value; end @@ -17581,7 +20398,7 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12146 + # source://prism//lib/prism/node.rb#12805 def type; end end end @@ -17591,95 +20408,125 @@ end # target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12155 +# source://prism//lib/prism/node.rb#12825 class Prism::LocalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Symbol operator, Integer depth, Location location) -> void + # def initialize: (Location name_loc, Location operator_loc, Prism::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 + # source://prism//lib/prism/node.rb#12827 + sig do + params( + source: Prism::Source, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + operator: Symbol, + depth: Integer, + location: Prism::Location + ).void + end def initialize(source, name_loc, operator_loc, value, name, operator, depth, location); 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#12941 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12170 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12840 + 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#12175 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12845 + 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#12185 + # source://prism//lib/prism/node.rb#12855 + 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#12180 + # source://prism//lib/prism/node.rb#12850 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LocalVariableOperatorWriteNode + # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?operator: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#12190 - sig { params(params: T.untyped).returns(Prism::LocalVariableOperatorWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12860 + sig do + params( + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + operator: Symbol, + depth: Integer, + location: Prism::Location + ).returns(Prism::LocalVariableOperatorWriteNode) + end + def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), operator: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#12845 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#12868 + 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#12233 + # source://prism//lib/prism/node.rb#12896 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#209 + # source://prism//lib/prism/desugar_compiler.rb#211 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12237 + # source://prism//lib/prism/node.rb#12899 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12227 + # source://prism//lib/prism/node.rb#12890 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12212 + # source://prism//lib/prism/node.rb#12873 sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://prism//lib/prism/node.rb#12230 + # source://prism//lib/prism/node.rb#12893 sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12218 + # source://prism//lib/prism/node.rb#12880 sig { returns(Prism::Location) } def operator_loc; end @@ -17698,12 +20545,13 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12263 + # source://prism//lib/prism/node.rb#12925 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12224 + # source://prism//lib/prism/node.rb#12887 sig { returns(Prism::Node) } def value; end @@ -17715,7 +20563,7 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12273 + # source://prism//lib/prism/node.rb#12935 def type; end end end @@ -17725,95 +20573,123 @@ end # target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12282 +# source://prism//lib/prism/node.rb#12956 class Prism::LocalVariableOrWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Node value, Symbol name, Integer depth, Location location) -> void + # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void # # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#12284 + # source://prism//lib/prism/node.rb#12958 + sig do + params( + source: Prism::Source, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).void + end def initialize(source, name_loc, operator_loc, value, name, depth, location); 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#13072 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12296 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#12970 + 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#12301 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#12975 + 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#12311 + # source://prism//lib/prism/node.rb#12985 + 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#12306 + # source://prism//lib/prism/node.rb#12980 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LocalVariableOrWriteNode + # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#12316 - sig { params(params: T.untyped).returns(Prism::LocalVariableOrWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#12990 + sig do + params( + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer, + location: Prism::Location + ).returns(Prism::LocalVariableOrWriteNode) + end + def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#12975 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#12998 + 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#12355 + # source://prism//lib/prism/node.rb#13023 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#203 + # source://prism//lib/prism/desugar_compiler.rb#205 def desugar; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12364 + # source://prism//lib/prism/node.rb#13031 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12352 + # source://prism//lib/prism/node.rb#13020 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12337 + # source://prism//lib/prism/node.rb#13003 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12359 + # source://prism//lib/prism/node.rb#13026 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12343 + # source://prism//lib/prism/node.rb#13010 sig { returns(Prism::Location) } def operator_loc; end @@ -17832,12 +20708,13 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12389 + # source://prism//lib/prism/node.rb#13056 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12349 + # source://prism//lib/prism/node.rb#13017 sig { returns(Prism::Node) } def value; end @@ -17849,7 +20726,7 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12399 + # source://prism//lib/prism/node.rb#13066 def type; end end end @@ -17859,58 +20736,63 @@ end # foo # ^^^ # -# source://prism//lib/prism/node.rb#12408 +# source://prism//lib/prism/node.rb#13086 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 + # source://prism//lib/prism/node.rb#13088 + sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } def initialize(source, name, depth, location); 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#13191 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12419 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13097 + 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#12424 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13102 + 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#12434 + # source://prism//lib/prism/node.rb#13112 + 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#12429 + # source://prism//lib/prism/node.rb#13107 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LocalVariableReadNode + # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableReadNode # - # source://prism//lib/prism/node.rb#12439 - sig { params(params: T.untyped).returns(Prism::LocalVariableReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13117 + sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableReadNode) } + def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#13102 + sig { override.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 + # source://prism//lib/prism/node.rb#13125 + 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. @@ -17921,13 +20803,17 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # 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 + # source://prism//lib/prism/node.rb#13151 sig { returns(Integer) } def depth; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12482 + # source://prism//lib/prism/node.rb#13154 + sig { params(inspector: T.untyped).returns(String) } 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). @@ -17944,7 +20830,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # it # name `:0it` # - # source://prism//lib/prism/node.rb#12469 + # source://prism//lib/prism/node.rb#13142 sig { returns(Symbol) } def name; end @@ -17963,7 +20849,8 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12503 + # source://prism//lib/prism/node.rb#13175 + sig { override.returns(Symbol) } def type; end class << self @@ -17974,7 +20861,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12513 + # source://prism//lib/prism/node.rb#13185 def type; end end end @@ -17984,74 +20871,83 @@ end # foo, bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#12522 +# source://prism//lib/prism/node.rb#13202 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 + # source://prism//lib/prism/node.rb#13204 + sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } def initialize(source, name, depth, location); 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#13289 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12533 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13213 + 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#12538 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13218 + 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#12548 + # source://prism//lib/prism/node.rb#13228 + 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#12543 + # source://prism//lib/prism/node.rb#13223 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LocalVariableTargetNode + # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#12553 - sig { params(params: T.untyped).returns(Prism::LocalVariableTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13233 + sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableTargetNode) } + def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#13218 + sig { override.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 + # source://prism//lib/prism/node.rb#13241 + 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#12574 + # source://prism//lib/prism/node.rb#13249 sig { returns(Integer) } def depth; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12578 + # source://prism//lib/prism/node.rb#13252 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12571 + # source://prism//lib/prism/node.rb#13246 sig { returns(Symbol) } def name; end @@ -18070,7 +20966,8 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12599 + # source://prism//lib/prism/node.rb#13273 + sig { override.returns(Symbol) } def type; end class << self @@ -18081,7 +20978,7 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12609 + # source://prism//lib/prism/node.rb#13283 def type; end end end @@ -18091,92 +20988,136 @@ end # foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#12618 +# source://prism//lib/prism/node.rb#13300 class Prism::LocalVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Integer depth, Location name_loc, Node value, Location operator_loc, Location location) -> void + # def initialize: (Symbol name, Integer depth, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void # # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode # - # source://prism//lib/prism/node.rb#12620 + # source://prism//lib/prism/node.rb#13302 + sig do + params( + source: Prism::Source, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, name, depth, name_loc, value, operator_loc, location); 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#13442 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12632 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13314 + 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#12637 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13319 + 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#12647 + # source://prism//lib/prism/node.rb#13329 + 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#12642 + # source://prism//lib/prism/node.rb#13324 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> LocalVariableWriteNode + # def copy: (?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> 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] + # source://prism//lib/prism/node.rb#13334 + sig do + params( + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end + def copy(name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#13319 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, name_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#13342 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader depth: Integer + # 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#12676 + # source://prism//lib/prism/node.rb#13360 sig { returns(Integer) } def depth; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12700 + # source://prism//lib/prism/node.rb#13401 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol + # 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#12673 + # source://prism//lib/prism/node.rb#13351 sig { returns(Symbol) } def name; end - # attr_reader name_loc: Location + # The location of the variable name. # - # source://prism//lib/prism/node.rb#12679 + # foo = :bar + # ^^^ + # + # source://prism//lib/prism/node.rb#13366 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12695 + # source://prism//lib/prism/node.rb#13396 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the `=` operator. + # + # x = :y + # ^ # - # source://prism//lib/prism/node.rb#12688 + # source://prism//lib/prism/node.rb#13389 sig { returns(Prism::Location) } def operator_loc; end @@ -18195,12 +21136,23 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12725 + # source://prism//lib/prism/node.rb#13426 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # 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 + # ^^^^ # - # source://prism//lib/prism/node.rb#12685 + # 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#13383 sig { returns(Prism::Node) } def value; end @@ -18212,231 +21164,278 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12735 + # source://prism//lib/prism/node.rb#13436 def type; end end end # This represents a location in the source. # -# source://prism//lib/prism/parse_result.rb#98 +# source://prism//lib/prism/parse_result.rb#104 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 + # source://prism//lib/prism/parse_result.rb#119 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 + # source://prism//lib/prism/parse_result.rb#269 + sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end - # The list of comments attached to this location + # Returns a new location that is the result of chopping off the last byte. # - # source://prism//lib/prism/parse_result.rb#112 + # source://prism//lib/prism/parse_result.rb#165 + 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#155 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 + # source://prism//lib/prism/parse_result.rb#160 + 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#222 + # source://prism//lib/prism/parse_result.rb#259 + 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#211 + # source://prism//lib/prism/parse_result.rb#248 + 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#160 + # source://prism//lib/prism/parse_result.rb#197 + 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#217 + # source://prism//lib/prism/parse_result.rb#254 + 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#165 + # source://prism//lib/prism/parse_result.rb#202 + 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#205 + # source://prism//lib/prism/parse_result.rb#242 sig { returns(Integer) } def end_column; end # The line number where this location ends. # - # source://prism//lib/prism/parse_result.rb#181 + # source://prism//lib/prism/parse_result.rb#218 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 + # source://prism//lib/prism/parse_result.rb#191 sig { returns(Integer) } def end_offset; end # Returns a string representation of this location. # - # source://prism//lib/prism/parse_result.rb#133 + # source://prism//lib/prism/parse_result.rb#170 + 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#241 + # source://prism//lib/prism/parse_result.rb#278 + 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#138 + 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#133 + sig { returns(T::Array[Prism::Comment]) } + def leading_comments; end + # The length of this location in bytes. # - # source://prism//lib/prism/parse_result.rb#109 + # source://prism//lib/prism/parse_result.rb#115 + sig { returns(Integer) } def length; end # Implement the pretty print interface for Location. # - # source://prism//lib/prism/parse_result.rb#227 + # source://prism//lib/prism/parse_result.rb#264 + 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#138 + # source://prism//lib/prism/parse_result.rb#175 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 + # source://prism//lib/prism/parse_result.rb#230 + 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#144 + # source://prism//lib/prism/parse_result.rb#181 + 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#199 + # source://prism//lib/prism/parse_result.rb#236 + 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#149 + # source://prism//lib/prism/parse_result.rb#186 + 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#187 + # source://prism//lib/prism/parse_result.rb#224 sig { returns(Integer) } def start_column; end # The line number where this location starts. # - # source://prism//lib/prism/parse_result.rb#170 + # source://prism//lib/prism/parse_result.rb#207 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 + # source://prism//lib/prism/parse_result.rb#212 + 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#106 + # source://prism//lib/prism/parse_result.rb#112 sig { returns(Integer) } def start_offset; end + # Attach a comment to the trailing comments of this location. + # + # source://prism//lib/prism/parse_result.rb#149 + 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#144 + 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#101 + # source://prism//lib/prism/parse_result.rb#107 + sig { returns(Prism::Source) } 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 +# source://prism//lib/prism/node.rb#20403 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 +# source://prism//lib/prism/node.rb#20405 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 +# source://prism//lib/prism/parse_result.rb#338 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 + # source://prism//lib/prism/parse_result.rb#346 + 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#327 + # source://prism//lib/prism/parse_result.rb#362 + 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#332 + # source://prism//lib/prism/parse_result.rb#367 + 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#317 + # source://prism//lib/prism/parse_result.rb#352 + 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#305 + # source://prism//lib/prism/parse_result.rb#340 + 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#322 + # source://prism//lib/prism/parse_result.rb#357 + 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#308 + # source://prism//lib/prism/parse_result.rb#343 + sig { returns(Prism::Location) } def value_loc; end end @@ -18445,7 +21444,7 @@ end # if /foo/i then end # ^^^^^^ # -# source://prism//lib/prism/node.rb#12744 +# source://prism//lib/prism/node.rb#13456 class Prism::MatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -18453,91 +21452,115 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [MatchLastLineNode] a new instance of MatchLastLineNode # - # source://prism//lib/prism/node.rb#12746 + # source://prism//lib/prism/node.rb#13458 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); 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#13642 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12758 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13470 + 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#12850 + # source://prism//lib/prism/node.rb#13556 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)]) } + # source://prism//lib/prism/node.rb#13475 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#12890 + # source://prism//lib/prism/node.rb#13596 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#12815 + # source://prism//lib/prism/node.rb#13521 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12773 + # source://prism//lib/prism/node.rb#13485 + 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#12768 + # source://prism//lib/prism/node.rb#13480 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#12885 + # source://prism//lib/prism/node.rb#13591 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#12809 + # source://prism//lib/prism/node.rb#13514 sig { returns(Prism::Location) } def content_loc; end - # def copy: (**params) -> MatchLastLineNode + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> MatchLastLineNode # - # source://prism//lib/prism/node.rb#12778 - sig { params(params: T.untyped).returns(Prism::MatchLastLineNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13490 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).returns(Prism::MatchLastLineNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#13475 + sig { override.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 + # source://prism//lib/prism/node.rb#13498 + 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#12845 + # source://prism//lib/prism/node.rb#13551 sig { returns(T::Boolean) } def euc_jp?; end @@ -18545,15 +21568,18 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12830 + # source://prism//lib/prism/node.rb#13536 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#12870 + # source://prism//lib/prism/node.rb#13576 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -18561,7 +21587,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12875 + # source://prism//lib/prism/node.rb#13581 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -18569,7 +21595,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12865 + # source://prism//lib/prism/node.rb#13571 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -18577,20 +21603,21 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12825 + # source://prism//lib/prism/node.rb#13531 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#12895 + # source://prism//lib/prism/node.rb#13601 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12835 + # source://prism//lib/prism/node.rb#13541 sig { returns(T::Boolean) } def multi_line?; end @@ -18598,22 +21625,25 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12840 + # source://prism//lib/prism/node.rb#13546 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#12880 + # source://prism//lib/prism/node.rb#13586 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#12803 + # source://prism//lib/prism/node.rb#13507 sig { returns(Prism::Location) } def opening_loc; end + sig { returns(Integer) } + def options; 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 @@ -18629,12 +21659,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#12920 + # source://prism//lib/prism/node.rb#13626 + sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#12821 + # source://prism//lib/prism/node.rb#13528 sig { returns(String) } def unescaped; end @@ -18642,7 +21673,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12860 + # source://prism//lib/prism/node.rb#13566 sig { returns(T::Boolean) } def utf_8?; end @@ -18650,15 +21681,15 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12855 + # source://prism//lib/prism/node.rb#13561 sig { returns(T::Boolean) } def windows_31j?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#12799 + # source://prism//lib/prism/node.rb#13503 sig { returns(Integer) } def flags; end @@ -18670,7 +21701,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#12930 + # source://prism//lib/prism/node.rb#13636 def type; end end end @@ -18680,80 +21711,104 @@ end # foo in bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12939 +# source://prism//lib/prism/node.rb#13656 class Prism::MatchPredicateNode < ::Prism::Node - # def initialize: (Node value, Node pattern, Location operator_loc, Location location) -> void + # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void # # @return [MatchPredicateNode] a new instance of MatchPredicateNode # - # source://prism//lib/prism/node.rb#12941 + # source://prism//lib/prism/node.rb#13658 + sig do + params( + source: Prism::Source, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, value, pattern, operator_loc, location); 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#13759 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12951 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13668 + 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#12956 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13673 + 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#12966 + # source://prism//lib/prism/node.rb#13683 + 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#12961 + # source://prism//lib/prism/node.rb#13678 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> MatchPredicateNode + # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchPredicateNode # - # source://prism//lib/prism/node.rb#12971 - sig { params(params: T.untyped).returns(Prism::MatchPredicateNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13688 + sig do + params( + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::MatchPredicateNode) + end + def copy(value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#13673 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::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 + # source://prism//lib/prism/node.rb#13696 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13008 + # source://prism//lib/prism/node.rb#13719 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13003 + # source://prism//lib/prism/node.rb#13714 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12996 + # source://prism//lib/prism/node.rb#13707 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader pattern: Node + # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#12993 + # source://prism//lib/prism/node.rb#13704 sig { returns(Prism::Node) } def pattern; end @@ -18772,12 +21827,13 @@ class Prism::MatchPredicateNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13032 + # source://prism//lib/prism/node.rb#13743 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12990 + # source://prism//lib/prism/node.rb#13701 sig { returns(Prism::Node) } def value; end @@ -18789,7 +21845,7 @@ class Prism::MatchPredicateNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13042 + # source://prism//lib/prism/node.rb#13753 def type; end end end @@ -18799,80 +21855,104 @@ end # foo => bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13051 +# source://prism//lib/prism/node.rb#13771 class Prism::MatchRequiredNode < ::Prism::Node - # def initialize: (Node value, Node pattern, Location operator_loc, Location location) -> void + # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void # # @return [MatchRequiredNode] a new instance of MatchRequiredNode # - # source://prism//lib/prism/node.rb#13053 + # source://prism//lib/prism/node.rb#13773 + sig do + params( + source: Prism::Source, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, value, pattern, operator_loc, location); 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#13874 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13063 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13783 + 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#13068 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13788 + 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#13078 + # source://prism//lib/prism/node.rb#13798 + 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#13073 + # source://prism//lib/prism/node.rb#13793 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> MatchRequiredNode + # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchRequiredNode # - # source://prism//lib/prism/node.rb#13083 - sig { params(params: T.untyped).returns(Prism::MatchRequiredNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13803 + sig do + params( + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::MatchRequiredNode) + end + def copy(value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#13788 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::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 + # source://prism//lib/prism/node.rb#13811 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13120 + # source://prism//lib/prism/node.rb#13834 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13115 + # source://prism//lib/prism/node.rb#13829 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13108 + # source://prism//lib/prism/node.rb#13822 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader pattern: Node + # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#13105 + # source://prism//lib/prism/node.rb#13819 sig { returns(Prism::Node) } def pattern; end @@ -18891,12 +21971,13 @@ class Prism::MatchRequiredNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13144 + # source://prism//lib/prism/node.rb#13858 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13102 + # source://prism//lib/prism/node.rb#13816 sig { returns(Prism::Node) } def value; end @@ -18908,7 +21989,7 @@ class Prism::MatchRequiredNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13154 + # source://prism//lib/prism/node.rb#13868 def type; end end end @@ -18918,75 +21999,97 @@ end # /(?bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13163 +# source://prism//lib/prism/node.rb#13886 class Prism::MatchWriteNode < ::Prism::Node - # def initialize: (CallNode call, Array[Node] targets, Location location) -> void + # def initialize: (CallNode call, Array[LocalVariableTargetNode] targets, Location location) -> void # # @return [MatchWriteNode] a new instance of MatchWriteNode # - # source://prism//lib/prism/node.rb#13165 + # source://prism//lib/prism/node.rb#13888 + sig do + params( + source: Prism::Source, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode], + location: Prism::Location + ).void + end def initialize(source, call, targets, location); 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#13974 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13174 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13897 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader call: CallNode # - # source://prism//lib/prism/node.rb#13212 + # source://prism//lib/prism/node.rb#13930 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)]) } + # source://prism//lib/prism/node.rb#13902 + 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#13189 + # source://prism//lib/prism/node.rb#13912 + 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#13184 + # source://prism//lib/prism/node.rb#13907 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> MatchWriteNode + # def copy: (?call: CallNode, ?targets: Array[LocalVariableTargetNode], ?location: Location) -> MatchWriteNode # - # source://prism//lib/prism/node.rb#13194 - sig { params(params: T.untyped).returns(Prism::MatchWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#13917 + sig do + params( + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode], + location: Prism::Location + ).returns(Prism::MatchWriteNode) + end + def copy(call: T.unsafe(nil), targets: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#13902 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[Node], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[LocalVariableTargetNode], 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 + # source://prism//lib/prism/node.rb#13925 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13219 + # source://prism//lib/prism/node.rb#13936 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader targets: Array[Node] + # attr_reader targets: Array[LocalVariableTargetNode] # - # source://prism//lib/prism/node.rb#13215 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#13933 + sig { returns(T::Array[Prism::LocalVariableTargetNode]) } def targets; end # Sometimes you want to check an instance of a node against a list of @@ -19004,7 +22107,8 @@ class Prism::MatchWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13241 + # source://prism//lib/prism/node.rb#13958 + sig { override.returns(Symbol) } def type; end class << self @@ -19015,70 +22119,79 @@ class Prism::MatchWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13251 + # source://prism//lib/prism/node.rb#13968 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 +# source://prism//lib/prism/node.rb#13983 class Prism::MissingNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [MissingNode] a new instance of MissingNode # - # source://prism//lib/prism/node.rb#13259 + # source://prism//lib/prism/node.rb#13985 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); 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#14060 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13266 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#13992 + 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#13271 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#13997 + 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#13281 + # source://prism//lib/prism/node.rb#14007 + 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#13276 + # source://prism//lib/prism/node.rb#14002 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> MissingNode + # def copy: (?location: Location) -> MissingNode # - # source://prism//lib/prism/node.rb#13286 - sig { params(params: T.untyped).returns(Prism::MissingNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14012 + sig { params(location: Prism::Location).returns(Prism::MissingNode) } + def copy(location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#13997 + sig { override.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 + # source://prism//lib/prism/node.rb#14020 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13303 + # source://prism//lib/prism/node.rb#14025 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -19096,7 +22209,8 @@ class Prism::MissingNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13322 + # source://prism//lib/prism/node.rb#14044 + sig { override.returns(Symbol) } def type; end class << self @@ -19107,7 +22221,7 @@ class Prism::MissingNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13332 + # source://prism//lib/prism/node.rb#14054 def type; end end end @@ -19117,110 +22231,140 @@ end # module Foo end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13341 +# source://prism//lib/prism/node.rb#14069 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 + # def initialize: (Array[Symbol] locals, Location module_keyword_loc, Prism::node constant_path, Prism::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 + # source://prism//lib/prism/node.rb#14071 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).void + end def initialize(source, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); 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#14203 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13356 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14084 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Node? + # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#13413 + # source://prism//lib/prism/node.rb#14133 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)]) } + # source://prism//lib/prism/node.rb#14089 + 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#13374 + # source://prism//lib/prism/node.rb#14102 + 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#13366 + # source://prism//lib/prism/node.rb#14094 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant_path: Node + # attr_reader constant_path: Prism::node # - # source://prism//lib/prism/node.rb#13410 + # source://prism//lib/prism/node.rb#14130 sig { returns(Prism::Node) } def constant_path; end - # def copy: (**params) -> ModuleNode + # def copy: (?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ModuleNode # - # source://prism//lib/prism/node.rb#13379 - sig { params(params: T.untyped).returns(Prism::ModuleNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14107 + sig do + params( + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + name: Symbol, + location: Prism::Location + ).returns(Prism::ModuleNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#14089 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], module_keyword_loc: Location, constant_path: Prism::node, body: Prism::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 + # source://prism//lib/prism/node.rb#14115 + 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#13431 + # source://prism//lib/prism/node.rb#14151 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13416 + # source://prism//lib/prism/node.rb#14136 sig { returns(Prism::Location) } def end_keyword_loc; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13436 + # source://prism//lib/prism/node.rb#14156 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#13401 + # source://prism//lib/prism/node.rb#14120 sig { returns(T::Array[Symbol]) } def locals; end # def module_keyword: () -> String # - # source://prism//lib/prism/node.rb#13426 + # source://prism//lib/prism/node.rb#14146 sig { returns(String) } def module_keyword; end # attr_reader module_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13404 + # source://prism//lib/prism/node.rb#14123 sig { returns(Prism::Location) } def module_keyword_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13422 + # source://prism//lib/prism/node.rb#14143 sig { returns(Symbol) } def name; end @@ -19239,7 +22383,8 @@ class Prism::ModuleNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13467 + # source://prism//lib/prism/node.rb#14187 + sig { override.returns(Symbol) } def type; end class << self @@ -19250,7 +22395,7 @@ class Prism::ModuleNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13477 + # source://prism//lib/prism/node.rb#14197 def type; end end end @@ -19260,104 +22405,136 @@ end # a, (b, c) = 1, 2, 3 # ^^^^^^ # -# source://prism//lib/prism/node.rb#13486 +# source://prism//lib/prism/node.rb#14219 class Prism::MultiTargetNode < ::Prism::Node - # def initialize: (Array[Node] lefts, Node? rest, Array[Node] rights, Location? lparen_loc, Location? rparen_loc, Location location) -> void + # def initialize: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] rights, Location? lparen_loc, Location? rparen_loc, Location location) -> void # # @return [MultiTargetNode] a new instance of MultiTargetNode # - # source://prism//lib/prism/node.rb#13488 + # source://prism//lib/prism/node.rb#14221 + sig do + params( + source: Prism::Source, + 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(Prism::Node), + 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)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, location); 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#14360 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13500 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14233 + 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#13505 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14238 + 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#13519 + # source://prism//lib/prism/node.rb#14252 + 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#13510 + # source://prism//lib/prism/node.rb#14243 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> MultiTargetNode + # def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?location: Location) -> MultiTargetNode # - # source://prism//lib/prism/node.rb#13524 - sig { params(params: T.untyped).returns(Prism::MultiTargetNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14257 + sig do + params( + 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(Prism::Node), + 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)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::MultiTargetNode) + end + def copy(lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#14238 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], 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 + # source://prism//lib/prism/node.rb#14265 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13589 + # source://prism//lib/prism/node.rb#14315 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader lefts: Array[Node] + # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] # - # source://prism//lib/prism/node.rb#13545 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#14270 + 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#13579 + # source://prism//lib/prism/node.rb#14305 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#13554 + # source://prism//lib/prism/node.rb#14279 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end - # attr_reader rest: Node? + # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#13548 + # source://prism//lib/prism/node.rb#14273 sig { returns(T.nilable(Prism::Node)) } def rest; end - # attr_reader rights: Array[Node] + # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] # - # source://prism//lib/prism/node.rb#13551 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#14276 + 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)]) + end def rights; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#13584 + # source://prism//lib/prism/node.rb#14310 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#13566 + # source://prism//lib/prism/node.rb#14292 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -19376,7 +22553,8 @@ class Prism::MultiTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13618 + # source://prism//lib/prism/node.rb#14344 + sig { override.returns(Symbol) } def type; end class << self @@ -19387,7 +22565,7 @@ class Prism::MultiTargetNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13628 + # source://prism//lib/prism/node.rb#14354 def type; end end end @@ -19397,116 +22575,152 @@ end # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13637 +# source://prism//lib/prism/node.rb#14376 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 + # def initialize: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [MultiWriteNode] a new instance of MultiWriteNode # - # source://prism//lib/prism/node.rb#13639 + # source://prism//lib/prism/node.rb#14378 + sig do + params( + source: Prism::Source, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); 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#14538 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13653 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14392 + 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#13658 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14397 + 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#13673 + # source://prism//lib/prism/node.rb#14412 + 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#13663 + # source://prism//lib/prism/node.rb#14402 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> MultiWriteNode + # def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> MultiWriteNode # - # source://prism//lib/prism/node.rb#13678 - sig { params(params: T.untyped).returns(Prism::MultiWriteNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14417 + sig do + params( + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + rest: T.nilable(Prism::Node), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::MultiWriteNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#14397 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#14425 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13759 + # source://prism//lib/prism/node.rb#14490 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader lefts: Array[Node] + # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#13701 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#14430 + 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)]) + end def lefts; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#13744 + # source://prism//lib/prism/node.rb#14475 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#13710 + # source://prism//lib/prism/node.rb#14439 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13754 + # source://prism//lib/prism/node.rb#14485 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13734 + # source://prism//lib/prism/node.rb#14465 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader rest: Node? + # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#13704 + # source://prism//lib/prism/node.rb#14433 sig { returns(T.nilable(Prism::Node)) } def rest; end - # attr_reader rights: Array[Node] + # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#13707 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#14436 + 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)]) + end def rights; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#13749 + # source://prism//lib/prism/node.rb#14480 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#13722 + # source://prism//lib/prism/node.rb#14452 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -19525,12 +22739,13 @@ class Prism::MultiWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13791 + # source://prism//lib/prism/node.rb#14522 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13740 + # source://prism//lib/prism/node.rb#14472 sig { returns(Prism::Node) } def value; end @@ -19542,7 +22757,7 @@ class Prism::MultiWriteNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13801 + # source://prism//lib/prism/node.rb#14532 def type; end end end @@ -19551,747 +22766,759 @@ end # 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 +# source://prism//lib/prism/mutation_compiler.rb#13 class Prism::MutationCompiler < ::Prism::Compiler # Copy a AliasGlobalVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#14 + # 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#19 + # 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#24 + # 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#29 + # 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#34 + # 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#39 + # 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#44 + # 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#49 + # 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#54 + # 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#59 + # 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#64 + # 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#69 + # 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#74 + # 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#79 + # 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#84 + # 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#89 + # 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#94 + # 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#99 + # 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#104 + # 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#109 + # 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#114 + # 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#119 + # 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#124 + # 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#129 + # 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#134 + # 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#139 + # 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#144 + # 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#149 + # 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#154 + # 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#159 + # 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#164 + # 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#169 + # 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#174 + # 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#179 + # 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#184 + # 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#189 + # 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#194 + # 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#199 + # 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#204 + # 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#209 + # 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#214 + # 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#219 + # 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#224 + # 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#229 + # 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#234 + # 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#239 + # 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#244 + # 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#249 + # 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#254 + # 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#259 + # 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#264 + # 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#269 + # 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#274 + # 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#279 + # 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#284 + # 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#289 + # 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#294 + # 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#299 + # 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#304 + # 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#309 + # 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#314 + # 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#319 + # 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#324 + # 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#329 + # 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#334 + # 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#339 + # 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#344 + # 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#349 + # 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#354 + # 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#359 + # 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#364 + # 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#369 + # 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#374 + # 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#379 + # 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#384 + # 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#389 + # 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#394 + # 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#399 + # 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#404 + # 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#409 + # 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#414 + # 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#419 + # 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#424 + # 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#429 + # 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#434 + # 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#439 + # 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#444 + # source://prism//lib/prism/mutation_compiler.rb#445 def visit_interpolated_x_string_node(node); end + # Copy a ItParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#450 + def visit_it_parameters_node(node); end + # Copy a KeywordHashNode node # - # source://prism//lib/prism/mutation_compiler.rb#449 + # source://prism//lib/prism/mutation_compiler.rb#455 def visit_keyword_hash_node(node); end # Copy a KeywordRestParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#454 + # source://prism//lib/prism/mutation_compiler.rb#460 def visit_keyword_rest_parameter_node(node); end # Copy a LambdaNode node # - # source://prism//lib/prism/mutation_compiler.rb#459 + # source://prism//lib/prism/mutation_compiler.rb#465 def visit_lambda_node(node); end # Copy a LocalVariableAndWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#464 + # source://prism//lib/prism/mutation_compiler.rb#470 def visit_local_variable_and_write_node(node); end # Copy a LocalVariableOperatorWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#469 + # source://prism//lib/prism/mutation_compiler.rb#475 def visit_local_variable_operator_write_node(node); end # Copy a LocalVariableOrWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#474 + # source://prism//lib/prism/mutation_compiler.rb#480 def visit_local_variable_or_write_node(node); end # Copy a LocalVariableReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#479 + # source://prism//lib/prism/mutation_compiler.rb#485 def visit_local_variable_read_node(node); end # Copy a LocalVariableTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#484 + # source://prism//lib/prism/mutation_compiler.rb#490 def visit_local_variable_target_node(node); end # Copy a LocalVariableWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#489 + # source://prism//lib/prism/mutation_compiler.rb#495 def visit_local_variable_write_node(node); end # Copy a MatchLastLineNode node # - # source://prism//lib/prism/mutation_compiler.rb#494 + # source://prism//lib/prism/mutation_compiler.rb#500 def visit_match_last_line_node(node); end # Copy a MatchPredicateNode node # - # source://prism//lib/prism/mutation_compiler.rb#499 + # source://prism//lib/prism/mutation_compiler.rb#505 def visit_match_predicate_node(node); end # Copy a MatchRequiredNode node # - # source://prism//lib/prism/mutation_compiler.rb#504 + # source://prism//lib/prism/mutation_compiler.rb#510 def visit_match_required_node(node); end # Copy a MatchWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#509 + # source://prism//lib/prism/mutation_compiler.rb#515 def visit_match_write_node(node); end # Copy a MissingNode node # - # source://prism//lib/prism/mutation_compiler.rb#514 + # source://prism//lib/prism/mutation_compiler.rb#520 def visit_missing_node(node); end # Copy a ModuleNode node # - # source://prism//lib/prism/mutation_compiler.rb#519 + # source://prism//lib/prism/mutation_compiler.rb#525 def visit_module_node(node); end # Copy a MultiTargetNode node # - # source://prism//lib/prism/mutation_compiler.rb#524 + # source://prism//lib/prism/mutation_compiler.rb#530 def visit_multi_target_node(node); end # Copy a MultiWriteNode node # - # source://prism//lib/prism/mutation_compiler.rb#529 + # source://prism//lib/prism/mutation_compiler.rb#535 def visit_multi_write_node(node); end # Copy a NextNode node # - # source://prism//lib/prism/mutation_compiler.rb#534 + # source://prism//lib/prism/mutation_compiler.rb#540 def visit_next_node(node); end # Copy a NilNode node # - # source://prism//lib/prism/mutation_compiler.rb#539 + # source://prism//lib/prism/mutation_compiler.rb#545 def visit_nil_node(node); end # Copy a NoKeywordsParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#544 + # source://prism//lib/prism/mutation_compiler.rb#550 def visit_no_keywords_parameter_node(node); end # Copy a NumberedParametersNode node # - # source://prism//lib/prism/mutation_compiler.rb#549 + # source://prism//lib/prism/mutation_compiler.rb#555 def visit_numbered_parameters_node(node); end # Copy a NumberedReferenceReadNode node # - # source://prism//lib/prism/mutation_compiler.rb#554 + # source://prism//lib/prism/mutation_compiler.rb#560 def visit_numbered_reference_read_node(node); end # Copy a OptionalKeywordParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#559 + # source://prism//lib/prism/mutation_compiler.rb#565 def visit_optional_keyword_parameter_node(node); end # Copy a OptionalParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#564 + # source://prism//lib/prism/mutation_compiler.rb#570 def visit_optional_parameter_node(node); end # Copy a OrNode node # - # source://prism//lib/prism/mutation_compiler.rb#569 + # source://prism//lib/prism/mutation_compiler.rb#575 def visit_or_node(node); end # Copy a ParametersNode node # - # source://prism//lib/prism/mutation_compiler.rb#574 + # source://prism//lib/prism/mutation_compiler.rb#580 def visit_parameters_node(node); end # Copy a ParenthesesNode node # - # source://prism//lib/prism/mutation_compiler.rb#579 + # source://prism//lib/prism/mutation_compiler.rb#585 def visit_parentheses_node(node); end # Copy a PinnedExpressionNode node # - # source://prism//lib/prism/mutation_compiler.rb#584 + # source://prism//lib/prism/mutation_compiler.rb#590 def visit_pinned_expression_node(node); end # Copy a PinnedVariableNode node # - # source://prism//lib/prism/mutation_compiler.rb#589 + # source://prism//lib/prism/mutation_compiler.rb#595 def visit_pinned_variable_node(node); end # Copy a PostExecutionNode node # - # source://prism//lib/prism/mutation_compiler.rb#594 + # source://prism//lib/prism/mutation_compiler.rb#600 def visit_post_execution_node(node); end # Copy a PreExecutionNode node # - # source://prism//lib/prism/mutation_compiler.rb#599 + # source://prism//lib/prism/mutation_compiler.rb#605 def visit_pre_execution_node(node); end # Copy a ProgramNode node # - # source://prism//lib/prism/mutation_compiler.rb#604 + # source://prism//lib/prism/mutation_compiler.rb#610 def visit_program_node(node); end # Copy a RangeNode node # - # source://prism//lib/prism/mutation_compiler.rb#609 + # source://prism//lib/prism/mutation_compiler.rb#615 def visit_range_node(node); end # Copy a RationalNode node # - # source://prism//lib/prism/mutation_compiler.rb#614 + # source://prism//lib/prism/mutation_compiler.rb#620 def visit_rational_node(node); end # Copy a RedoNode node # - # source://prism//lib/prism/mutation_compiler.rb#619 + # source://prism//lib/prism/mutation_compiler.rb#625 def visit_redo_node(node); end # Copy a RegularExpressionNode node # - # source://prism//lib/prism/mutation_compiler.rb#624 + # source://prism//lib/prism/mutation_compiler.rb#630 def visit_regular_expression_node(node); end # Copy a RequiredKeywordParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#629 + # source://prism//lib/prism/mutation_compiler.rb#635 def visit_required_keyword_parameter_node(node); end # Copy a RequiredParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#634 + # source://prism//lib/prism/mutation_compiler.rb#640 def visit_required_parameter_node(node); end # Copy a RescueModifierNode node # - # source://prism//lib/prism/mutation_compiler.rb#639 + # source://prism//lib/prism/mutation_compiler.rb#645 def visit_rescue_modifier_node(node); end # Copy a RescueNode node # - # source://prism//lib/prism/mutation_compiler.rb#644 + # source://prism//lib/prism/mutation_compiler.rb#650 def visit_rescue_node(node); end # Copy a RestParameterNode node # - # source://prism//lib/prism/mutation_compiler.rb#649 + # source://prism//lib/prism/mutation_compiler.rb#655 def visit_rest_parameter_node(node); end # Copy a RetryNode node # - # source://prism//lib/prism/mutation_compiler.rb#654 + # source://prism//lib/prism/mutation_compiler.rb#660 def visit_retry_node(node); end # Copy a ReturnNode node # - # source://prism//lib/prism/mutation_compiler.rb#659 + # source://prism//lib/prism/mutation_compiler.rb#665 def visit_return_node(node); end # Copy a SelfNode node # - # source://prism//lib/prism/mutation_compiler.rb#664 + # source://prism//lib/prism/mutation_compiler.rb#670 def visit_self_node(node); end + # Copy a ShareableConstantNode node + # + # source://prism//lib/prism/mutation_compiler.rb#675 + def visit_shareable_constant_node(node); end + # Copy a SingletonClassNode node # - # source://prism//lib/prism/mutation_compiler.rb#669 + # source://prism//lib/prism/mutation_compiler.rb#680 def visit_singleton_class_node(node); end # Copy a SourceEncodingNode node # - # source://prism//lib/prism/mutation_compiler.rb#674 + # source://prism//lib/prism/mutation_compiler.rb#685 def visit_source_encoding_node(node); end # Copy a SourceFileNode node # - # source://prism//lib/prism/mutation_compiler.rb#679 + # source://prism//lib/prism/mutation_compiler.rb#690 def visit_source_file_node(node); end # Copy a SourceLineNode node # - # source://prism//lib/prism/mutation_compiler.rb#684 + # source://prism//lib/prism/mutation_compiler.rb#695 def visit_source_line_node(node); end # Copy a SplatNode node # - # source://prism//lib/prism/mutation_compiler.rb#689 + # source://prism//lib/prism/mutation_compiler.rb#700 def visit_splat_node(node); end # Copy a StatementsNode node # - # source://prism//lib/prism/mutation_compiler.rb#694 + # source://prism//lib/prism/mutation_compiler.rb#705 def visit_statements_node(node); end # Copy a StringNode node # - # source://prism//lib/prism/mutation_compiler.rb#699 + # source://prism//lib/prism/mutation_compiler.rb#710 def visit_string_node(node); end # Copy a SuperNode node # - # source://prism//lib/prism/mutation_compiler.rb#704 + # source://prism//lib/prism/mutation_compiler.rb#715 def visit_super_node(node); end # Copy a SymbolNode node # - # source://prism//lib/prism/mutation_compiler.rb#709 + # source://prism//lib/prism/mutation_compiler.rb#720 def visit_symbol_node(node); end # Copy a TrueNode node # - # source://prism//lib/prism/mutation_compiler.rb#714 + # source://prism//lib/prism/mutation_compiler.rb#725 def visit_true_node(node); end # Copy a UndefNode node # - # source://prism//lib/prism/mutation_compiler.rb#719 + # source://prism//lib/prism/mutation_compiler.rb#730 def visit_undef_node(node); end # Copy a UnlessNode node # - # source://prism//lib/prism/mutation_compiler.rb#724 + # source://prism//lib/prism/mutation_compiler.rb#735 def visit_unless_node(node); end # Copy a UntilNode node # - # source://prism//lib/prism/mutation_compiler.rb#729 + # source://prism//lib/prism/mutation_compiler.rb#740 def visit_until_node(node); end # Copy a WhenNode node # - # source://prism//lib/prism/mutation_compiler.rb#734 + # source://prism//lib/prism/mutation_compiler.rb#745 def visit_when_node(node); end # Copy a WhileNode node # - # source://prism//lib/prism/mutation_compiler.rb#739 + # source://prism//lib/prism/mutation_compiler.rb#750 def visit_while_node(node); end # Copy a XStringNode node # - # source://prism//lib/prism/mutation_compiler.rb#744 + # source://prism//lib/prism/mutation_compiler.rb#755 def visit_x_string_node(node); end # Copy a YieldNode node # - # source://prism//lib/prism/mutation_compiler.rb#749 + # source://prism//lib/prism/mutation_compiler.rb#760 def visit_yield_node(node); end + + Result = type_member end # Represents the use of the `next` keyword. @@ -20299,80 +23526,102 @@ end # next 1 # ^^^^^^ # -# source://prism//lib/prism/node.rb#13810 +# source://prism//lib/prism/node.rb#14556 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 + # source://prism//lib/prism/node.rb#14558 + sig do + params( + source: Prism::Source, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, arguments, keyword_loc, location); 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#14659 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13821 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14567 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#13861 + # source://prism//lib/prism/node.rb#14602 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)]) } + # source://prism//lib/prism/node.rb#14572 + 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#13838 + # source://prism//lib/prism/node.rb#14584 + 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#13831 + # source://prism//lib/prism/node.rb#14577 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> NextNode + # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> NextNode # - # source://prism//lib/prism/node.rb#13843 - sig { params(params: T.untyped).returns(Prism::NextNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14589 + sig do + params( + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::NextNode) + end + def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#14572 + sig { override.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 + # source://prism//lib/prism/node.rb#14597 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13876 + # source://prism//lib/prism/node.rb#14617 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#13871 + # source://prism//lib/prism/node.rb#14612 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#13864 + # source://prism//lib/prism/node.rb#14605 sig { returns(Prism::Location) } def keyword_loc; end @@ -20391,7 +23640,8 @@ class Prism::NextNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13902 + # source://prism//lib/prism/node.rb#14643 + sig { override.returns(Symbol) } def type; end class << self @@ -20402,7 +23652,7 @@ class Prism::NextNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13912 + # source://prism//lib/prism/node.rb#14653 def type; end end end @@ -20412,63 +23662,72 @@ end # nil # ^^^ # -# source://prism//lib/prism/node.rb#13921 +# source://prism//lib/prism/node.rb#14670 class Prism::NilNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [NilNode] a new instance of NilNode # - # source://prism//lib/prism/node.rb#13923 + # source://prism//lib/prism/node.rb#14672 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); 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#14747 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13930 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14679 + 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#13935 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14684 + 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#13945 + # source://prism//lib/prism/node.rb#14694 + 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#13940 + # source://prism//lib/prism/node.rb#14689 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> NilNode + # def copy: (?location: Location) -> NilNode # - # source://prism//lib/prism/node.rb#13950 - sig { params(params: T.untyped).returns(Prism::NilNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14699 + sig { params(location: Prism::Location).returns(Prism::NilNode) } + def copy(location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#14684 + sig { override.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 + # source://prism//lib/prism/node.rb#14707 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#13967 + # source://prism//lib/prism/node.rb#14712 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -20486,7 +23745,8 @@ class Prism::NilNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#13986 + # source://prism//lib/prism/node.rb#14731 + sig { override.returns(Symbol) } def type; end class << self @@ -20497,7 +23757,7 @@ class Prism::NilNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#13996 + # source://prism//lib/prism/node.rb#14741 def type; end end end @@ -20508,86 +23768,108 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#14006 +# source://prism//lib/prism/node.rb#14757 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 + # source://prism//lib/prism/node.rb#14759 + sig do + params( + source: Prism::Source, + operator_loc: Prism::Location, + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, operator_loc, keyword_loc, location); 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#14862 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14017 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14768 + 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#14022 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14773 + 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#14032 + # source://prism//lib/prism/node.rb#14783 + 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#14027 + # source://prism//lib/prism/node.rb#14778 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> NoKeywordsParameterNode + # def copy: (?operator_loc: Location, ?keyword_loc: Location, ?location: Location) -> NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#14037 - sig { params(params: T.untyped).returns(Prism::NoKeywordsParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14788 + sig do + params( + operator_loc: Prism::Location, + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end + def copy(operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#14773 + sig { override.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 + # source://prism//lib/prism/node.rb#14796 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14078 + # source://prism//lib/prism/node.rb#14825 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#14073 + # source://prism//lib/prism/node.rb#14820 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#14061 + # source://prism//lib/prism/node.rb#14808 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14068 + # source://prism//lib/prism/node.rb#14815 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14055 + # source://prism//lib/prism/node.rb#14801 sig { returns(Prism::Location) } def operator_loc; end @@ -20606,7 +23888,8 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14099 + # source://prism//lib/prism/node.rb#14846 + sig { override.returns(Symbol) } def type; end class << self @@ -20617,7 +23900,7 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14109 + # source://prism//lib/prism/node.rb#14856 def type; end end end @@ -20625,14 +23908,16 @@ 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 +# 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#62 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#90 + sig { abstract.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # Returns an array of child nodes, including `nil`s in the place of optional @@ -20640,8 +23925,8 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#68 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#96 + 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 @@ -20649,7 +23934,8 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#82 + # source://prism//lib/prism/node.rb#110 + 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 @@ -20657,8 +23943,8 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#76 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#104 + 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 @@ -20666,40 +23952,66 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#68 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#96 + sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; 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#34 + 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#121 + sig { abstract.params(inspector: Prism::NodeInspector).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + # A Location instance that represents the location of this node in the # source. # - # source://prism//lib/prism/node.rb#18 + # source://prism//lib/prism/node.rb#19 sig { returns(Prism::Location) } def location; end # @return [Boolean] # - # source://prism//lib/prism/node.rb#23 + # source://prism//lib/prism/node.rb#39 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 + # source://prism//lib/prism/node.rb#58 + sig { params(q: T.untyped).void } def pretty_print(q); end - # source://prism//lib/prism/node.rb#27 + # source://prism//lib/prism/node.rb#43 def set_newline_flag(newline_marked); end # Slice the location of the node from the source. # - # source://prism//lib/prism/node.rb#36 + # source://prism//lib/prism/node.rb#52 sig { returns(String) } def slice; 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#27 + sig { returns(Integer) } + def start_offset; end + # Convert this node into a graphviz dot graph string. # - # source://prism//lib/prism/node.rb#50 + # source://prism//lib/prism/node.rb#66 sig { returns(String) } def to_dot; end @@ -20708,16 +24020,35 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#88 - sig { returns(Symbol) } + # source://prism//lib/prism/node.rb#116 + sig { abstract.returns(Symbol) } def type; end private # A pointer to the source that this node was created from. # - # source://prism//lib/prism/node.rb#13 + # 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#74 + def fields; end + + # Returns the type of the node as a symbol. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#126 + def type; end + end end # This object is responsible for generating the output for the inspect method @@ -20733,55 +24064,44 @@ class Prism::NodeInspector # 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 @@ -20790,68 +24110,77 @@ end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14118 +# source://prism//lib/prism/node.rb#14873 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 + # source://prism//lib/prism/node.rb#14875 + sig { params(source: Prism::Source, maximum: Integer, location: Prism::Location).void } def initialize(source, maximum, location); 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#14955 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14128 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14883 + 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#14133 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14888 + 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#14143 + # source://prism//lib/prism/node.rb#14898 + 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#14138 + # source://prism//lib/prism/node.rb#14893 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> NumberedParametersNode + # def copy: (?maximum: Integer, ?location: Location) -> NumberedParametersNode # - # source://prism//lib/prism/node.rb#14148 - sig { params(params: T.untyped).returns(Prism::NumberedParametersNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14903 + sig { params(maximum: Integer, location: Prism::Location).returns(Prism::NumberedParametersNode) } + def copy(maximum: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#14888 + sig { override.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 + # source://prism//lib/prism/node.rb#14911 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14169 + # source://prism//lib/prism/node.rb#14919 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader maximum: Integer # - # source://prism//lib/prism/node.rb#14165 + # source://prism//lib/prism/node.rb#14916 sig { returns(Integer) } def maximum; end @@ -20870,7 +24199,8 @@ class Prism::NumberedParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14189 + # source://prism//lib/prism/node.rb#14939 + sig { override.returns(Symbol) } def type; end class << self @@ -20881,7 +24211,7 @@ class Prism::NumberedParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14199 + # source://prism//lib/prism/node.rb#14949 def type; end end end @@ -20891,74 +24221,83 @@ end # $1 # ^^ # -# source://prism//lib/prism/node.rb#14208 +# source://prism//lib/prism/node.rb#14965 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 + # source://prism//lib/prism/node.rb#14967 + sig { params(source: Prism::Source, number: Integer, location: Prism::Location).void } def initialize(source, number, location); 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#15053 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14218 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#14975 + 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#14223 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#14980 + 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#14233 + # source://prism//lib/prism/node.rb#14990 + 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#14228 + # source://prism//lib/prism/node.rb#14985 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> NumberedReferenceReadNode + # def copy: (?number: Integer, ?location: Location) -> NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#14238 - sig { params(params: T.untyped).returns(Prism::NumberedReferenceReadNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#14995 + sig { params(number: Integer, location: Prism::Location).returns(Prism::NumberedReferenceReadNode) } + def copy(number: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#14980 + sig { override.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 + # source://prism//lib/prism/node.rb#15003 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14265 + # source://prism//lib/prism/node.rb#15017 + sig { params(inspector: T.untyped).returns(String) } 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`. + # 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 `4294967295` + # $4294967296 # number `0` # - # source://prism//lib/prism/node.rb#14261 + # source://prism//lib/prism/node.rb#15014 sig { returns(Integer) } def number; end @@ -20977,7 +24316,8 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14285 + # source://prism//lib/prism/node.rb#15037 + sig { override.returns(Symbol) } def type; end class << self @@ -20988,7 +24328,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14295 + # source://prism//lib/prism/node.rb#15047 def type; end end end @@ -20999,74 +24339,100 @@ end # ^^^^ # end # -# source://prism//lib/prism/node.rb#14305 +# source://prism//lib/prism/node.rb#15064 class Prism::OptionalKeywordParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location name_loc, Node value, Location location) -> void + # def initialize: (Integer flags, Symbol name, Location name_loc, Prism::node value, Location location) -> void # # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#14307 + # source://prism//lib/prism/node.rb#15066 + sig do + params( + source: Prism::Source, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, flags, name, name_loc, value, location); 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#15173 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14318 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15077 + 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#14323 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15082 + 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#14333 + # source://prism//lib/prism/node.rb#15092 + 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#14328 + # source://prism//lib/prism/node.rb#15087 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> OptionalKeywordParameterNode + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#14338 - sig { params(params: T.untyped).returns(Prism::OptionalKeywordParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15097 + sig do + params( + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::OptionalKeywordParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#15082 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#15105 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14380 + # source://prism//lib/prism/node.rb#15132 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14362 + # source://prism//lib/prism/node.rb#15114 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#14365 + # source://prism//lib/prism/node.rb#15117 sig { returns(Prism::Location) } def name_loc; end @@ -21074,7 +24440,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#14375 + # source://prism//lib/prism/node.rb#15127 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -21093,20 +24459,21 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14405 + # source://prism//lib/prism/node.rb#15157 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#14371 + # source://prism//lib/prism/node.rb#15124 sig { returns(Prism::Node) } def value; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#14358 + # source://prism//lib/prism/node.rb#15110 sig { returns(Integer) } def flags; end @@ -21118,7 +24485,7 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14415 + # source://prism//lib/prism/node.rb#15167 def type; end end end @@ -21129,86 +24496,114 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#14425 +# source://prism//lib/prism/node.rb#15187 class Prism::OptionalParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Node value, Location location) -> void + # def initialize: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void # # @return [OptionalParameterNode] a new instance of OptionalParameterNode # - # source://prism//lib/prism/node.rb#14427 + # source://prism//lib/prism/node.rb#15189 + sig do + params( + source: Prism::Source, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, flags, name, name_loc, operator_loc, value, location); 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#15310 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14439 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15201 + 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#14444 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15206 + 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#14454 + # source://prism//lib/prism/node.rb#15216 + 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#14449 + # source://prism//lib/prism/node.rb#15211 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> OptionalParameterNode + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalParameterNode # - # source://prism//lib/prism/node.rb#14459 - sig { params(params: T.untyped).returns(Prism::OptionalParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15221 + sig do + params( + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).returns(Prism::OptionalParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#15206 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::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 + # source://prism//lib/prism/node.rb#15229 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14513 + # source://prism//lib/prism/node.rb#15268 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14484 + # source://prism//lib/prism/node.rb#15238 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#14487 + # source://prism//lib/prism/node.rb#15241 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14508 + # source://prism//lib/prism/node.rb#15263 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14493 + # source://prism//lib/prism/node.rb#15248 sig { returns(Prism::Location) } def operator_loc; end @@ -21216,7 +24611,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#14503 + # source://prism//lib/prism/node.rb#15258 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -21235,20 +24630,21 @@ class Prism::OptionalParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14539 + # source://prism//lib/prism/node.rb#15294 + sig { override.returns(Symbol) } def type; end - # attr_reader value: Node + # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#14499 + # source://prism//lib/prism/node.rb#15255 sig { returns(Prism::Node) } def value; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#14480 + # source://prism//lib/prism/node.rb#15234 sig { returns(Integer) } def flags; end @@ -21260,7 +24656,7 @@ class Prism::OptionalParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14549 + # source://prism//lib/prism/node.rb#15304 def type; end end end @@ -21270,63 +24666,87 @@ end # left or right # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14558 +# source://prism//lib/prism/node.rb#15324 class Prism::OrNode < ::Prism::Node - # def initialize: (Node left, Node right, Location operator_loc, Location location) -> void + # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void # # @return [OrNode] a new instance of OrNode # - # source://prism//lib/prism/node.rb#14560 + # source://prism//lib/prism/node.rb#15326 + sig do + params( + source: Prism::Source, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, left, right, operator_loc, location); 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#15442 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14570 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15336 + 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#14575 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15341 + 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#14585 + # source://prism//lib/prism/node.rb#15351 + 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#14580 + # source://prism//lib/prism/node.rb#15346 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> OrNode + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> OrNode # - # source://prism//lib/prism/node.rb#14590 - sig { params(params: T.untyped).returns(Prism::OrNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15356 + sig do + params( + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::OrNode) + end + def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#15341 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::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 + # source://prism//lib/prism/node.rb#15364 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14642 + # source://prism//lib/prism/node.rb#15402 + sig { params(inspector: T.untyped).returns(String) } 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). @@ -21337,13 +24757,13 @@ class Prism::OrNode < ::Prism::Node # 1 || 2 # ^ # - # source://prism//lib/prism/node.rb#14615 + # source://prism//lib/prism/node.rb#15375 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14637 + # source://prism//lib/prism/node.rb#15397 sig { returns(String) } def operator; end @@ -21352,7 +24772,7 @@ class Prism::OrNode < ::Prism::Node # left or right # ^^ # - # source://prism//lib/prism/node.rb#14630 + # source://prism//lib/prism/node.rb#15390 sig { returns(Prism::Location) } def operator_loc; end @@ -21364,7 +24784,7 @@ class Prism::OrNode < ::Prism::Node # 1 or 2 # ^ # - # source://prism//lib/prism/node.rb#14624 + # source://prism//lib/prism/node.rb#15384 sig { returns(Prism::Node) } def right; end @@ -21383,7 +24803,8 @@ class Prism::OrNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14666 + # source://prism//lib/prism/node.rb#15426 + sig { override.returns(Symbol) } def type; end class << self @@ -21394,261 +24815,261 @@ class Prism::OrNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14676 + # source://prism//lib/prism/node.rb#15436 def type; end end end # A parser for the pack template language. # -# source://prism//lib/prism/pack.rb#5 +# 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#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# 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#59 +# 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#88 + # 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#130 + # source://prism//lib/prism/pack.rb#131 def describe; end # The type of endianness of the directive. # - # source://prism//lib/prism/pack.rb#76 + # source://prism//lib/prism/pack.rb#77 def endian; end # The length of this directive (used for integers). # - # source://prism//lib/prism/pack.rb#85 + # 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#82 + # source://prism//lib/prism/pack.rb#83 def length_type; end # The type of signedness of the directive. # - # source://prism//lib/prism/pack.rb#73 + # source://prism//lib/prism/pack.rb#74 def signed; end # The size of the directive. # - # source://prism//lib/prism/pack.rb#79 + # 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#67 + # source://prism//lib/prism/pack.rb#68 def source; end # The type of the directive. # - # source://prism//lib/prism/pack.rb#70 + # 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#64 + # source://prism//lib/prism/pack.rb#65 def variant; end # A symbol representing the version of Ruby. # - # source://prism//lib/prism/pack.rb#61 + # 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#101 +# 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#110 +# 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#117 +# source://prism//lib/prism/pack.rb#118 Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# 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#195 +# 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#203 + # 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#209 + # source://prism//lib/prism/pack.rb#212 def describe; end # A list of the directives in the template. # - # source://prism//lib/prism/pack.rb#197 + # source://prism//lib/prism/pack.rb#200 def directives; end # The encoding of the template. # - # source://prism//lib/prism/pack.rb#200 + # source://prism//lib/prism/pack.rb#203 def encoding; end end -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# source://prism//lib/prism/pack.rb#56 Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) -# source://prism//lib/prism/pack.rb#55 +# 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#19304 +# source://prism//lib/prism/node.rb#20409 module Prism::ParameterFlags; end # a parameter name that has been repeated in the method signature # -# source://prism//lib/prism/node.rb#19306 +# source://prism//lib/prism/node.rb#20411 Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # Represents the list of parameters on a method, block, or lambda definition. @@ -21657,110 +25078,147 @@ Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # ^^^^^^^ # end # -# source://prism//lib/prism/node.rb#14686 +# source://prism//lib/prism/node.rb#15455 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 + # def initialize: (Array[RequiredParameterNode | MultiTargetNode] requireds, Array[OptionalParameterNode] optionals, RestParameterNode | ImplicitRestNode | nil rest, Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode] posts, Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] keywords, KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil keyword_rest, BlockParameterNode? block, Location location) -> void # # @return [ParametersNode] a new instance of ParametersNode # - # source://prism//lib/prism/node.rb#14688 + # source://prism//lib/prism/node.rb#15457 + sig do + params( + source: Prism::Source, + 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)], + 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), + location: Prism::Location + ).void + end def initialize(source, requireds, optionals, rest, posts, keywords, keyword_rest, block, location); 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#15590 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14702 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15471 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockParameterNode? # - # source://prism//lib/prism/node.rb#14771 + # source://prism//lib/prism/node.rb#15530 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)]) } + # source://prism//lib/prism/node.rb#15476 + 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#14725 + # source://prism//lib/prism/node.rb#15494 + 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#14712 + # source://prism//lib/prism/node.rb#15481 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ParametersNode + # def copy: (?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?, ?location: Location) -> ParametersNode # - # source://prism//lib/prism/node.rb#14730 - sig { params(params: T.untyped).returns(Prism::ParametersNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15499 + sig do + params( + 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)], + 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), + location: Prism::Location + ).returns(Prism::ParametersNode) + end + def copy(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), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#15476 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, 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 + # source://prism//lib/prism/node.rb#15507 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14775 + # source://prism//lib/prism/node.rb#15533 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader keyword_rest: Node? + # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#14768 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#15527 + sig do + returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) + end def keyword_rest; end - # attr_reader keywords: Array[Node] + # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] # - # source://prism//lib/prism/node.rb#14765 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#15524 + sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } def keywords; end - # attr_reader optionals: Array[Node] + # attr_reader optionals: Array[OptionalParameterNode] # - # source://prism//lib/prism/node.rb#14756 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#15515 + sig { returns(T::Array[Prism::OptionalParameterNode]) } def optionals; end - # attr_reader posts: Array[Node] + # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode] # - # source://prism//lib/prism/node.rb#14762 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#15521 + sig do + returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode)]) + end def posts; end - # attr_reader requireds: Array[Node] + # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#14753 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#15512 + sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } def requireds; end - # attr_reader rest: Node? + # attr_reader rest: RestParameterNode | ImplicitRestNode | nil # - # source://prism//lib/prism/node.rb#14759 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#15518 + 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#172 + # source://prism//lib/prism/node_ext.rb#210 + sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } def signature; end # Sometimes you want to check an instance of a node against a list of @@ -21778,7 +25236,8 @@ class Prism::ParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14816 + # source://prism//lib/prism/node.rb#15574 + sig { override.returns(Symbol) } def type; end class << self @@ -21789,7 +25248,7 @@ class Prism::ParametersNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14826 + # source://prism//lib/prism/node.rb#15584 def type; end end end @@ -21799,96 +25258,120 @@ end # (10 + 34) # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14835 +# source://prism//lib/prism/node.rb#15610 class Prism::ParenthesesNode < ::Prism::Node - # def initialize: (Node? body, Location opening_loc, Location closing_loc, Location location) -> void + # def initialize: (Prism::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 + # source://prism//lib/prism/node.rb#15612 + sig do + params( + source: Prism::Source, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, body, opening_loc, closing_loc, location); 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#15731 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14847 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15622 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Node? + # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#14892 + # source://prism//lib/prism/node.rb#15661 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)]) } + # source://prism//lib/prism/node.rb#15631 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#14913 + # source://prism//lib/prism/node.rb#15683 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#14901 + # source://prism//lib/prism/node.rb#15671 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14868 + # source://prism//lib/prism/node.rb#15643 + 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#14861 + # source://prism//lib/prism/node.rb#15636 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ParenthesesNode + # def copy: (?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> ParenthesesNode # - # source://prism//lib/prism/node.rb#14873 - sig { params(params: T.untyped).returns(Prism::ParenthesesNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15648 + sig do + params( + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::ParenthesesNode) + end + def copy(body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#15631 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { body: Prism::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 + # source://prism//lib/prism/node.rb#15656 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#14918 + # source://prism//lib/prism/node.rb#15688 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#14908 + # source://prism//lib/prism/node.rb#15678 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#14895 + # source://prism//lib/prism/node.rb#15664 sig { returns(Prism::Location) } def opening_loc; end - # source://prism//lib/prism/node.rb#14851 + # source://prism//lib/prism/node.rb#15626 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -21906,7 +25389,8 @@ class Prism::ParenthesesNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#14945 + # source://prism//lib/prism/node.rb#15715 + sig { override.returns(Symbol) } def type; end class << self @@ -21917,137 +25401,140 @@ class Prism::ParenthesesNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#14955 + # source://prism//lib/prism/node.rb#15725 def type; end end end # This represents an error that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#338 +# source://prism//lib/prism/parse_result.rb#373 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 + # source://prism//lib/prism/parse_result.rb#388 + 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#356 + # source://prism//lib/prism/parse_result.rb#396 + 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#361 + # source://prism//lib/prism/parse_result.rb#401 + sig { returns(String) } def inspect; end # The level of this error. # - # source://prism//lib/prism/parse_result.rb#346 + # source://prism//lib/prism/parse_result.rb#385 + 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#343 + # source://prism//lib/prism/parse_result.rb#382 sig { returns(Prism::Location) } def location; end # The message associated with this error. # - # source://prism//lib/prism/parse_result.rb#340 + # source://prism//lib/prism/parse_result.rb#379 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#376 + sig { returns(Symbol) } + def type; 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. +# This is a result specific to the `parse_lex` and `parse_lex_file` methods. # -# source://prism//lib/prism/parse_result.rb#398 -class Prism::ParseResult - # Create a new parse result object with the given values. +# source://prism//lib/prism/parse_result.rb#532 +class Prism::ParseLexResult < ::Prism::Result + # Create a new parse lex result object with the given values. # - # @return [ParseResult] a new instance of ParseResult + # @return [ParseLexResult] a new instance of ParseLexResult # - # source://prism//lib/prism/parse_result.rb#425 + # source://prism//lib/prism/parse_result.rb#538 + 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 - # Attach the list of comments to their respective locations in the tree. + # Implement the hash pattern matching interface for ParseLexResult. # - # source://prism//lib/prism/parse_result/comments.rb#173 - def attach_comments!; end + # source://prism//lib/prism/parse_result.rb#544 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end - # The list of comments that were encountered during parsing. + # 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#405 - sig { returns(T::Array[Prism::Comment]) } - def comments; end + # source://prism//lib/prism/parse_result.rb#535 + sig { returns([Prism::ProgramNode, T::Array[T.untyped]]) } + def value; end +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. +# This is a result specific to the `parse` and `parse_file` methods. +# +# source://prism//lib/prism/parse_result.rb#498 +class Prism::ParseResult < ::Prism::Result + # Create a new parse result object with the given values. # - # source://prism//lib/prism/parse_result.rb#413 - def data_loc; end + # @return [ParseResult] a new instance of ParseResult + # + # source://prism//lib/prism/parse_result.rb#503 + 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/comments.rb#190 + def attach_comments!; end # Implement the hash pattern matching interface for ParseResult. # - # source://prism//lib/prism/parse_result.rb#436 + # source://prism//lib/prism/parse_result.rb#509 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # The list of errors that were generated during parsing. + # Walk the tree and mark nodes that are on a new line. # - # source://prism//lib/prism/parse_result.rb#416 - sig { returns(T::Array[Prism::ParseError]) } - def errors; end + # source://prism//lib/prism/parse_result/newlines.rb#60 + def mark_newlines!; end - # Returns true if there were errors during parsing and false if there were - # not. + # The syntax tree that was parsed from the source code. # - # @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 + # source://prism//lib/prism/parse_result.rb#500 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 @@ -22072,18 +25559,18 @@ class Prism::ParseResult::Comments # # @return [Comments] a new instance of Comments # - # source://prism//lib/prism/parse_result/comments.rb#78 + # 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#84 + # 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#74 + # source://prism//lib/prism/parse_result/comments.rb#82 def parse_result; end private @@ -22091,36 +25578,39 @@ class Prism::ParseResult::Comments # 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 + # 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#49 +# 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#52 + # source://prism//lib/prism/parse_result/comments.rb#56 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 + # source://prism//lib/prism/parse_result/comments.rb#68 def encloses?(comment); end - # source://prism//lib/prism/parse_result/comments.rb#60 + # source://prism//lib/prism/parse_result/comments.rb#64 def end_offset; end - # source://prism//lib/prism/parse_result/comments.rb#50 + # 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#56 + # 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 @@ -22133,9 +25623,6 @@ class Prism::ParseResult::Comments::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 @@ -22144,11 +25631,17 @@ class Prism::ParseResult::Comments::NodeTarget # 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 # The :line tracepoint event gets fired whenever the Ruby VM encounters an @@ -22204,41 +25697,52 @@ end # This represents a warning that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#367 +# source://prism//lib/prism/parse_result.rb#407 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 + # source://prism//lib/prism/parse_result.rb#422 + 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#385 + # source://prism//lib/prism/parse_result.rb#430 + 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#390 + # source://prism//lib/prism/parse_result.rb#435 + sig { returns(String) } def inspect; end # The level of this warning. # - # source://prism//lib/prism/parse_result.rb#375 + # source://prism//lib/prism/parse_result.rb#419 + 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#372 + # source://prism//lib/prism/parse_result.rb#416 sig { returns(Prism::Location) } def location; end # The message associated with this warning. # - # source://prism//lib/prism/parse_result.rb#369 + # source://prism//lib/prism/parse_result.rb#413 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#410 + sig { returns(Symbol) } + def type; end end # A pattern is an object that wraps a Ruby pattern matching expression. The @@ -22288,6 +25792,8 @@ class Prism::Pattern # 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 @@ -22301,7 +25807,7 @@ class Prism::Pattern # 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 + # source://prism//lib/prism/pattern.rb#86 def scan(root); end private @@ -22309,75 +25815,75 @@ class Prism::Pattern # Shortcut for combining two procs into one that returns true if both return # true. # - # source://prism//lib/prism/pattern.rb#95 + # 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#101 + # source://prism//lib/prism/pattern.rb#108 def combine_or(left, right); end # in foo | bar # - # source://prism//lib/prism/pattern.rb#136 + # source://prism//lib/prism/pattern.rb#143 def compile_alternation_pattern_node(node); end # in [foo, bar, baz] # - # source://prism//lib/prism/pattern.rb#111 + # source://prism//lib/prism/pattern.rb#118 def compile_array_pattern_node(node); end # in Prism::ConstantReadNode # - # source://prism//lib/prism/pattern.rb#141 + # source://prism//lib/prism/pattern.rb#148 def compile_constant_path_node(node); end # in ConstantReadNode # in String # - # source://prism//lib/prism/pattern.rb#153 + # source://prism//lib/prism/pattern.rb#160 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 + # 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#171 + # source://prism//lib/prism/pattern.rb#178 def compile_hash_pattern_node(node); end # in nil # - # source://prism//lib/prism/pattern.rb#196 + # source://prism//lib/prism/pattern.rb#208 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 + # source://prism//lib/prism/pattern.rb#237 def compile_node(node); end # in /foo/ # - # source://prism//lib/prism/pattern.rb#201 + # source://prism//lib/prism/pattern.rb#213 def compile_regular_expression_node(node); end # in "" # in "foo" # - # source://prism//lib/prism/pattern.rb#209 + # source://prism//lib/prism/pattern.rb#221 def compile_string_node(node); end # in :+ # in :foo # - # source://prism//lib/prism/pattern.rb#217 + # source://prism//lib/prism/pattern.rb#229 def compile_symbol_node(node); end end @@ -22400,104 +25906,130 @@ end # foo in ^(bar) # ^^^^^^ # -# source://prism//lib/prism/node.rb#14964 +# source://prism//lib/prism/node.rb#15743 class Prism::PinnedExpressionNode < ::Prism::Node - # def initialize: (Node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, Location location) -> void + # def initialize: (Prism::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 + # source://prism//lib/prism/node.rb#15745 + sig do + params( + source: Prism::Source, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, expression, operator_loc, lparen_loc, rparen_loc, location); 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#15868 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14977 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15756 + 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#14982 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15761 + 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#14992 + # source://prism//lib/prism/node.rb#15771 + 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#14987 + # source://prism//lib/prism/node.rb#15766 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> PinnedExpressionNode + # def copy: (?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location, ?location: Location) -> PinnedExpressionNode # - # source://prism//lib/prism/node.rb#14997 - sig { params(params: T.untyped).returns(Prism::PinnedExpressionNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15776 + sig do + params( + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end + def copy(expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#15761 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::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 + # source://prism//lib/prism/node.rb#15784 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader expression: Node + # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#15017 + # source://prism//lib/prism/node.rb#15789 sig { returns(Prism::Node) } def expression; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15054 + # source://prism//lib/prism/node.rb#15828 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def lparen: () -> String # - # source://prism//lib/prism/node.rb#15044 + # source://prism//lib/prism/node.rb#15818 sig { returns(String) } def lparen; end # attr_reader lparen_loc: Location # - # source://prism//lib/prism/node.rb#15026 + # source://prism//lib/prism/node.rb#15799 sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15039 + # source://prism//lib/prism/node.rb#15813 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#15020 + # source://prism//lib/prism/node.rb#15792 sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # - # source://prism//lib/prism/node.rb#15049 + # source://prism//lib/prism/node.rb#15823 sig { returns(String) } def rparen; end # attr_reader rparen_loc: Location # - # source://prism//lib/prism/node.rb#15032 + # source://prism//lib/prism/node.rb#15806 sig { returns(Prism::Location) } def rparen_loc; end @@ -22516,7 +26048,8 @@ class Prism::PinnedExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15078 + # source://prism//lib/prism/node.rb#15852 + sig { override.returns(Symbol) } def type; end class << self @@ -22527,7 +26060,7 @@ class Prism::PinnedExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15088 + # source://prism//lib/prism/node.rb#15862 def type; end end end @@ -22537,74 +26070,96 @@ end # foo in ^bar # ^^^^ # -# source://prism//lib/prism/node.rb#15097 +# source://prism//lib/prism/node.rb#15881 class Prism::PinnedVariableNode < ::Prism::Node - # def initialize: (Node variable, Location operator_loc, Location location) -> void + # def initialize: (Prism::node variable, Location operator_loc, Location location) -> void # # @return [PinnedVariableNode] a new instance of PinnedVariableNode # - # source://prism//lib/prism/node.rb#15099 + # source://prism//lib/prism/node.rb#15883 + sig do + params( + source: Prism::Source, + variable: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, variable, operator_loc, location); 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#15978 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15108 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#15892 + 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#15113 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#15897 + 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#15123 + # source://prism//lib/prism/node.rb#15907 + 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#15118 + # source://prism//lib/prism/node.rb#15902 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> PinnedVariableNode + # def copy: (?variable: Prism::node, ?operator_loc: Location, ?location: Location) -> PinnedVariableNode # - # source://prism//lib/prism/node.rb#15128 - sig { params(params: T.untyped).returns(Prism::PinnedVariableNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#15912 + sig do + params( + variable: Prism::Node, + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PinnedVariableNode) + end + def copy(variable: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#15897 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { variable: Node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { variable: Prism::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 + # source://prism//lib/prism/node.rb#15920 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15161 + # source://prism//lib/prism/node.rb#15940 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15156 + # source://prism//lib/prism/node.rb#15935 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#15149 + # source://prism//lib/prism/node.rb#15928 sig { returns(Prism::Location) } def operator_loc; end @@ -22623,12 +26178,13 @@ class Prism::PinnedVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15183 + # source://prism//lib/prism/node.rb#15962 + sig { override.returns(Symbol) } def type; end - # attr_reader variable: Node + # attr_reader variable: Prism::node # - # source://prism//lib/prism/node.rb#15146 + # source://prism//lib/prism/node.rb#15925 sig { returns(Prism::Node) } def variable; end @@ -22640,7 +26196,7 @@ class Prism::PinnedVariableNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15193 + # source://prism//lib/prism/node.rb#15972 def type; end end end @@ -22650,104 +26206,130 @@ end # END { foo } # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15202 +# source://prism//lib/prism/node.rb#15989 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 + # source://prism//lib/prism/node.rb#15991 + sig do + params( + source: Prism::Source, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); 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#16120 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15215 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16002 + 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#15220 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16007 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15289 + # source://prism//lib/prism/node.rb#16071 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15272 + # source://prism//lib/prism/node.rb#16054 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15232 + # source://prism//lib/prism/node.rb#16019 + 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#15225 + # source://prism//lib/prism/node.rb#16012 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> PostExecutionNode + # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PostExecutionNode # - # source://prism//lib/prism/node.rb#15237 - sig { params(params: T.untyped).returns(Prism::PostExecutionNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16024 + sig do + params( + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PostExecutionNode) + end + def copy(statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#16007 + sig { override.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 + # source://prism//lib/prism/node.rb#16032 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15294 + # source://prism//lib/prism/node.rb#16076 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15279 + # source://prism//lib/prism/node.rb#16061 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15260 + # source://prism//lib/prism/node.rb#16040 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15284 + # source://prism//lib/prism/node.rb#16066 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15266 + # source://prism//lib/prism/node.rb#16047 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#15257 + # source://prism//lib/prism/node.rb#16037 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -22766,7 +26348,8 @@ class Prism::PostExecutionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15322 + # source://prism//lib/prism/node.rb#16104 + sig { override.returns(Symbol) } def type; end class << self @@ -22777,7 +26360,7 @@ class Prism::PostExecutionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15332 + # source://prism//lib/prism/node.rb#16114 def type; end end end @@ -22787,104 +26370,130 @@ end # BEGIN { foo } # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15341 +# source://prism//lib/prism/node.rb#16133 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 + # source://prism//lib/prism/node.rb#16135 + sig do + params( + source: Prism::Source, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); 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#16264 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15354 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16146 + 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#15359 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16151 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15428 + # source://prism//lib/prism/node.rb#16215 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15411 + # source://prism//lib/prism/node.rb#16198 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15371 + # source://prism//lib/prism/node.rb#16163 + 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#15364 + # source://prism//lib/prism/node.rb#16156 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> PreExecutionNode + # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PreExecutionNode # - # source://prism//lib/prism/node.rb#15376 - sig { params(params: T.untyped).returns(Prism::PreExecutionNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16168 + sig do + params( + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::PreExecutionNode) + end + def copy(statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#16151 + sig { override.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 + # source://prism//lib/prism/node.rb#16176 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15433 + # source://prism//lib/prism/node.rb#16220 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15418 + # source://prism//lib/prism/node.rb#16205 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15399 + # source://prism//lib/prism/node.rb#16184 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15423 + # source://prism//lib/prism/node.rb#16210 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15405 + # source://prism//lib/prism/node.rb#16191 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#15396 + # source://prism//lib/prism/node.rb#16181 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -22903,7 +26512,8 @@ class Prism::PreExecutionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15461 + # source://prism//lib/prism/node.rb#16248 + sig { override.returns(Symbol) } def type; end class << self @@ -22914,81 +26524,103 @@ class Prism::PreExecutionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15471 + # source://prism//lib/prism/node.rb#16258 def type; end end end # The top level node of any parse tree. # -# source://prism//lib/prism/node.rb#15477 +# source://prism//lib/prism/node.rb#16274 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 + # source://prism//lib/prism/node.rb#16276 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + statements: Prism::StatementsNode, + location: Prism::Location + ).void + end def initialize(source, locals, statements, location); 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#16362 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15488 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16285 + 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#15493 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16290 + 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#15503 + # source://prism//lib/prism/node.rb#16300 + 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#15498 + # source://prism//lib/prism/node.rb#16295 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ProgramNode + # def copy: (?locals: Array[Symbol], ?statements: StatementsNode, ?location: Location) -> ProgramNode # - # source://prism//lib/prism/node.rb#15508 - sig { params(params: T.untyped).returns(Prism::ProgramNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16305 + sig do + params( + locals: T::Array[Symbol], + statements: Prism::StatementsNode, + location: Prism::Location + ).returns(Prism::ProgramNode) + end + def copy(locals: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#16290 + sig { override.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 + # source://prism//lib/prism/node.rb#16313 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15533 + # source://prism//lib/prism/node.rb#16324 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#15526 + # source://prism//lib/prism/node.rb#16318 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader statements: StatementsNode # - # source://prism//lib/prism/node.rb#15529 + # source://prism//lib/prism/node.rb#16321 sig { returns(Prism::StatementsNode) } def statements; end @@ -23007,7 +26639,8 @@ class Prism::ProgramNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15555 + # source://prism//lib/prism/node.rb#16346 + sig { override.returns(Symbol) } def type; end class << self @@ -23018,19 +26651,19 @@ class Prism::ProgramNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15565 + # source://prism//lib/prism/node.rb#16356 def type; end end end # Flags for range and flip-flop nodes. # -# source://prism//lib/prism/node.rb#19310 +# source://prism//lib/prism/node.rb#20415 module Prism::RangeFlags; end # ... operator # -# source://prism//lib/prism/node.rb#19312 +# source://prism//lib/prism/node.rb#20417 Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # Represents the use of the `..` or `...` operators. @@ -23041,71 +26674,97 @@ Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # c if a =~ /left/ ... b =~ /right/ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15577 +# source://prism//lib/prism/node.rb#16377 class Prism::RangeNode < ::Prism::Node - # def initialize: (Integer flags, Node? left, Node? right, Location operator_loc, Location location) -> void + # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void # # @return [RangeNode] a new instance of RangeNode # - # source://prism//lib/prism/node.rb#15579 + # source://prism//lib/prism/node.rb#16379 + sig do + params( + source: Prism::Source, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, left, right, operator_loc, location); 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#16516 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15590 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16390 + 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#15595 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16395 + 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#15608 + # source://prism//lib/prism/node.rb#16408 + 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#15600 + # source://prism//lib/prism/node.rb#16400 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RangeNode + # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> RangeNode # - # source://prism//lib/prism/node.rb#15613 - sig { params(params: T.untyped).returns(Prism::RangeNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16413 + sig do + params( + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::RangeNode) + end + def copy(flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#16395 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::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 + # source://prism//lib/prism/node.rb#16421 + 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#15663 + # source://prism//lib/prism/node.rb#16456 sig { returns(T::Boolean) } def exclude_end?; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15673 + # source://prism//lib/prism/node.rb#16466 + sig { params(inspector: T.untyped).returns(String) } 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). @@ -23116,19 +26775,19 @@ class Prism::RangeNode < ::Prism::Node # hello...goodbye # ^^^^^ # - # source://prism//lib/prism/node.rb#15643 + # source://prism//lib/prism/node.rb#16436 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15668 + # source://prism//lib/prism/node.rb#16461 sig { returns(String) } def operator; end # The location of the `..` or `...` operator. # - # source://prism//lib/prism/node.rb#15656 + # source://prism//lib/prism/node.rb#16449 sig { returns(Prism::Location) } def operator_loc; end @@ -23141,7 +26800,7 @@ class Prism::RangeNode < ::Prism::Node # ^^^ # If neither right-hand or left-hand side was included, this will be a MissingNode. # - # source://prism//lib/prism/node.rb#15653 + # source://prism//lib/prism/node.rb#16446 sig { returns(T.nilable(Prism::Node)) } def right; end @@ -23160,14 +26819,15 @@ class Prism::RangeNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15707 + # source://prism//lib/prism/node.rb#16500 + sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#15633 + # source://prism//lib/prism/node.rb#16426 sig { returns(Integer) } def flags; end @@ -23179,7 +26839,7 @@ class Prism::RangeNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15717 + # source://prism//lib/prism/node.rb#16510 def type; end end end @@ -23189,68 +26849,77 @@ end # 1.0r # ^^^^ # -# source://prism//lib/prism/node.rb#15726 +# source://prism//lib/prism/node.rb#16529 class Prism::RationalNode < ::Prism::Node - # def initialize: (Node numeric, Location location) -> void + # def initialize: (Prism::node numeric, Location location) -> void # # @return [RationalNode] a new instance of RationalNode # - # source://prism//lib/prism/node.rb#15728 + # source://prism//lib/prism/node.rb#16531 + sig { params(source: Prism::Source, numeric: Prism::Node, location: Prism::Location).void } def initialize(source, numeric, location); 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#16612 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15736 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16539 + 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#15741 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16544 + 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#15751 + # source://prism//lib/prism/node.rb#16554 + 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#15746 + # source://prism//lib/prism/node.rb#16549 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RationalNode + # def copy: (?numeric: Prism::node, ?location: Location) -> RationalNode # - # source://prism//lib/prism/node.rb#15756 - sig { params(params: T.untyped).returns(Prism::RationalNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16559 + sig { params(numeric: Prism::Node, location: Prism::Location).returns(Prism::RationalNode) } + def copy(numeric: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#16544 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Prism::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 + # source://prism//lib/prism/node.rb#16567 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15777 + # source://prism//lib/prism/node.rb#16575 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end - # attr_reader numeric: Node + # attr_reader numeric: Prism::node # - # source://prism//lib/prism/node.rb#15773 + # source://prism//lib/prism/node.rb#16572 sig { returns(Prism::Node) } def numeric; end @@ -23269,12 +26938,14 @@ class Prism::RationalNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15798 + # source://prism//lib/prism/node.rb#16596 + sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Rational. # - # source://prism//lib/prism/node_ext.rb#83 + # source://prism//lib/prism/node_ext.rb#94 + sig { returns(Rational) } def value; end class << self @@ -23285,7 +26956,7 @@ class Prism::RationalNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15808 + # source://prism//lib/prism/node.rb#16606 def type; end end end @@ -23295,63 +26966,72 @@ end # redo # ^^^^ # -# source://prism//lib/prism/node.rb#15817 +# source://prism//lib/prism/node.rb#16622 class Prism::RedoNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [RedoNode] a new instance of RedoNode # - # source://prism//lib/prism/node.rb#15819 + # source://prism//lib/prism/node.rb#16624 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); 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#16699 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15826 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16631 + 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#15831 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16636 + 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#15841 + # source://prism//lib/prism/node.rb#16646 + 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#15836 + # source://prism//lib/prism/node.rb#16641 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RedoNode + # def copy: (?location: Location) -> RedoNode # - # source://prism//lib/prism/node.rb#15846 - sig { params(params: T.untyped).returns(Prism::RedoNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16651 + sig { params(location: Prism::Location).returns(Prism::RedoNode) } + def copy(location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#16636 + sig { override.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 + # source://prism//lib/prism/node.rb#16659 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#15863 + # source://prism//lib/prism/node.rb#16664 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -23369,7 +27049,8 @@ class Prism::RedoNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#15882 + # source://prism//lib/prism/node.rb#16683 + sig { override.returns(Symbol) } def type; end class << self @@ -23380,69 +27061,199 @@ class Prism::RedoNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#15892 + # source://prism//lib/prism/node.rb#16693 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#19316 +# source://prism//lib/prism/node.rb#20421 module Prism::RegularExpressionFlags; end # n - forces the ASCII-8BIT encoding # -# source://prism//lib/prism/node.rb#19333 +# source://prism//lib/prism/node.rb#20438 Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) # e - forces the EUC-JP encoding # -# source://prism//lib/prism/node.rb#19330 +# source://prism//lib/prism/node.rb#20435 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 +# source://prism//lib/prism/node.rb#20426 Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19345 +# source://prism//lib/prism/node.rb#20450 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 +# source://prism//lib/prism/node.rb#20453 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 +# source://prism//lib/prism/node.rb#20447 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 +# source://prism//lib/prism/node.rb#20423 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 +# source://prism//lib/prism/node.rb#20429 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 +# source://prism//lib/prism/node.rb#20432 Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) # u - forces the UTF-8 encoding # -# source://prism//lib/prism/node.rb#19339 +# source://prism//lib/prism/node.rb#20444 Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) # s - forces the Windows-31J encoding # -# source://prism//lib/prism/node.rb#19336 +# source://prism//lib/prism/node.rb#20441 Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # Represents a regular expression literal with no interpolation. @@ -23450,7 +27261,7 @@ Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # /foo/i # ^^^^^^ # -# source://prism//lib/prism/node.rb#15901 +# source://prism//lib/prism/node.rb#16708 class Prism::RegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -23458,91 +27269,115 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [RegularExpressionNode] a new instance of RegularExpressionNode # - # source://prism//lib/prism/node.rb#15903 + # source://prism//lib/prism/node.rb#16710 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); 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#16894 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15915 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16722 + 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#16007 + # source://prism//lib/prism/node.rb#16808 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)]) } + # source://prism//lib/prism/node.rb#16727 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#16047 + # source://prism//lib/prism/node.rb#16848 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15972 + # source://prism//lib/prism/node.rb#16773 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15930 + # source://prism//lib/prism/node.rb#16737 + 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#15925 + # source://prism//lib/prism/node.rb#16732 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#16042 + # source://prism//lib/prism/node.rb#16843 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#15966 + # source://prism//lib/prism/node.rb#16766 sig { returns(Prism::Location) } def content_loc; end - # def copy: (**params) -> RegularExpressionNode + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> RegularExpressionNode # - # source://prism//lib/prism/node.rb#15935 - sig { params(params: T.untyped).returns(Prism::RegularExpressionNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16742 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).returns(Prism::RegularExpressionNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#16727 + sig { override.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 + # source://prism//lib/prism/node.rb#16750 + 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#16002 + # source://prism//lib/prism/node.rb#16803 sig { returns(T::Boolean) } def euc_jp?; end @@ -23550,15 +27385,18 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15987 + # source://prism//lib/prism/node.rb#16788 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#16027 + # source://prism//lib/prism/node.rb#16828 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -23566,7 +27404,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16032 + # source://prism//lib/prism/node.rb#16833 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -23574,7 +27412,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16022 + # source://prism//lib/prism/node.rb#16823 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -23582,20 +27420,21 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15982 + # source://prism//lib/prism/node.rb#16783 sig { returns(T::Boolean) } def ignore_case?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16052 + # source://prism//lib/prism/node.rb#16853 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15992 + # source://prism//lib/prism/node.rb#16793 sig { returns(T::Boolean) } def multi_line?; end @@ -23603,22 +27442,25 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15997 + # source://prism//lib/prism/node.rb#16798 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#16037 + # source://prism//lib/prism/node.rb#16838 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15960 + # source://prism//lib/prism/node.rb#16759 sig { returns(Prism::Location) } def opening_loc; end + sig { returns(Integer) } + def options; 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 @@ -23634,12 +27476,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16077 + # source://prism//lib/prism/node.rb#16878 + sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#15978 + # source://prism//lib/prism/node.rb#16780 sig { returns(String) } def unescaped; end @@ -23647,7 +27490,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16017 + # source://prism//lib/prism/node.rb#16818 sig { returns(T::Boolean) } def utf_8?; end @@ -23655,15 +27498,15 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16012 + # source://prism//lib/prism/node.rb#16813 sig { returns(T::Boolean) } def windows_31j?; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#15956 + # source://prism//lib/prism/node.rb#16755 sig { returns(Integer) } def flags; end @@ -23675,7 +27518,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16087 + # source://prism//lib/prism/node.rb#16888 def type; end end end @@ -23695,74 +27538,98 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#16097 +# source://prism//lib/prism/node.rb#16909 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 + # source://prism//lib/prism/node.rb#16911 + sig do + params( + source: Prism::Source, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, name, name_loc, location); 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#17012 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16109 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#16921 + 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#16114 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#16926 + 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#16124 + # source://prism//lib/prism/node.rb#16936 + 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#16119 + # source://prism//lib/prism/node.rb#16931 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RequiredKeywordParameterNode + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?location: Location) -> RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#16129 - sig { params(params: T.untyped).returns(Prism::RequiredKeywordParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#16941 + sig do + params( + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::RequiredKeywordParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#16926 + sig { override.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 + # source://prism//lib/prism/node.rb#16949 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16167 + # source://prism//lib/prism/node.rb#16973 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#16152 + # source://prism//lib/prism/node.rb#16958 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#16155 + # source://prism//lib/prism/node.rb#16961 sig { returns(Prism::Location) } def name_loc; end @@ -23770,7 +27637,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16162 + # source://prism//lib/prism/node.rb#16968 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -23789,14 +27656,15 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16190 + # source://prism//lib/prism/node.rb#16996 + sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16148 + # source://prism//lib/prism/node.rb#16954 sig { returns(Integer) } def flags; end @@ -23808,7 +27676,7 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16200 + # source://prism//lib/prism/node.rb#17006 def type; end end end @@ -23819,68 +27687,77 @@ end # ^ # end # -# source://prism//lib/prism/node.rb#16210 +# source://prism//lib/prism/node.rb#17025 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 + # source://prism//lib/prism/node.rb#17027 + sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } def initialize(source, flags, name, location); 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#17119 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16221 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17036 + 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#16226 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17041 + 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#16236 + # source://prism//lib/prism/node.rb#17051 + 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#16231 + # source://prism//lib/prism/node.rb#17046 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RequiredParameterNode + # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> RequiredParameterNode # - # source://prism//lib/prism/node.rb#16241 - sig { params(params: T.untyped).returns(Prism::RequiredParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17056 + sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::RequiredParameterNode) } + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#17041 + sig { override.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 + # source://prism//lib/prism/node.rb#17064 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16272 + # source://prism//lib/prism/node.rb#17081 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#16263 + # source://prism//lib/prism/node.rb#17073 sig { returns(Symbol) } def name; end @@ -23888,7 +27765,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16267 + # source://prism//lib/prism/node.rb#17076 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -23907,14 +27784,15 @@ class Prism::RequiredParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16294 + # source://prism//lib/prism/node.rb#17103 + sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16259 + # source://prism//lib/prism/node.rb#17069 sig { returns(Integer) } def flags; end @@ -23926,7 +27804,7 @@ class Prism::RequiredParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16304 + # source://prism//lib/prism/node.rb#17113 def type; end end end @@ -23936,90 +27814,114 @@ end # foo rescue nil # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16313 +# source://prism//lib/prism/node.rb#17130 class Prism::RescueModifierNode < ::Prism::Node - # def initialize: (Node expression, Location keyword_loc, Node rescue_expression, Location location) -> void + # def initialize: (Prism::node expression, Location keyword_loc, Prism::node rescue_expression, Location location) -> void # # @return [RescueModifierNode] a new instance of RescueModifierNode # - # source://prism//lib/prism/node.rb#16315 + # source://prism//lib/prism/node.rb#17132 + sig do + params( + source: Prism::Source, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node, + location: Prism::Location + ).void + end def initialize(source, expression, keyword_loc, rescue_expression, location); 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#17237 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16325 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17142 + 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#16334 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17151 + 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#16344 + # source://prism//lib/prism/node.rb#17161 + 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#16339 + # source://prism//lib/prism/node.rb#17156 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RescueModifierNode + # def copy: (?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node, ?location: Location) -> RescueModifierNode # - # source://prism//lib/prism/node.rb#16349 - sig { params(params: T.untyped).returns(Prism::RescueModifierNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17166 + sig do + params( + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node, + location: Prism::Location + ).returns(Prism::RescueModifierNode) + end + def copy(expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#17151 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::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 + # source://prism//lib/prism/node.rb#17174 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader expression: Node + # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#16368 + # source://prism//lib/prism/node.rb#17179 sig { returns(Prism::Node) } def expression; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16386 + # source://prism//lib/prism/node.rb#17197 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16381 + # source://prism//lib/prism/node.rb#17192 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16371 + # source://prism//lib/prism/node.rb#17182 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader rescue_expression: Node + # attr_reader rescue_expression: Prism::node # - # source://prism//lib/prism/node.rb#16377 + # source://prism//lib/prism/node.rb#17189 sig { returns(Prism::Node) } def rescue_expression; end - # source://prism//lib/prism/node.rb#16329 + # source://prism//lib/prism/node.rb#17146 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -24037,7 +27939,8 @@ class Prism::RescueModifierNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16410 + # source://prism//lib/prism/node.rb#17221 + sig { override.returns(Symbol) } def type; end class << self @@ -24048,7 +27951,7 @@ class Prism::RescueModifierNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16420 + # source://prism//lib/prism/node.rb#17231 def type; end end end @@ -24063,110 +27966,140 @@ end # # `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. # -# source://prism//lib/prism/node.rb#16434 +# source://prism//lib/prism/node.rb#17254 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 + # def initialize: (Location keyword_loc, Array[Prism::node] exceptions, Location? operator_loc, Prism::node? reference, StatementsNode? statements, RescueNode? consequent, Location location) -> void # # @return [RescueNode] a new instance of RescueNode # - # source://prism//lib/prism/node.rb#16436 + # source://prism//lib/prism/node.rb#17256 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(Prism::Node), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::RescueNode), + location: Prism::Location + ).void + end def initialize(source, keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); 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#17405 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16449 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17269 + 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#16454 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17274 + 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#16469 + # source://prism//lib/prism/node.rb#17289 + 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#16459 + # source://prism//lib/prism/node.rb#17279 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader consequent: RescueNode? # - # source://prism//lib/prism/node.rb#16523 + # source://prism//lib/prism/node.rb#17336 sig { returns(T.nilable(Prism::RescueNode)) } def consequent; end - # def copy: (**params) -> RescueNode + # def copy: (?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: Prism::node?, ?statements: StatementsNode?, ?consequent: RescueNode?, ?location: Location) -> RescueNode # - # source://prism//lib/prism/node.rb#16474 - sig { params(params: T.untyped).returns(Prism::RescueNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17294 + sig do + params( + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(Prism::Node), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::RescueNode), + location: Prism::Location + ).returns(Prism::RescueNode) + end + def copy(keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#17274 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: Prism::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 + # source://prism//lib/prism/node.rb#17302 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader exceptions: Array[Node] + # attr_reader exceptions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#16502 + # source://prism//lib/prism/node.rb#17314 sig { returns(T::Array[Prism::Node]) } def exceptions; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16537 + # source://prism//lib/prism/node.rb#17349 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16527 + # source://prism//lib/prism/node.rb#17339 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16496 + # source://prism//lib/prism/node.rb#17307 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#16532 + # source://prism//lib/prism/node.rb#17344 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#16505 + # source://prism//lib/prism/node.rb#17317 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end - # attr_reader reference: Node? + # attr_reader reference: Prism::node? # - # source://prism//lib/prism/node.rb#16517 + # source://prism//lib/prism/node.rb#17330 sig { returns(T.nilable(Prism::Node)) } def reference; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#16520 + # source://prism//lib/prism/node.rb#17333 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -24185,7 +28118,8 @@ class Prism::RescueNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16577 + # source://prism//lib/prism/node.rb#17389 + sig { override.returns(Symbol) } def type; end class << self @@ -24196,7 +28130,7 @@ class Prism::RescueNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16587 + # source://prism//lib/prism/node.rb#17399 def type; end end end @@ -24207,86 +28141,112 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#16597 +# source://prism//lib/prism/node.rb#17422 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 + # source://prism//lib/prism/node.rb#17424 + sig do + params( + source: Prism::Source, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, flags, name, name_loc, operator_loc, location); 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#17549 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16610 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17435 + 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#16615 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17440 + 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#16625 + # source://prism//lib/prism/node.rb#17450 + 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#16620 + # source://prism//lib/prism/node.rb#17445 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RestParameterNode + # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> RestParameterNode # - # source://prism//lib/prism/node.rb#16630 - sig { params(params: T.untyped).returns(Prism::RestParameterNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17455 + sig do + params( + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::RestParameterNode) + end + def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#17440 + sig { override.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 + # source://prism//lib/prism/node.rb#17463 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16686 + # source://prism//lib/prism/node.rb#17505 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#16654 + # source://prism//lib/prism/node.rb#17472 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#16657 + # source://prism//lib/prism/node.rb#17475 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#16681 + # source://prism//lib/prism/node.rb#17500 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#16669 + # source://prism//lib/prism/node.rb#17488 sig { returns(Prism::Location) } def operator_loc; end @@ -24294,7 +28254,7 @@ class Prism::RestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16676 + # source://prism//lib/prism/node.rb#17495 sig { returns(T::Boolean) } def repeated_parameter?; end @@ -24313,14 +28273,15 @@ class Prism::RestParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16714 + # source://prism//lib/prism/node.rb#17533 + sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#16650 + # source://prism//lib/prism/node.rb#17468 sig { returns(Integer) } def flags; end @@ -24332,73 +28293,174 @@ class Prism::RestParameterNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16724 + # source://prism//lib/prism/node.rb#17543 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#443 +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#465 + 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 + + # The list of comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#445 + 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#453 + 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#475 + 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#480 + sig { returns(Encoding) } + def encoding; end + + # The list of errors that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#456 + 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#492 + sig { returns(T::Boolean) } + def failure?; end + + # The list of magic comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#448 + 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#462 + 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#486 + sig { returns(T::Boolean) } + def success?; end + + # The list of warnings that were generated during parsing. + # + # source://prism//lib/prism/parse_result.rb#459 + sig { returns(T::Array[Prism::ParseWarning]) } + def warnings; end +end + # Represents the use of the `retry` keyword. # # retry # ^^^^^ # -# source://prism//lib/prism/node.rb#16733 +# source://prism//lib/prism/node.rb#17562 class Prism::RetryNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [RetryNode] a new instance of RetryNode # - # source://prism//lib/prism/node.rb#16735 + # source://prism//lib/prism/node.rb#17564 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); 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#17639 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16742 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17571 + 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#16747 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17576 + 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#16757 + # source://prism//lib/prism/node.rb#17586 + 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#16752 + # source://prism//lib/prism/node.rb#17581 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> RetryNode + # def copy: (?location: Location) -> RetryNode # - # source://prism//lib/prism/node.rb#16762 - sig { params(params: T.untyped).returns(Prism::RetryNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17591 + sig { params(location: Prism::Location).returns(Prism::RetryNode) } + def copy(location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#17576 + sig { override.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 + # source://prism//lib/prism/node.rb#17599 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16779 + # source://prism//lib/prism/node.rb#17604 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -24416,7 +28478,8 @@ class Prism::RetryNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16798 + # source://prism//lib/prism/node.rb#17623 + sig { override.returns(Symbol) } def type; end class << self @@ -24427,7 +28490,7 @@ class Prism::RetryNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16808 + # source://prism//lib/prism/node.rb#17633 def type; end end end @@ -24437,80 +28500,102 @@ end # return 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#16817 +# source://prism//lib/prism/node.rb#17648 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 + # source://prism//lib/prism/node.rb#17650 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + location: Prism::Location + ).void + end def initialize(source, keyword_loc, arguments, location); 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#17751 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16828 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17659 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#16874 + # source://prism//lib/prism/node.rb#17701 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)]) } + # source://prism//lib/prism/node.rb#17664 + 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#16845 + # source://prism//lib/prism/node.rb#17676 + 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#16838 + # source://prism//lib/prism/node.rb#17669 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> ReturnNode + # def copy: (?keyword_loc: Location, ?arguments: ArgumentsNode?, ?location: Location) -> ReturnNode # - # source://prism//lib/prism/node.rb#16850 - sig { params(params: T.untyped).returns(Prism::ReturnNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17681 + sig do + params( + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + location: Prism::Location + ).returns(Prism::ReturnNode) + end + def copy(keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#17664 + sig { override.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 + # source://prism//lib/prism/node.rb#17689 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16883 + # source://prism//lib/prism/node.rb#17709 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16878 + # source://prism//lib/prism/node.rb#17704 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16868 + # source://prism//lib/prism/node.rb#17694 sig { returns(Prism::Location) } def keyword_loc; end @@ -24529,7 +28614,8 @@ class Prism::ReturnNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16909 + # source://prism//lib/prism/node.rb#17735 + sig { override.returns(Symbol) } def type; end class << self @@ -24540,7 +28626,7 @@ class Prism::ReturnNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#16919 + # source://prism//lib/prism/node.rb#17745 def type; end end end @@ -24550,63 +28636,72 @@ end # self # ^^^^ # -# source://prism//lib/prism/node.rb#16928 +# source://prism//lib/prism/node.rb#17762 class Prism::SelfNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SelfNode] a new instance of SelfNode # - # source://prism//lib/prism/node.rb#16930 + # source://prism//lib/prism/node.rb#17764 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); 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#17839 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16937 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#17771 + 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#16942 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17776 + 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#16952 + # source://prism//lib/prism/node.rb#17786 + 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#16947 + # source://prism//lib/prism/node.rb#17781 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SelfNode + # def copy: (?location: Location) -> SelfNode # - # source://prism//lib/prism/node.rb#16957 - sig { params(params: T.untyped).returns(Prism::SelfNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17791 + sig { params(location: Prism::Location).returns(Prism::SelfNode) } + def copy(location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#17776 + sig { override.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 + # source://prism//lib/prism/node.rb#17799 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#16974 + # source://prism//lib/prism/node.rb#17804 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -24624,7 +28719,8 @@ class Prism::SelfNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#16993 + # source://prism//lib/prism/node.rb#17823 + sig { override.returns(Symbol) } def type; end class << self @@ -24635,292 +28731,520 @@ class Prism::SelfNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17003 + # source://prism//lib/prism/node.rb#17833 def type; end end end # A module responsible for deserializing parse results. # -# source://prism//lib/prism/serialize.rb#23 +# 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#37 + # 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#49 + # source://prism//lib/prism/serialize.rb#40 def load_tokens(source, serialized); end end end -# source://prism//lib/prism/serialize.rb#53 +# source://prism//lib/prism/serialize.rb#44 class Prism::Serialize::Loader # @return [Loader] a new instance of Loader # - # source://prism//lib/prism/serialize.rb#58 + # source://prism//lib/prism/serialize.rb#80 def initialize(source, serialized); end # Returns the value of attribute constant_pool. # - # source://prism//lib/prism/serialize.rb#55 + # source://prism//lib/prism/serialize.rb#77 def constant_pool; end # Returns the value of attribute constant_pool_offset. # - # source://prism//lib/prism/serialize.rb#55 + # source://prism//lib/prism/serialize.rb#77 def constant_pool_offset; end # Returns the value of attribute encoding. # - # source://prism//lib/prism/serialize.rb#54 + # source://prism//lib/prism/serialize.rb#76 def encoding; end # Returns the value of attribute input. # - # source://prism//lib/prism/serialize.rb#54 + # source://prism//lib/prism/serialize.rb#76 def input; end # Returns the value of attribute io. # - # source://prism//lib/prism/serialize.rb#54 + # source://prism//lib/prism/serialize.rb#76 def io; end - # source://prism//lib/prism/serialize.rb#96 + # source://prism//lib/prism/serialize.rb#118 def load_comments; end - # source://prism//lib/prism/serialize.rb#82 + # source://prism//lib/prism/serialize.rb#104 def load_encoding; end - # source://prism//lib/prism/serialize.rb#73 + # source://prism//lib/prism/serialize.rb#95 def load_header; end - # source://prism//lib/prism/serialize.rb#92 + # source://prism//lib/prism/serialize.rb#114 def load_line_offsets; end - # source://prism//lib/prism/serialize.rb#106 + # source://prism//lib/prism/serialize.rb#416 def load_metadata; end - # source://prism//lib/prism/serialize.rb#140 + # source://prism//lib/prism/serialize.rb#450 def load_nodes; end - # source://prism//lib/prism/serialize.rb#154 + # source://prism//lib/prism/serialize.rb#464 def load_result; end - # source://prism//lib/prism/serialize.rb#88 + # source://prism//lib/prism/serialize.rb#110 def load_start_line; end - # source://prism//lib/prism/serialize.rb#115 + # source://prism//lib/prism/serialize.rb#425 def load_tokens; end - # source://prism//lib/prism/serialize.rb#128 + # source://prism//lib/prism/serialize.rb#438 def load_tokens_result; end # Returns the value of attribute serialized. # - # source://prism//lib/prism/serialize.rb#54 + # source://prism//lib/prism/serialize.rb#76 def serialized; end # Returns the value of attribute source. # - # source://prism//lib/prism/serialize.rb#55 + # source://prism//lib/prism/serialize.rb#77 def source; end # Returns the value of attribute start_line. # - # source://prism//lib/prism/serialize.rb#56 + # source://prism//lib/prism/serialize.rb#78 def start_line; end private - # source://prism//lib/prism/serialize.rb#217 + # source://prism//lib/prism/serialize.rb#550 def load_constant(index); end - # source://prism//lib/prism/serialize.rb#193 + # source://prism//lib/prism/serialize.rb#503 + def load_double; end + + # source://prism//lib/prism/serialize.rb#518 def load_embedded_string; end - # source://prism//lib/prism/serialize.rb#247 + # source://prism//lib/prism/serialize.rb#580 def load_error_level; end - # source://prism//lib/prism/serialize.rb#209 + # source://prism//lib/prism/serialize.rb#492 + def load_integer; end + + # source://prism//lib/prism/serialize.rb#534 def load_location; end - # source://prism//lib/prism/serialize.rb#274 + # source://prism//lib/prism/serialize.rb#538 + def load_location_object; end + + # source://prism//lib/prism/serialize.rb#609 def load_node; end - # source://prism//lib/prism/serialize.rb#242 + # source://prism//lib/prism/serialize.rb#575 def load_optional_constant; end - # source://prism//lib/prism/serialize.rb#213 + # source://prism//lib/prism/serialize.rb#542 def load_optional_location; end - # source://prism//lib/prism/serialize.rb#186 + # source://prism//lib/prism/serialize.rb#546 + def load_optional_location_object; end + + # source://prism//lib/prism/serialize.rb#511 def load_optional_node; end - # source://prism//lib/prism/serialize.rb#238 + # source://prism//lib/prism/serialize.rb#571 def load_required_constant; end - # source://prism//lib/prism/serialize.rb#182 - def load_serialized_length; end - - # source://prism//lib/prism/serialize.rb#197 + # source://prism//lib/prism/serialize.rb#522 def load_string; end - # source://prism//lib/prism/serialize.rb#177 + # source://prism//lib/prism/serialize.rb#507 + def load_uint32; end + + # source://prism//lib/prism/serialize.rb#487 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 + # source://prism//lib/prism/serialize.rb#473 def load_varuint; end - # source://prism//lib/prism/serialize.rb#260 + # source://prism//lib/prism/serialize.rb#595 def load_warning_level; end end +# source://prism//lib/prism/serialize.rb#127 +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#72 +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#26 +# 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#30 +# 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#34 +# 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#1482 +# source://prism//lib/prism/serialize.rb#1833 Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) -# Represents a singleton class declaration involving the `class` keyword. +# This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified. # -# class << self end -# ^^^^^^^^^^^^^^^^^ +# C = { a: 1 } +# ^^^^^^^^^^^^ # -# 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 +# source://prism//lib/prism/node.rb#17849 +class Prism::ShareableConstantNode < ::Prism::Node + # def initialize: (Integer flags, ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode write, Location location) -> void # - # @return [SingletonClassNode] a new instance of SingletonClassNode + # @return [ShareableConstantNode] a new instance of ShareableConstantNode # - # source://prism//lib/prism/node.rb#17014 - def initialize(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + # source://prism//lib/prism/node.rb#17851 + sig do + params( + source: Prism::Source, + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), + location: Prism::Location + ).void + end + def initialize(source, flags, write, location); end - # def accept: (Visitor visitor) -> void + # 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#17027 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end + # source://prism//lib/prism/node.rb#17954 + def ===(other); end - # attr_reader body: Node? + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17090 - sig { returns(T.nilable(Prism::Node)) } - def body; end + # source://prism//lib/prism/node.rb#17860 + 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#17032 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#17865 + sig { override.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 + # source://prism//lib/prism/node.rb#17875 + 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#17037 + # source://prism//lib/prism/node.rb#17870 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SingletonClassNode + # def copy: (?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, ?location: Location) -> ShareableConstantNode # - # source://prism//lib/prism/node.rb#17050 - sig { params(params: T.untyped).returns(Prism::SingletonClassNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#17880 + sig do + params( + flags: Integer, + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), + location: Prism::Location + ).returns(Prism::ShareableConstantNode) + end + def copy(flags: T.unsafe(nil), write: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#17865 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, 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 + # source://prism//lib/prism/node.rb#17888 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # def end_keyword: () -> String + # def experimental_copy?: () -> bool # - # source://prism//lib/prism/node.rb#17110 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location + # @return [Boolean] # - # source://prism//lib/prism/node.rb#17093 - sig { returns(Prism::Location) } - def end_keyword_loc; end + # source://prism//lib/prism/node.rb#17910 + sig { returns(T::Boolean) } + def experimental_copy?; end - # attr_reader expression: Node + # def experimental_everything?: () -> bool # - # source://prism//lib/prism/node.rb#17087 - sig { returns(Prism::Node) } - def expression; end + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17905 + sig { returns(T::Boolean) } + def experimental_everything?; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17115 + # source://prism//lib/prism/node.rb#17915 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def literal?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17900 + sig { returns(T::Boolean) } + def literal?; 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#17938 + sig { override.returns(Symbol) } + def type; end + + # The constant write that should be modified with the shareability state. + # + # source://prism//lib/prism/node.rb#17897 + 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 + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#17893 + 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#17948 + def type; end + end +end + +# Flags for shareable constant nodes. +# +# source://prism//lib/prism/node.rb#20457 +module Prism::ShareableConstantNodeFlags; end + +# constant writes that should be modified with shareable constant value experimental copy +# +# source://prism//lib/prism/node.rb#20465 +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#20462 +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#20459 +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#17965 +class Prism::SingletonClassNode < ::Prism::Node + # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Prism::node expression, Prism::node? body, Location end_keyword_loc, Location location) -> void + # + # @return [SingletonClassNode] a new instance of SingletonClassNode + # + # source://prism//lib/prism/node.rb#17967 + sig do + params( + source: Prism::Source, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).void + end + def initialize(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); 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#18108 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#17980 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # source://prism//lib/prism/node.rb#18036 + sig { returns(T.nilable(Prism::Node)) } + def body; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17985 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # source://prism//lib/prism/node.rb#18046 + sig { returns(String) } + def class_keyword; end + + # attr_reader class_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18019 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#17998 + 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#17990 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?location: Location) -> SingletonClassNode + # + # source://prism//lib/prism/node.rb#18003 + sig do + params( + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(Prism::Node), + end_keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::SingletonClassNode) + end + def copy(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), location: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#17985 + sig { override.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: Prism::node, body: Prism::node?, end_keyword_loc: Location, location: Location } + # + # source://prism//lib/prism/node.rb#18011 + 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#18056 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18039 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#18033 + sig { returns(Prism::Node) } + def expression; end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#18061 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#17072 + # source://prism//lib/prism/node.rb#18016 sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17105 + # source://prism//lib/prism/node.rb#18051 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17081 + # source://prism//lib/prism/node.rb#18026 sig { returns(Prism::Location) } def operator_loc; end @@ -24939,7 +29263,8 @@ class Prism::SingletonClassNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17146 + # source://prism//lib/prism/node.rb#18092 + sig { override.returns(Symbol) } def type; end class << self @@ -24950,7 +29275,7 @@ class Prism::SingletonClassNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17156 + # source://prism//lib/prism/node.rb#18102 def type; end end end @@ -24966,22 +29291,26 @@ class Prism::Source # @return [Source] a new instance of Source # # source://prism//lib/prism/parse_result.rb#18 + 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#53 + # source://prism//lib/prism/parse_result.rb#59 + 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#48 + # source://prism//lib/prism/parse_result.rb#54 + sig { params(byte_offset: Integer).returns(Integer) } 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 + # source://prism//lib/prism/parse_result.rb#76 + 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 @@ -24991,27 +29320,35 @@ class Prism::Source # 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 + # source://prism//lib/prism/parse_result.rb#69 + 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#43 + # source://prism//lib/prism/parse_result.rb#49 + 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#26 + 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#32 + # source://prism//lib/prism/parse_result.rb#38 + sig { params(byte_offset: Integer).returns(Integer) } 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 + # source://prism//lib/prism/parse_result.rb#44 + sig { params(byte_offset: Integer).returns(Integer) } def line_start(byte_offset); end # The list of newline byte offsets in the source code. @@ -25023,7 +29360,8 @@ class Prism::Source # Perform a byteslice on the source code using the given byte offset and # byte length. # - # source://prism//lib/prism/parse_result.rb#26 + # source://prism//lib/prism/parse_result.rb#32 + sig { params(byte_offset: Integer, length: Integer).returns(String) } def slice(byte_offset, length); end # The source code that this source object represents. @@ -25035,6 +29373,7 @@ class Prism::Source # The line number where this source starts. # # source://prism//lib/prism/parse_result.rb#12 + sig { returns(Integer) } def start_line; end private @@ -25042,7 +29381,7 @@ class Prism::Source # Binary search through the offsets to find the line number for the given # byte offset. # - # source://prism//lib/prism/parse_result.rb#78 + # source://prism//lib/prism/parse_result.rb#84 def find_line(byte_offset); end end @@ -25051,63 +29390,72 @@ end # __ENCODING__ # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17165 +# source://prism//lib/prism/node.rb#18124 class Prism::SourceEncodingNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SourceEncodingNode] a new instance of SourceEncodingNode # - # source://prism//lib/prism/node.rb#17167 + # source://prism//lib/prism/node.rb#18126 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); 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#18201 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17174 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#18133 + 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#17179 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18138 + 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#17189 + # source://prism//lib/prism/node.rb#18148 + 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#17184 + # source://prism//lib/prism/node.rb#18143 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SourceEncodingNode + # def copy: (?location: Location) -> SourceEncodingNode # - # source://prism//lib/prism/node.rb#17194 - sig { params(params: T.untyped).returns(Prism::SourceEncodingNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#18153 + sig { params(location: Prism::Location).returns(Prism::SourceEncodingNode) } + def copy(location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#18138 + sig { override.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 + # source://prism//lib/prism/node.rb#18161 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17211 + # source://prism//lib/prism/node.rb#18166 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -25125,7 +29473,8 @@ class Prism::SourceEncodingNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17230 + # source://prism//lib/prism/node.rb#18185 + sig { override.returns(Symbol) } def type; end class << self @@ -25136,7 +29485,7 @@ class Prism::SourceEncodingNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17240 + # source://prism//lib/prism/node.rb#18195 def type; end end end @@ -25146,71 +29495,112 @@ end # __FILE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17249 +# source://prism//lib/prism/node.rb#18210 class Prism::SourceFileNode < ::Prism::Node - # def initialize: (String filepath, Location location) -> void + # def initialize: (Integer flags, 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 + # source://prism//lib/prism/node.rb#18212 + sig { params(source: Prism::Source, flags: Integer, filepath: String, location: Prism::Location).void } + def initialize(source, flags, filepath, location); 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#18319 + def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17259 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#18221 + 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#17264 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18226 + 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#17274 + # source://prism//lib/prism/node.rb#18236 + 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#17269 + # source://prism//lib/prism/node.rb#18231 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SourceFileNode + # def copy: (?flags: Integer, ?filepath: String, ?location: Location) -> SourceFileNode # - # source://prism//lib/prism/node.rb#17279 - sig { params(params: T.untyped).returns(Prism::SourceFileNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#18241 + sig { params(flags: Integer, filepath: String, location: Prism::Location).returns(Prism::SourceFileNode) } + def copy(flags: T.unsafe(nil), filepath: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#18226 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { filepath: String, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, 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 + # source://prism//lib/prism/node.rb#18249 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader filepath: String + 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#17296 + # source://prism//lib/prism/node.rb#18258 sig { returns(String) } def filepath; end + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18266 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18261 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18271 + sig { returns(T::Boolean) } + def frozen?; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17300 + # source://prism//lib/prism/node.rb#18281 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18276 + sig { returns(T::Boolean) } + def mutable?; 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 @@ -25226,9 +29616,18 @@ class Prism::SourceFileNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17320 + # source://prism//lib/prism/node.rb#18303 + sig { override.returns(Symbol) } def type; end + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#18254 + 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. @@ -25237,7 +29636,7 @@ class Prism::SourceFileNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17330 + # source://prism//lib/prism/node.rb#18313 def type; end end end @@ -25247,63 +29646,72 @@ end # __LINE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17339 +# source://prism//lib/prism/node.rb#18330 class Prism::SourceLineNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [SourceLineNode] a new instance of SourceLineNode # - # source://prism//lib/prism/node.rb#17341 + # source://prism//lib/prism/node.rb#18332 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); 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#18407 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17348 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#18339 + 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#17353 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18344 + 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#17363 + # source://prism//lib/prism/node.rb#18354 + 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#17358 + # source://prism//lib/prism/node.rb#18349 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SourceLineNode + # def copy: (?location: Location) -> SourceLineNode # - # source://prism//lib/prism/node.rb#17368 - sig { params(params: T.untyped).returns(Prism::SourceLineNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#18359 + sig { params(location: Prism::Location).returns(Prism::SourceLineNode) } + def copy(location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#18344 + sig { override.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 + # source://prism//lib/prism/node.rb#18367 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17385 + # source://prism//lib/prism/node.rb#18372 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -25321,7 +29729,8 @@ class Prism::SourceLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17404 + # source://prism//lib/prism/node.rb#18391 + sig { override.returns(Symbol) } def type; end class << self @@ -25332,7 +29741,7 @@ class Prism::SourceLineNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17414 + # source://prism//lib/prism/node.rb#18401 def type; end end end @@ -25342,80 +29751,102 @@ end # [*a] # ^^ # -# source://prism//lib/prism/node.rb#17423 +# source://prism//lib/prism/node.rb#18416 class Prism::SplatNode < ::Prism::Node - # def initialize: (Location operator_loc, Node? expression, Location location) -> void + # def initialize: (Location operator_loc, Prism::node? expression, Location location) -> void # # @return [SplatNode] a new instance of SplatNode # - # source://prism//lib/prism/node.rb#17425 + # source://prism//lib/prism/node.rb#18418 + sig do + params( + source: Prism::Source, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node), + location: Prism::Location + ).void + end def initialize(source, operator_loc, expression, location); 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#18519 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17434 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#18427 + 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#17439 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18432 + 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#17451 + # source://prism//lib/prism/node.rb#18444 + 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#17444 + # source://prism//lib/prism/node.rb#18437 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SplatNode + # def copy: (?operator_loc: Location, ?expression: Prism::node?, ?location: Location) -> SplatNode # - # source://prism//lib/prism/node.rb#17456 - sig { params(params: T.untyped).returns(Prism::SplatNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#18449 + sig do + params( + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::SplatNode) + end + def copy(operator_loc: T.unsafe(nil), expression: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#18432 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Node?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Prism::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 + # source://prism//lib/prism/node.rb#18457 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end - # attr_reader expression: Node? + # attr_reader expression: Prism::node? # - # source://prism//lib/prism/node.rb#17480 + # source://prism//lib/prism/node.rb#18469 sig { returns(T.nilable(Prism::Node)) } def expression; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17489 + # source://prism//lib/prism/node.rb#18477 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17484 + # source://prism//lib/prism/node.rb#18472 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17474 + # source://prism//lib/prism/node.rb#18462 sig { returns(Prism::Location) } def operator_loc; end @@ -25434,7 +29865,8 @@ class Prism::SplatNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17515 + # source://prism//lib/prism/node.rb#18503 + sig { override.returns(Symbol) } def type; end class << self @@ -25445,7 +29877,7 @@ class Prism::SplatNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17525 + # source://prism//lib/prism/node.rb#18513 def type; end end end @@ -25455,69 +29887,78 @@ end # foo; bar; baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17534 +# source://prism//lib/prism/node.rb#18530 class Prism::StatementsNode < ::Prism::Node - # def initialize: (Array[Node] body, Location location) -> void + # def initialize: (Array[Prism::node] body, Location location) -> void # # @return [StatementsNode] a new instance of StatementsNode # - # source://prism//lib/prism/node.rb#17536 + # source://prism//lib/prism/node.rb#18532 + sig { params(source: Prism::Source, body: T::Array[Prism::Node], location: Prism::Location).void } def initialize(source, body, location); 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#18612 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17544 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#18540 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Array[Node] + # attr_reader body: Array[Prism::node] # - # source://prism//lib/prism/node.rb#17581 + # source://prism//lib/prism/node.rb#18573 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)]) } + # source://prism//lib/prism/node.rb#18545 + 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#17559 + # source://prism//lib/prism/node.rb#18555 + 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#17554 + # source://prism//lib/prism/node.rb#18550 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> StatementsNode + # def copy: (?body: Array[Prism::node], ?location: Location) -> StatementsNode # - # source://prism//lib/prism/node.rb#17564 - sig { params(params: T.untyped).returns(Prism::StatementsNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#18560 + sig { params(body: T::Array[Prism::Node], location: Prism::Location).returns(Prism::StatementsNode) } + def copy(body: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#18545 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Node], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Prism::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 + # source://prism//lib/prism/node.rb#18568 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17585 + # source://prism//lib/prism/node.rb#18576 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -25535,7 +29976,8 @@ class Prism::StatementsNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17605 + # source://prism//lib/prism/node.rb#18596 + sig { override.returns(Symbol) } def type; end class << self @@ -25546,31 +29988,32 @@ class Prism::StatementsNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17615 + # source://prism//lib/prism/node.rb#18606 def type; end end end # Flags for string nodes. # -# source://prism//lib/prism/node.rb#19352 +# source://prism//lib/prism/node.rb#20469 module Prism::StringFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19357 +# source://prism//lib/prism/node.rb#20474 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 +# source://prism//lib/prism/node.rb#20471 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 +# source://prism//lib/prism/node.rb#20477 Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) +# source://prism//lib/prism/node.rb#20480 +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" @@ -25582,7 +30025,7 @@ Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) # "foo #{bar} baz" # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#17630 +# source://prism//lib/prism/node.rb#18629 class Prism::StringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -25590,83 +30033,110 @@ class Prism::StringNode < ::Prism::Node # # @return [StringNode] a new instance of StringNode # - # source://prism//lib/prism/node.rb#17632 + # source://prism//lib/prism/node.rb#18631 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); 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#18792 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17644 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#18643 + 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#17649 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18648 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#17748 + # source://prism//lib/prism/node.rb#18746 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#17707 + # source://prism//lib/prism/node.rb#18700 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17659 + # source://prism//lib/prism/node.rb#18658 + 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#17654 + # source://prism//lib/prism/node.rb#18653 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#17743 + # source://prism//lib/prism/node.rb#18741 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#17701 + # source://prism//lib/prism/node.rb#18693 sig { returns(Prism::Location) } def content_loc; end - # def copy: (**params) -> StringNode + # def copy: (?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> StringNode # - # source://prism//lib/prism/node.rb#17664 - sig { params(params: T.untyped).returns(Prism::StringNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#18663 + sig do + params( + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).returns(Prism::StringNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#18648 + sig { override.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 + # source://prism//lib/prism/node.rb#18671 + 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#17728 + # source://prism//lib/prism/node.rb#18721 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -25674,7 +30144,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17723 + # source://prism//lib/prism/node.rb#18716 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -25682,27 +30152,46 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17733 + # source://prism//lib/prism/node.rb#18726 sig { returns(T::Boolean) } def frozen?; end + sig { returns(T::Boolean) } + def heredoc?; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17753 + # source://prism//lib/prism/node.rb#18751 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end + # def mutable?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18731 + sig { returns(T::Boolean) } + def mutable?; end + # def opening: () -> String? # - # source://prism//lib/prism/node.rb#17738 + # source://prism//lib/prism/node.rb#18736 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#17689 + # source://prism//lib/prism/node.rb#18680 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#55 + sig { returns(Prism::InterpolatedStringNode) } + def to_interpolated; 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 @@ -25718,20 +30207,21 @@ class Prism::StringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17778 + # source://prism//lib/prism/node.rb#18776 + sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#17719 + # source://prism//lib/prism/node.rb#18713 sig { returns(String) } def unescaped; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#17685 + # source://prism//lib/prism/node.rb#18676 sig { returns(Integer) } def flags; end @@ -25743,7 +30233,7 @@ class Prism::StringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17788 + # source://prism//lib/prism/node.rb#18786 def type; end end end @@ -25756,110 +30246,138 @@ end # super foo, bar # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17800 +# source://prism//lib/prism/node.rb#18809 class Prism::SuperNode < ::Prism::Node - # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Node? block, Location location) -> void + # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Prism::node? block, Location location) -> void # # @return [SuperNode] a new instance of SuperNode # - # source://prism//lib/prism/node.rb#17802 + # source://prism//lib/prism/node.rb#18811 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).void + end def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, block, location); 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#18963 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17814 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#18823 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#17876 + # source://prism//lib/prism/node.rb#18879 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end - # attr_reader block: Node? + # attr_reader block: Prism::node? # - # source://prism//lib/prism/node.rb#17891 + # source://prism//lib/prism/node.rb#18895 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)]) } + # source://prism//lib/prism/node.rb#18828 + 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#17832 + # source://prism//lib/prism/node.rb#18841 + 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#17824 + # source://prism//lib/prism/node.rb#18833 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SuperNode + # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: Prism::node?, ?location: Location) -> SuperNode # - # source://prism//lib/prism/node.rb#17837 - sig { params(params: T.untyped).returns(Prism::SuperNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#18846 + sig do + params( + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(Prism::Node), + location: Prism::Location + ).returns(Prism::SuperNode) + end + def copy(keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#18828 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Prism::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 + # source://prism//lib/prism/node.rb#18854 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#17910 + # source://prism//lib/prism/node.rb#18913 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17895 + # source://prism//lib/prism/node.rb#18898 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17858 + # source://prism//lib/prism/node.rb#18859 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#17900 + # source://prism//lib/prism/node.rb#18903 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#17864 + # source://prism//lib/prism/node.rb#18866 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#17905 + # source://prism//lib/prism/node.rb#18908 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#17879 + # source://prism//lib/prism/node.rb#18882 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -25878,7 +30396,8 @@ class Prism::SuperNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#17944 + # source://prism//lib/prism/node.rb#18947 + sig { override.returns(Symbol) } def type; end class << self @@ -25889,29 +30408,29 @@ class Prism::SuperNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#17954 + # source://prism//lib/prism/node.rb#18957 def type; end end end # Flags for symbol nodes. # -# source://prism//lib/prism/node.rb#19364 +# source://prism//lib/prism/node.rb#20484 module Prism::SymbolFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19369 +# source://prism//lib/prism/node.rb#20489 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 +# source://prism//lib/prism/node.rb#20492 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 +# source://prism//lib/prism/node.rb#20486 Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents a symbol literal or a symbol contained within a `%i` list. @@ -25922,77 +30441,104 @@ Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # %i[foo] # ^^^ # -# source://prism//lib/prism/node.rb#17966 +# source://prism//lib/prism/node.rb#18980 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 + # source://prism//lib/prism/node.rb#18982 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, value_loc, closing_loc, unescaped, location); 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#19144 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17980 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#18994 + 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#17985 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#18999 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18090 + # source://prism//lib/prism/node.rb#19098 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18049 + # source://prism//lib/prism/node.rb#19057 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17995 + # source://prism//lib/prism/node.rb#19009 + 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#17990 + # source://prism//lib/prism/node.rb#19004 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> SymbolNode + # def copy: (?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> SymbolNode # - # source://prism//lib/prism/node.rb#18000 - sig { params(params: T.untyped).returns(Prism::SymbolNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#19014 + sig do + params( + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + unescaped: String, + location: Prism::Location + ).returns(Prism::SymbolNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#18999 + sig { override.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 + # source://prism//lib/prism/node.rb#19022 + 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#18070 + # source://prism//lib/prism/node.rb#19078 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -26000,7 +30546,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18075 + # source://prism//lib/prism/node.rb#19083 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -26008,24 +30554,25 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18065 + # source://prism//lib/prism/node.rb#19073 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18095 + # source://prism//lib/prism/node.rb#19103 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#18080 + # source://prism//lib/prism/node.rb#19088 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#18025 + # source://prism//lib/prism/node.rb#19031 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -26044,32 +30591,33 @@ class Prism::SymbolNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18120 + # source://prism//lib/prism/node.rb#19128 + sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#18061 + # source://prism//lib/prism/node.rb#19070 sig { returns(String) } def unescaped; end # def value: () -> String? # - # source://prism//lib/prism/node.rb#18085 + # source://prism//lib/prism/node.rb#19093 sig { returns(T.nilable(String)) } def value; end # attr_reader value_loc: Location? # - # source://prism//lib/prism/node.rb#18037 + # source://prism//lib/prism/node.rb#19044 sig { returns(T.nilable(Prism::Location)) } def value_loc; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18021 + # source://prism//lib/prism/node.rb#19027 sig { returns(Integer) } def flags; end @@ -26081,55 +30629,56 @@ class Prism::SymbolNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18130 + # source://prism//lib/prism/node.rb#19138 def type; end end end # This represents a token from the Ruby source. # -# source://prism//lib/prism/parse_result.rb#454 +# source://prism//lib/prism/parse_result.rb#550 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 + # source://prism//lib/prism/parse_result.rb#562 + 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#500 + # source://prism//lib/prism/parse_result.rb#597 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) } + # source://prism//lib/prism/parse_result.rb#570 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, 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 + # source://prism//lib/prism/parse_result.rb#575 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) } + # source://prism//lib/prism/parse_result.rb#582 + 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#460 - sig { returns(T.untyped) } + # source://prism//lib/prism/parse_result.rb#556 + sig { returns(Symbol) } def type; end # A byteslice of the source that this token represents. # - # source://prism//lib/prism/parse_result.rb#463 + # source://prism//lib/prism/parse_result.rb#559 sig { returns(String) } def value; end @@ -26137,7 +30686,8 @@ class Prism::Token # The Source object that represents the source this token came from. # - # source://prism//lib/prism/parse_result.rb#456 + # source://prism//lib/prism/parse_result.rb#552 + sig { returns(Prism::Source) } def source; end end @@ -26156,47 +30706,48 @@ module Prism::Translation; end class Prism::Translation::Parser < ::Parser::Base # The default encoding for Ruby files is UTF-8. # - # source://prism//lib/prism/translation/parser.rb#33 + # source://prism//lib/prism/translation/parser.rb#36 def default_encoding; end # Parses a source buffer and returns the AST. # - # source://prism//lib/prism/translation/parser.rb#41 + # source://prism//lib/prism/translation/parser.rb#44 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 + # source://prism//lib/prism/translation/parser.rb#57 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 + # source://prism//lib/prism/translation/parser.rb#74 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 + # source://prism//lib/prism/translation/parser.rb#100 def try_declare_numparam(node); end - # source://prism//lib/prism/translation/parser.rb#28 + # source://prism//lib/prism/translation/parser.rb#31 + sig { overridable.returns(Integer) } def version; end - # source://prism//lib/prism/translation/parser.rb#37 + # source://prism//lib/prism/translation/parser.rb#40 def yyerror; end private # Build the parser gem AST from the prism AST. # - # source://prism//lib/prism/translation/parser.rb#146 + # source://prism//lib/prism/translation/parser.rb#258 def build_ast(program, offset_cache); end # Build the parser gem comments from the prism comments. # - # source://prism//lib/prism/translation/parser.rb#151 + # source://prism//lib/prism/translation/parser.rb#263 def build_comments(comments, offset_cache); end # Prism deals with offsets in bytes, while the parser gem deals with @@ -26207,28 +30758,33 @@ class Prism::Translation::Parser < ::Parser::Base # 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 + # source://prism//lib/prism/translation/parser.rb#241 def build_offset_cache(source); end # Build a range from a prism location. # - # source://prism//lib/prism/translation/parser.rb#163 + # source://prism//lib/prism/translation/parser.rb#275 def build_range(location, offset_cache); end # Build the parser gem tokens from the prism tokens. # - # source://prism//lib/prism/translation/parser.rb#158 + # source://prism//lib/prism/translation/parser.rb#270 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 + # source://prism//lib/prism/translation/parser.rb#284 def convert_for_prism(version); end + # Build a diagnostic from the given prism parse error. + # + # source://prism//lib/prism/translation/parser.rb#119 + 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#111 + # source://prism//lib/prism/translation/parser.rb#219 def unwrap(result, offset_cache); end # This is a hook to allow consumers to disable some errors if they don't @@ -26236,8 +30792,39 @@ class Prism::Translation::Parser < ::Parser::Base # # @return [Boolean] # - # source://prism//lib/prism/translation/parser.rb#105 + # source://prism//lib/prism/translation/parser.rb#108 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#114 + def valid_warning?(warning); end + + # Build a diagnostic from the given prism parse warning. + # + # source://prism//lib/prism/translation/parser.rb#192 + 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 @@ -26245,6 +30832,8 @@ end # # source://prism//lib/prism/translation/parser/compiler.rb#8 class Prism::Translation::Parser::Compiler < ::Prism::Compiler + Result = type_member { { fixed: Parser::AST::Node } } + # Initialize a new compiler with the given parser, offset cache, and # options. # @@ -26345,49 +30934,49 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # { **foo } # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#141 + # source://prism//lib/prism/translation/parser/compiler.rb#148 def visit_assoc_splat_node(node); end # $+ # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#151 + # source://prism//lib/prism/translation/parser/compiler.rb#158 def visit_back_reference_read_node(node); end # begin end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#157 + # source://prism//lib/prism/translation/parser/compiler.rb#164 def visit_begin_node(node); end # foo(&bar) # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#195 + # source://prism//lib/prism/translation/parser/compiler.rb#202 def visit_block_argument_node(node); end # foo { |; bar| } # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#201 + # source://prism//lib/prism/translation/parser/compiler.rb#208 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 + # source://prism//lib/prism/translation/parser/compiler.rb#213 def visit_block_node(node); end # def foo(&bar); end # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#212 + # source://prism//lib/prism/translation/parser/compiler.rb#219 def visit_block_parameter_node(node); end # A block's parameters. # - # source://prism//lib/prism/translation/parser/compiler.rb#217 + # source://prism//lib/prism/translation/parser/compiler.rb#224 def visit_block_parameters_node(node); end # break @@ -26396,7 +30985,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # break foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#226 + # source://prism//lib/prism/translation/parser/compiler.rb#233 def visit_break_node(node); end # foo.bar += baz @@ -26404,7 +30993,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo.bar &&= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#300 + # source://prism//lib/prism/translation/parser/compiler.rb#319 def visit_call_and_write_node(node); end # foo @@ -26416,13 +31005,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo.bar() {} # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#238 + # source://prism//lib/prism/translation/parser/compiler.rb#245 def visit_call_node(node); end # foo.bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#300 + # source://prism//lib/prism/translation/parser/compiler.rb#319 def visit_call_operator_write_node(node); end # foo.bar += baz @@ -26430,37 +31019,37 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo.bar ||= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#300 + # source://prism//lib/prism/translation/parser/compiler.rb#319 def visit_call_or_write_node(node); end # foo.bar, = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#327 + # source://prism//lib/prism/translation/parser/compiler.rb#346 def visit_call_target_node(node); end # foo => bar => baz # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#339 + # source://prism//lib/prism/translation/parser/compiler.rb#358 def visit_capture_pattern_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#358 + # source://prism//lib/prism/translation/parser/compiler.rb#377 def visit_case_match_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#345 + # source://prism//lib/prism/translation/parser/compiler.rb#364 def visit_case_node(node); end # class Foo; end # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#371 + # source://prism//lib/prism/translation/parser/compiler.rb#390 def visit_class_node(node); end # @@foo += bar @@ -26468,13 +31057,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # @@foo &&= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#403 + # source://prism//lib/prism/translation/parser/compiler.rb#419 def visit_class_variable_and_write_node(node); end # @@foo += bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#403 + # source://prism//lib/prism/translation/parser/compiler.rb#419 def visit_class_variable_operator_write_node(node); end # @@foo += bar @@ -26482,28 +31071,25 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # @@foo ||= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#403 + # source://prism//lib/prism/translation/parser/compiler.rb#419 def visit_class_variable_or_write_node(node); end # @@foo # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#384 + # source://prism//lib/prism/translation/parser/compiler.rb#403 def visit_class_variable_read_node(node); end # @@foo, = bar # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#421 + # source://prism//lib/prism/translation/parser/compiler.rb#437 def visit_class_variable_target_node(node); end # @@foo = 1 # ^^^^^^^^^ # - # @@foo, @@bar = 1 - # ^^^^^ ^^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#393 + # source://prism//lib/prism/translation/parser/compiler.rb#409 def visit_class_variable_write_node(node); end # Foo += bar @@ -26511,13 +31097,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#442 + # source://prism//lib/prism/translation/parser/compiler.rb#458 def visit_constant_and_write_node(node); end # Foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#442 + # source://prism//lib/prism/translation/parser/compiler.rb#458 def visit_constant_operator_write_node(node); end # Foo += bar @@ -26525,7 +31111,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#442 + # source://prism//lib/prism/translation/parser/compiler.rb#458 def visit_constant_or_write_node(node); end # Foo::Bar += baz @@ -26533,19 +31119,19 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo::Bar &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#496 + # source://prism//lib/prism/translation/parser/compiler.rb#512 def visit_constant_path_and_write_node(node); end # Foo::Bar # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#466 + # source://prism//lib/prism/translation/parser/compiler.rb#482 def visit_constant_path_node(node); end # Foo::Bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#496 + # source://prism//lib/prism/translation/parser/compiler.rb#512 def visit_constant_path_operator_write_node(node); end # Foo::Bar += baz @@ -26553,13 +31139,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo::Bar ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#496 + # source://prism//lib/prism/translation/parser/compiler.rb#512 def visit_constant_path_or_write_node(node); end # Foo::Bar, = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#514 + # source://prism//lib/prism/translation/parser/compiler.rb#530 def visit_constant_path_target_node(node); end # Foo::Bar = 1 @@ -26568,19 +31154,19 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo::Foo, Bar::Bar = 1 # ^^^^^^^^ ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#486 + # source://prism//lib/prism/translation/parser/compiler.rb#502 def visit_constant_path_write_node(node); end # Foo # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#427 + # source://prism//lib/prism/translation/parser/compiler.rb#443 def visit_constant_read_node(node); end # Foo, = bar # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#460 + # source://prism//lib/prism/translation/parser/compiler.rb#476 def visit_constant_target_node(node); end # Foo = 1 @@ -26589,7 +31175,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # Foo, Bar = 1 # ^^^ ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#436 + # source://prism//lib/prism/translation/parser/compiler.rb#452 def visit_constant_write_node(node); end # def foo; end @@ -26598,7 +31184,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def self.foo; end # ^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#523 + # source://prism//lib/prism/translation/parser/compiler.rb#539 def visit_def_node(node); end # defined? a @@ -26607,25 +31193,25 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # defined?(a) # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#570 + # source://prism//lib/prism/translation/parser/compiler.rb#586 def visit_defined_node(node); end # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#582 + # source://prism//lib/prism/translation/parser/compiler.rb#598 def visit_else_node(node); end # "foo #{bar}" # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#588 + # source://prism//lib/prism/translation/parser/compiler.rb#604 def visit_embedded_statements_node(node); end # "foo #@bar" # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#598 + # source://prism//lib/prism/translation/parser/compiler.rb#614 def visit_embedded_variable_node(node); end # begin; foo; ensure; bar; end @@ -26633,19 +31219,19 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#604 + # source://prism//lib/prism/translation/parser/compiler.rb#620 def visit_ensure_node(node); end # false # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#610 + # source://prism//lib/prism/translation/parser/compiler.rb#626 def visit_false_node(node); end # foo => [*, bar, *] # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#616 + # source://prism//lib/prism/translation/parser/compiler.rb#632 def visit_find_pattern_node(node); end # 0..5 @@ -26653,31 +31239,31 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # if foo .. bar; end # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1302 + # source://prism//lib/prism/translation/parser/compiler.rb#1364 def visit_flip_flop_node(node); end # 1.0 # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#628 + # source://prism//lib/prism/translation/parser/compiler.rb#644 def visit_float_node(node); end # for foo in bar do end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#634 + # source://prism//lib/prism/translation/parser/compiler.rb#650 def visit_for_node(node); end # def foo(...); bar(...); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#652 + # source://prism//lib/prism/translation/parser/compiler.rb#668 def visit_forwarding_arguments_node(node); end # def foo(...); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#658 + # source://prism//lib/prism/translation/parser/compiler.rb#674 def visit_forwarding_parameter_node(node); end # super @@ -26686,7 +31272,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # super {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#667 + # source://prism//lib/prism/translation/parser/compiler.rb#683 def visit_forwarding_super_node(node); end # $foo += bar @@ -26694,13 +31280,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # $foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#698 + # source://prism//lib/prism/translation/parser/compiler.rb#711 def visit_global_variable_and_write_node(node); end # $foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#698 + # source://prism//lib/prism/translation/parser/compiler.rb#711 def visit_global_variable_operator_write_node(node); end # $foo += bar @@ -26708,40 +31294,37 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # $foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#698 + # source://prism//lib/prism/translation/parser/compiler.rb#711 def visit_global_variable_or_write_node(node); end # $foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#679 + # source://prism//lib/prism/translation/parser/compiler.rb#695 def visit_global_variable_read_node(node); end # $foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#716 + # source://prism//lib/prism/translation/parser/compiler.rb#729 def visit_global_variable_target_node(node); end # $foo = 1 # ^^^^^^^^ # - # $foo, $bar = 1 - # ^^^^ ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#688 + # source://prism//lib/prism/translation/parser/compiler.rb#701 def visit_global_variable_write_node(node); end # {} # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#722 + # source://prism//lib/prism/translation/parser/compiler.rb#735 def visit_hash_node(node); end # foo => {} # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#732 + # source://prism//lib/prism/translation/parser/compiler.rb#745 def visit_hash_pattern_node(node); end # if foo then bar end @@ -26753,12 +31336,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo ? bar : baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#750 + # source://prism//lib/prism/translation/parser/compiler.rb#763 def visit_if_node(node); end # 1i + # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#791 + # source://prism//lib/prism/translation/parser/compiler.rb#805 def visit_imaginary_node(node); end # { foo: } @@ -26766,7 +31350,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#797 + # source://prism//lib/prism/translation/parser/compiler.rb#811 def visit_implicit_node(node); end # foo { |bar,| } @@ -26774,13 +31358,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#803 + # source://prism//lib/prism/translation/parser/compiler.rb#817 def visit_implicit_rest_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#809 + # source://prism//lib/prism/translation/parser/compiler.rb#823 def visit_in_node(node); end # foo[bar] += baz @@ -26788,13 +31372,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo[bar] &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#835 + # source://prism//lib/prism/translation/parser/compiler.rb#849 def visit_index_and_write_node(node); end # foo[bar] += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#835 + # source://prism//lib/prism/translation/parser/compiler.rb#849 def visit_index_operator_write_node(node); end # foo[bar] += baz @@ -26802,55 +31386,52 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo[bar] ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#835 + # source://prism//lib/prism/translation/parser/compiler.rb#849 def visit_index_or_write_node(node); end # foo[bar], = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#861 + # source://prism//lib/prism/translation/parser/compiler.rb#875 def visit_index_target_node(node); end # ^^^^^^^^^^^ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#891 + # source://prism//lib/prism/translation/parser/compiler.rb#902 def visit_instance_variable_and_write_node(node); end # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#891 + # source://prism//lib/prism/translation/parser/compiler.rb#902 def visit_instance_variable_operator_write_node(node); end # ^^^^^^^^^^^ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#891 + # source://prism//lib/prism/translation/parser/compiler.rb#902 def visit_instance_variable_or_write_node(node); end # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#872 + # source://prism//lib/prism/translation/parser/compiler.rb#886 def visit_instance_variable_read_node(node); end # @foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#909 + # source://prism//lib/prism/translation/parser/compiler.rb#920 def visit_instance_variable_target_node(node); end # ^^^^^^^^ # - # @foo, @bar = 1 - # ^^^^ ^^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#881 + # source://prism//lib/prism/translation/parser/compiler.rb#892 def visit_instance_variable_write_node(node); end # 1 # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#915 + # source://prism//lib/prism/translation/parser/compiler.rb#926 def visit_integer_node(node); end # /foo #{bar}/ @@ -26858,37 +31439,43 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # if /foo #{bar}/ then end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#921 + # source://prism//lib/prism/translation/parser/compiler.rb#932 def visit_interpolated_match_last_line_node(node); end # /foo #{bar}/ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#921 + # source://prism//lib/prism/translation/parser/compiler.rb#932 def visit_interpolated_regular_expression_node(node); end # "foo #{bar}" # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#936 + # source://prism//lib/prism/translation/parser/compiler.rb#947 def visit_interpolated_string_node(node); end # :"foo #{bar}" # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#951 + # source://prism//lib/prism/translation/parser/compiler.rb#1010 def visit_interpolated_symbol_node(node); end # `foo #{bar}` # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#961 + # source://prism//lib/prism/translation/parser/compiler.rb#1020 def visit_interpolated_x_string_node(node); end + # -> { it } + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1035 + def visit_it_parameters_node(node); end + # foo(bar: baz) # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#976 + # source://prism//lib/prism/translation/parser/compiler.rb#1041 def visit_keyword_hash_node(node); end # def foo(**bar); end @@ -26897,12 +31484,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(**); end # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#985 + # source://prism//lib/prism/translation/parser/compiler.rb#1050 def visit_keyword_rest_parameter_node(node); end # -> {} + # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#993 + # source://prism//lib/prism/translation/parser/compiler.rb#1059 def visit_lambda_node(node); end # foo += bar @@ -26910,13 +31498,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo &&= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1037 + # source://prism//lib/prism/translation/parser/compiler.rb#1108 def visit_local_variable_and_write_node(node); end # foo += bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1037 + # source://prism//lib/prism/translation/parser/compiler.rb#1108 def visit_local_variable_operator_write_node(node); end # foo += bar @@ -26924,28 +31512,25 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # foo ||= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1037 + # source://prism//lib/prism/translation/parser/compiler.rb#1108 def visit_local_variable_or_write_node(node); end # foo # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1018 + # source://prism//lib/prism/translation/parser/compiler.rb#1085 def visit_local_variable_read_node(node); end # foo, = bar # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1055 + # source://prism//lib/prism/translation/parser/compiler.rb#1126 def visit_local_variable_target_node(node); end # foo = 1 # ^^^^^^^ # - # foo, bar = 1 - # ^^^ ^^^ - # - # source://prism//lib/prism/translation/parser/compiler.rb#1027 + # source://prism//lib/prism/translation/parser/compiler.rb#1098 def visit_local_variable_write_node(node); end # /foo/ @@ -26953,47 +31538,50 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # if /foo/ then end # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1336 + # source://prism//lib/prism/translation/parser/compiler.rb#1398 def visit_match_last_line_node(node); end - # source://prism//lib/prism/translation/parser/compiler.rb#1066 + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1136 def visit_match_predicate_node(node); end # foo => bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1085 + # source://prism//lib/prism/translation/parser/compiler.rb#1146 def visit_match_required_node(node); end # /(?foo)/ =~ bar # ^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1095 + # source://prism//lib/prism/translation/parser/compiler.rb#1156 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 + # source://prism//lib/prism/translation/parser/compiler.rb#1167 def visit_missing_node(node); end # module Foo; end # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1112 + # source://prism//lib/prism/translation/parser/compiler.rb#1173 def visit_module_node(node); end # foo, bar = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1123 + # source://prism//lib/prism/translation/parser/compiler.rb#1184 def visit_multi_target_node(node); end # foo, bar = baz # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1137 + # source://prism//lib/prism/translation/parser/compiler.rb#1198 def visit_multi_write_node(node); end # next @@ -27002,55 +31590,55 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # next foo # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1158 + # source://prism//lib/prism/translation/parser/compiler.rb#1219 def visit_next_node(node); end # nil # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1170 + # source://prism//lib/prism/translation/parser/compiler.rb#1231 def visit_nil_node(node); end # def foo(**nil); end # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1176 + # source://prism//lib/prism/translation/parser/compiler.rb#1237 def visit_no_keywords_parameter_node(node); end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1186 + # source://prism//lib/prism/translation/parser/compiler.rb#1247 def visit_numbered_parameters_node(node); end # $1 # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1192 + # source://prism//lib/prism/translation/parser/compiler.rb#1253 def visit_numbered_reference_read_node(node); end # def foo(bar: baz); end # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1198 + # source://prism//lib/prism/translation/parser/compiler.rb#1259 def visit_optional_keyword_parameter_node(node); end # def foo(bar = 1); end # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1204 + # source://prism//lib/prism/translation/parser/compiler.rb#1265 def visit_optional_parameter_node(node); end # a or b # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1210 + # source://prism//lib/prism/translation/parser/compiler.rb#1271 def visit_or_node(node); end # def foo(bar, *baz); end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1216 + # source://prism//lib/prism/translation/parser/compiler.rb#1277 def visit_parameters_node(node); end # () @@ -27059,76 +31647,76 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # (1) # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1255 + # source://prism//lib/prism/translation/parser/compiler.rb#1316 def visit_parentheses_node(node); end # foo => ^(bar) # ^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1265 + # source://prism//lib/prism/translation/parser/compiler.rb#1326 def visit_pinned_expression_node(node); end # foo = 1 and bar => ^foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1271 + # source://prism//lib/prism/translation/parser/compiler.rb#1333 def visit_pinned_variable_node(node); end # END {} # - # source://prism//lib/prism/translation/parser/compiler.rb#1276 + # source://prism//lib/prism/translation/parser/compiler.rb#1338 def visit_post_execution_node(node); end # BEGIN {} # - # source://prism//lib/prism/translation/parser/compiler.rb#1286 + # source://prism//lib/prism/translation/parser/compiler.rb#1348 def visit_pre_execution_node(node); end # The top-level program node. # - # source://prism//lib/prism/translation/parser/compiler.rb#1296 + # source://prism//lib/prism/translation/parser/compiler.rb#1358 def visit_program_node(node); end # 0..5 # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1302 + # source://prism//lib/prism/translation/parser/compiler.rb#1364 def visit_range_node(node); end # 1r # ^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1324 + # source://prism//lib/prism/translation/parser/compiler.rb#1386 def visit_rational_node(node); end # redo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1330 + # source://prism//lib/prism/translation/parser/compiler.rb#1392 def visit_redo_node(node); end # /foo/ # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1336 + # source://prism//lib/prism/translation/parser/compiler.rb#1398 def visit_regular_expression_node(node); end # def foo(bar:); end # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1351 + # source://prism//lib/prism/translation/parser/compiler.rb#1413 def visit_required_keyword_parameter_node(node); end # def foo(bar); end # ^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1357 + # source://prism//lib/prism/translation/parser/compiler.rb#1419 def visit_required_parameter_node(node); end # foo rescue bar # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1363 + # source://prism//lib/prism/translation/parser/compiler.rb#1425 def visit_rescue_modifier_node(node); end # begin; rescue; end @@ -27136,7 +31724,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # # @raise [CompilationError] # - # source://prism//lib/prism/translation/parser/compiler.rb#1381 + # source://prism//lib/prism/translation/parser/compiler.rb#1443 def visit_rescue_node(node); end # def foo(*bar); end @@ -27145,13 +31733,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(*); end # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1390 + # source://prism//lib/prism/translation/parser/compiler.rb#1452 def visit_rest_parameter_node(node); end # retry # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1396 + # source://prism//lib/prism/translation/parser/compiler.rb#1458 def visit_retry_node(node); end # return @@ -27160,37 +31748,42 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # return 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1405 + # source://prism//lib/prism/translation/parser/compiler.rb#1467 def visit_return_node(node); end # self # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1417 + # source://prism//lib/prism/translation/parser/compiler.rb#1479 def visit_self_node(node); end + # A shareable constant. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1484 + def visit_shareable_constant_node(node); end + # class << self; end # ^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1423 + # source://prism//lib/prism/translation/parser/compiler.rb#1490 def visit_singleton_class_node(node); end # __ENCODING__ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1435 + # source://prism//lib/prism/translation/parser/compiler.rb#1502 def visit_source_encoding_node(node); end # __FILE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1441 + # source://prism//lib/prism/translation/parser/compiler.rb#1508 def visit_source_file_node(node); end # __LINE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1447 + # source://prism//lib/prism/translation/parser/compiler.rb#1514 def visit_source_line_node(node); end # foo(*bar) @@ -27202,42 +31795,42 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # def foo(*); bar(*); end # ^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1459 + # source://prism//lib/prism/translation/parser/compiler.rb#1526 def visit_splat_node(node); end # A list of statements. # - # source://prism//lib/prism/translation/parser/compiler.rb#1472 + # source://prism//lib/prism/translation/parser/compiler.rb#1539 def visit_statements_node(node); end # "foo" # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1478 + # source://prism//lib/prism/translation/parser/compiler.rb#1545 def visit_string_node(node); end # super(foo) # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1495 + # source://prism//lib/prism/translation/parser/compiler.rb#1586 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1518 + # source://prism//lib/prism/translation/parser/compiler.rb#1609 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1536 + # source://prism//lib/prism/translation/parser/compiler.rb#1641 def visit_true_node(node); end # undef foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1542 + # source://prism//lib/prism/translation/parser/compiler.rb#1647 def visit_undef_node(node); end # unless foo; bar end @@ -27246,22 +31839,22 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar unless foo # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1551 + # source://prism//lib/prism/translation/parser/compiler.rb#1656 def visit_unless_node(node); end # until foo; bar end - # ^^^^^^^^^^^^^^^^^ + # ^^^^^^^^^^^^^^^^^^ # # bar until foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1581 + # source://prism//lib/prism/translation/parser/compiler.rb#1686 def visit_until_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1603 + # source://prism//lib/prism/translation/parser/compiler.rb#1708 def visit_when_node(node); end # while foo; bar end @@ -27270,13 +31863,13 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # bar while foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1617 + # source://prism//lib/prism/translation/parser/compiler.rb#1726 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1639 + # source://prism//lib/prism/translation/parser/compiler.rb#1748 def visit_x_string_node(node); end # yield @@ -27285,7 +31878,7 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # yield 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/parser/compiler.rb#1657 + # source://prism//lib/prism/translation/parser/compiler.rb#1780 def visit_yield_node(node); end private @@ -27293,65 +31886,89 @@ class Prism::Translation::Parser::Compiler < ::Prism::Compiler # 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 + # source://prism//lib/prism/translation/parser/compiler.rb#1794 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 + # source://prism//lib/prism/translation/parser/compiler.rb#1801 def find_forwarding(node); end + # Because we have mutated the AST to allow for newlines in the middle of + # a rational, we need to manually handle the value here. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1815 + def imaginary_value(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#1824 + 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#1693 + # source://prism//lib/prism/translation/parser/compiler.rb#1836 def procarg0?(parameters); end + # Because we have mutated the AST to allow for newlines in the middle of + # a rational, we need to manually handle the value here. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1849 + def rational_value(node); end + # Constructs a new source range from the given start and end offsets. # - # source://prism//lib/prism/translation/parser/compiler.rb#1710 + # source://prism//lib/prism/translation/parser/compiler.rb#1863 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. + # returns nil. Importantly it does not search past newlines or comments. # - # source://prism//lib/prism/translation/parser/compiler.rb#1722 + # 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#1878 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 + # source://prism//lib/prism/translation/parser/compiler.rb#1868 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 + # source://prism//lib/prism/translation/parser/compiler.rb#1888 def token(location); end # Visit a block node on a call. # - # source://prism//lib/prism/translation/parser/compiler.rb#1736 + # source://prism//lib/prism/translation/parser/compiler.rb#1893 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 + # source://prism//lib/prism/translation/parser/compiler.rb#1927 def visit_heredoc(node); end # Visit a numeric node and account for the optional sign. # - # source://prism//lib/prism/translation/parser/compiler.rb#1815 + # source://prism//lib/prism/translation/parser/compiler.rb#1973 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 + # source://prism//lib/prism/translation/parser/compiler.rb#1985 def within_pattern; end end @@ -27364,27 +31981,11 @@ class Prism::Translation::Parser::Compiler::CompilationError < ::StandardError; # store a reference to its constant to make it slightly faster to look # up. # -# source://prism//lib/prism/translation/parser/compiler.rb#1707 +# source://prism//lib/prism/translation/parser/compiler.rb#1860 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 +# source://prism//lib/prism/translation/parser.rb#12 +Prism::Translation::Parser::Diagnostic = Parser::Diagnostic # Accepts a list of prism tokens and converts them into the expected # format for the parser gem. @@ -27396,43 +31997,68 @@ class Prism::Translation::Parser::Lexer # # @return [Lexer] a new instance of Lexer # - # source://prism//lib/prism/translation/parser/lexer.rb#193 + # source://prism//lib/prism/translation/parser/lexer.rb#204 def initialize(source_buffer, lexed, offset_cache); end - # An array of prism tokens that we lexed. + # 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#186 + # source://prism//lib/prism/translation/parser/lexer.rb#197 def lexed; end # A hash that maps offsets in bytes to offsets in characters. # - # source://prism//lib/prism/translation/parser/lexer.rb#189 + # source://prism//lib/prism/translation/parser/lexer.rb#200 def offset_cache; end # The Parser::Source::Buffer that the tokens were lexed from. # - # source://prism//lib/prism/translation/parser/lexer.rb#183 + # source://prism//lib/prism/translation/parser/lexer.rb#193 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 + # source://prism//lib/prism/translation/parser/lexer.rb#214 def to_a; end private # Parse a complex from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#310 + # source://prism//lib/prism/translation/parser/lexer.rb#387 def parse_complex(value); end + # Parse a float from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#380 + def parse_float(value); end + + # Parse an integer from the string representation. + # + # source://prism//lib/prism/translation/parser/lexer.rb#373 + def parse_integer(value); end + # Parse a rational from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#323 + # source://prism//lib/prism/translation/parser/lexer.rb#402 def parse_rational(value); end end -# source://prism//lib/prism/translation/parser/lexer.rb#199 +# 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) + +# source://prism//lib/prism/translation/parser/lexer.rb#210 Prism::Translation::Parser::Lexer::Range = Parser::Source::Range # The direct translating of types between the two lexers. @@ -27440,267 +32066,1091 @@ Prism::Translation::Parser::Lexer::Range = Parser::Source::Range # 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 +# 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#18 +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#23 + def initialize(message, level, reason, location); end + + # This is the cached message coming from prism. + # + # source://prism//lib/prism/translation/parser.rb#20 + def message; end +end + +# source://prism//lib/prism/translation/parser.rb#29 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. +# 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 # -# 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 +# 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#75 - def initialize(source); end + # 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#72 + # 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#87 + # 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#69 + # 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#92 + # source://prism//lib/prism/translation/ripper.rb#462 + sig { returns(T.nilable(Result)) } def parse; end # The source that is being parsed. # - # source://prism//lib/prism/translation/ripper.rb#66 + # source://prism//lib/prism/translation/ripper.rb#432 def source; end - # Visit an AliasGlobalVariableNode. + # alias $foo $bar + # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#247 + # source://prism//lib/prism/translation/ripper.rb#561 def visit_alias_global_variable_node(node); end - # Visit an AliasMethodNode. + # alias foo bar + # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#226 + # source://prism//lib/prism/translation/ripper.rb#551 def visit_alias_method_node(node); end - # Visit an AndNode. + # foo => bar | baz + # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#264 - def visit_and_node(node); end + # source://prism//lib/prism/translation/ripper.rb#585 + def visit_alternation_pattern_node(node); end - # Visit an ArrayNode node. + # a and b + # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#113 - def visit_array_node(node); end + # source://prism//lib/prism/translation/ripper.rb#605 + def visit_and_node(node); end - # Visit a BackReferenceReadNode. + # foo(bar) + # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#258 - def visit_back_reference_read_node(node); end + # source://prism//lib/prism/translation/ripper.rb#796 + def visit_arguments_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 + # source://prism//lib/prism/translation/ripper.rb#615 + def visit_array_node(node); end - # Visit a BlockNode. + # foo => [bar] + # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#191 - def visit_block_node(node); end + # source://prism//lib/prism/translation/ripper.rb#775 + def visit_array_pattern_node(node); end - # Visit a BlockParametersNode. + # { a: 1 } + # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#200 - def visit_block_parameters_node(node); end + # source://prism//lib/prism/translation/ripper.rb#803 + def visit_assoc_node(node); end - # Visit a BreakNode. + # def foo(**); bar(**); end + # ^^ # - # 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. + # { **foo } + # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#123 - def visit_call_node(node); end + # source://prism//lib/prism/translation/ripper.rb#816 + def visit_assoc_splat_node(node); end - # Visit an EmbeddedStatementsNode node. + # $+ + # ^^ # - # source://prism//lib/prism/translation/ripper.rb#371 - def visit_embedded_statements_node(node); end + # source://prism//lib/prism/translation/ripper.rb#825 + def visit_back_reference_read_node(node); end - # Visit a FalseNode. + # begin end + # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#280 - def visit_false_node(node); end + # source://prism//lib/prism/translation/ripper.rb#832 + def visit_begin_node(node); end - # Visit a FloatNode node. + # foo(&bar) + # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#286 - def visit_float_node(node); end + # source://prism//lib/prism/translation/ripper.rb#896 + def visit_block_argument_node(node); end - # Visit a GlobalVariableReadNode. + # foo { |; bar| } + # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#252 - def visit_global_variable_read_node(node); end + # source://prism//lib/prism/translation/ripper.rb#902 + def visit_block_local_variable_node(node); end - # Visit a ImaginaryNode node. + # Visit a BlockNode. # - # source://prism//lib/prism/translation/ripper.rb#291 - def visit_imaginary_node(node); end + # source://prism//lib/prism/translation/ripper.rb#908 + def visit_block_node(node); end - # Visit an IntegerNode node. + # def foo(&bar); end + # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#296 - def visit_integer_node(node); end + # source://prism//lib/prism/translation/ripper.rb#944 + def visit_block_parameter_node(node); end - # Visit an InterpolatedStringNode node. + # A block's parameters. # - # source://prism//lib/prism/translation/ripper.rb#366 - def visit_interpolated_string_node(node); end + # source://prism//lib/prism/translation/ripper.rb#958 + def visit_block_parameters_node(node); end - # Visit an InterpolatedSymbolNode node. + # break + # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#381 - def visit_interpolated_symbol_node(node); end - - # Visit a LocalVariableAndWriteNode. + # break foo + # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#168 - def visit_local_variable_and_write_node(node); end + # source://prism//lib/prism/translation/ripper.rb#982 + def visit_break_node(node); end - # Visit nodes for +=, *=, -=, etc., called LocalVariableOperatorWriteNodes. + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#178 - def visit_local_variable_operator_write_node(node); end + # 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_parameters_node(node); end + + # foo(bar: baz) + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2227 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2239 + def visit_keyword_rest_parameter_node(node); end + + # -> {} + # + # source://prism//lib/prism/translation/ripper.rb#2253 + def visit_lambda_node(node); end + + # foo &&= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2350 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2336 + def visit_local_variable_operator_write_node(node); end - # Visit a LocalVariableOrWriteNode. + # foo ||= bar + # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#173 + # source://prism//lib/prism/translation/ripper.rb#2364 def visit_local_variable_or_write_node(node); end - # Visit a LocalVariableReadNode. + # foo + # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#183 + # source://prism//lib/prism/translation/ripper.rb#2313 def visit_local_variable_read_node(node); end - # Visit a LocalVariableWriteNode. + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2378 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#161 + # source://prism//lib/prism/translation/ripper.rb#2325 def visit_local_variable_write_node(node); end - # Visit an OrNode. + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2385 + def visit_match_last_line_node(node); end + + # foo in bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2400 + def visit_match_predicate_node(node); end + + # foo => bar + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2409 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2418 + 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#2424 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2430 + def visit_module_node(node); end + + # (foo, bar), bar = qux + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2447 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2501 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2521 + def visit_next_node(node); end + + # nil + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2535 + def visit_nil_node(node); end + + # def foo(**nil); end + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2542 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2551 + def visit_numbered_parameters_node(node); end + + # $1 + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2556 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2563 + def visit_optional_keyword_parameter_node(node); end + + # def foo(bar = 1); end + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2573 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#269 + # source://prism//lib/prism/translation/ripper.rb#2583 def visit_or_node(node); end - # Visit a ParametersNode. - # This will require expanding as we support more kinds of parameters. + # def foo(bar, *baz); end + # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#206 + # source://prism//lib/prism/translation/ripper.rb#2593 def visit_parameters_node(node); end - # Visit a ParenthesesNode node. + # () + # ^^ + # + # (1) + # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#301 + # source://prism//lib/prism/translation/ripper.rb#2620 def visit_parentheses_node(node); end - # Visit a ProgramNode node. + # foo => ^(bar) + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2634 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2643 + def visit_pinned_variable_node(node); end + + # END {} + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2649 + def visit_post_execution_node(node); end + + # BEGIN {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2664 + def visit_pre_execution_node(node); end + + # The top-level program node. # - # source://prism//lib/prism/translation/ripper.rb#327 + # source://prism//lib/prism/translation/ripper.rb#2678 def visit_program_node(node); end - # Visit a RangeNode node. + # 0..5 + # ^^^^ # - # source://prism//lib/prism/translation/ripper.rb#334 + # source://prism//lib/prism/translation/ripper.rb#2689 def visit_range_node(node); end - # Visit a RationalNode node. + # 1r + # ^^ # - # source://prism//lib/prism/translation/ripper.rb#347 + # source://prism//lib/prism/translation/ripper.rb#2703 def visit_rational_node(node); end - # Visit a RequiredParameterNode. + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2709 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2716 + def visit_regular_expression_node(node); end + + # def foo(bar:); end + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2738 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ # - # source://prism//lib/prism/translation/ripper.rb#212 + # source://prism//lib/prism/translation/ripper.rb#2745 def visit_required_parameter_node(node); end - # Visit a RescueNode node. + # foo rescue bar + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2752 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#322 + # source://prism//lib/prism/translation/ripper.rb#2762 def visit_rescue_node(node); end - # Visit a StatementsNode node. + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2820 + def visit_rest_parameter_node(node); end + + # retry + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2832 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2842 + def visit_return_node(node); end + + # self + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2856 + def visit_self_node(node); end + + # A shareable constant. + # + # source://prism//lib/prism/translation/ripper.rb#2862 + def visit_shareable_constant_node(node); end + + # class << self; end + # ^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2868 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2878 + def visit_source_encoding_node(node); end + + # __FILE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2885 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2892 + 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#2905 + def visit_splat_node(node); end + + # A list of statements. # - # source://prism//lib/prism/translation/ripper.rb#386 + # source://prism//lib/prism/translation/ripper.rb#2910 def visit_statements_node(node); end - # Visit a StringNode node. + # "foo" + # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#352 + # source://prism//lib/prism/translation/ripper.rb#2927 def visit_string_node(node); end - # Visit a SymbolNode node. + # super(foo) + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3059 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3080 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3104 + def visit_true_node(node); end + + # undef foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3111 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3123 + def visit_unless_node(node); end + + # until foo; bar end + # ^^^^^^^^^^^^^^^^^ + # + # bar until foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3151 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#376 - def visit_symbol_node(node); end + # source://prism//lib/prism/translation/ripper.rb#3175 + def visit_when_node(node); end - # Visit a TrueNode. + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#274 - def visit_true_node(node); end + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3196 + def visit_while_node(node); end - # Visit an XStringNode node. + # `foo` + # ^^^^^ # - # source://prism//lib/prism/translation/ripper.rb#359 + # source://prism//lib/prism/translation/ripper.rb#3220 def visit_x_string_node(node); end + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3243 + def visit_yield_node(node); end + private - # source://prism//lib/prism/translation/ripper.rb#680 - def _dispatch0; end + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper.rb#3383 + def _dispatch_0; end - # source://prism//lib/prism/translation/ripper.rb#681 - def _dispatch1(_); end + # source://prism//lib/prism/translation/ripper.rb#3384 + def _dispatch_1(_); end - # source://prism//lib/prism/translation/ripper.rb#682 - def _dispatch2(_, _); end + # source://prism//lib/prism/translation/ripper.rb#3385 + def _dispatch_2(_, _); end - # source://prism//lib/prism/translation/ripper.rb#683 - def _dispatch3(_, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3386 + def _dispatch_3(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#684 - def _dispatch4(_, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3387 + def _dispatch_4(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#685 - def _dispatch5(_, _, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3388 + def _dispatch_5(_, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#686 - def _dispatch7(_, _, _, _, _, _, _); end + # source://prism//lib/prism/translation/ripper.rb#3389 + def _dispatch_7(_, _, _, _, _, _, _); end # This method is responsible for updating lineno and column information # to reflect the current node. @@ -27708,1396 +33158,1630 @@ class Prism::Translation::Ripper < ::Prism::Compiler # 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 + # source://prism//lib/prism/translation/ripper.rb#3373 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. + # 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#670 - def bounds_values(lineno, column); end + # source://prism//lib/prism/translation/ripper.rb#3411 + def compile_error(msg); end - # For CRuby et al, "no block" in an on_block_var is false + # 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#646 - def no_block_value; end + # source://prism//lib/prism/translation/ripper.rb#3426 + def dedent_string(string, width); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_BEGIN(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_CHAR(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_END(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on___end__(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_alias(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_alias_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_aref(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_aref_field(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_arg_ambiguous(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_arg_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_args_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_args_add_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_args_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_args_forward; end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_args_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_array(_); end - # source://prism//lib/prism/translation/ripper.rb#684 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_aryptn(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_assign(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_assign_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_assoc_new(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_assoc_splat(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_assoclist_from_args(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_backref(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_backtick(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_bare_assoc_hash(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_begin(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_binary(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_block_var(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_blockarg(_); end - # source://prism//lib/prism/translation/ripper.rb#684 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_bodystmt(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_brace_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_break(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_call(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_case(_, _); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_class(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_class_name_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_comma(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_command(_, _); end - # source://prism//lib/prism/translation/ripper.rb#684 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_command_call(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_comment(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_const(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_const_path_field(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_const_path_ref(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_const_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_cvar(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_def(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_defined(_); end - # source://prism//lib/prism/translation/ripper.rb#685 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_defs(_, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_do_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_dot2(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_dot3(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_dyna_symbol(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_else(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_elsif(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_embdoc(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_embdoc_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_embdoc_end(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_embexpr_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_embexpr_end(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_embvar(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_ensure(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_excessed_comma; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_fcall(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_field(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_float(_); end - # source://prism//lib/prism/translation/ripper.rb#684 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_fndptn(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_for(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_gvar(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_hash(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_heredoc_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_heredoc_dedent(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_heredoc_end(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_hshptn(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_ident(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_if(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_if_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_ifop(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_ignored_nl(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_ignored_sp(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_imaginary(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_in(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_int(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_ivar(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_kw(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_kwrest_param(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_label(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_label_end(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_lambda(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_lbrace(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_lbracket(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_lparen(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_magic_comment(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_massign(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_method_add_arg(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_method_add_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mlhs_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mlhs_add_post(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mlhs_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_mlhs_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_mlhs_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_module(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mrhs_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mrhs_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_mrhs_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_mrhs_new_from_args(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_next(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_nl(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_nokw_param(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_op(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_opassign(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_operator_ambiguous(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_param_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#686 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_params(_, _, _, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_parse_error(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_period(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_program(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_qsymbols_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_qsymbols_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_qsymbols_new; end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_qwords_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_qwords_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_qwords_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_rational(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_rbrace(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_rbracket(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_redo; end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_regexp_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_regexp_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_regexp_end(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_regexp_literal(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_regexp_new; end - # source://prism//lib/prism/translation/ripper.rb#684 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_rescue(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_rescue_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_rest_param(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_retry; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_return(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_return0; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_rparen(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_sclass(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_semicolon(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_sp(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_stmts_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_stmts_new; end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_string_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_string_concat(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_string_content; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_string_dvar(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_string_embexpr(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_string_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_super(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_symbeg(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_symbol(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_symbol_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_symbols_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_symbols_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_symbols_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_tlambda(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_tlambeg(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_top_const_field(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_top_const_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_tstring_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_tstring_content(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_tstring_end(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_unary(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_undef(_); end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_unless(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_unless_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_until(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_until_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_var_alias(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_var_field(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_var_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_vcall(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_void_stmt; end - # source://prism//lib/prism/translation/ripper.rb#683 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_when(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_while(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_while_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_word_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_word_new; end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_words_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_words_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_words_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_words_sep(_); end - # source://prism//lib/prism/translation/ripper.rb#682 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_xstring_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_xstring_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_xstring_new; end - # source://prism//lib/prism/translation/ripper.rb#681 + # source://prism//lib/prism/translation/ripper.rb#3384 def on_yield(_); end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_yield0; end - # source://prism//lib/prism/translation/ripper.rb#680 + # source://prism//lib/prism/translation/ripper.rb#3383 def on_zsuper; end # Lazily initialize the parse result. # - # source://prism//lib/prism/translation/ripper.rb#676 + # source://prism//lib/prism/translation/ripper.rb#3269 def result; end - # In Prism this is a CallNode with :[]= as the operator. - # In Ripper it's an :aref_field. + # Returns true if there is a comma between the two locations. # - # source://prism//lib/prism/translation/ripper.rb#521 - def visit_aref_field_node(node); end + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#3278 + def trailing_comma?(left, right); end - # In Prism this is a CallNode with :[] as the operator. - # In Ripper it's an :aref. + # Visit one side of an alias global variable node. # - # source://prism//lib/prism/translation/ripper.rb#513 - def visit_aref_node(node); end + # source://prism//lib/prism/translation/ripper.rb#570 + def visit_alias_global_variable_node_value(node); end - # Visit an operation-and-assign node, such as +=. + # Visit a list of elements, like the elements of an array or arguments. # - # source://prism//lib/prism/translation/ripper.rb#501 - def visit_binary_op_assign(node, operator: T.unsafe(nil)); end + # source://prism//lib/prism/translation/ripper.rb#756 + def visit_arguments(elements); end - # Visit a binary operator node like an AndNode or OrNode + # Visit the clauses of a begin node to form an on_bodystmt call. # - # source://prism//lib/prism/translation/ripper.rb#652 - def visit_binary_operator(node); end + # source://prism//lib/prism/translation/ripper.rb#840 + def visit_begin_node_clauses(location, node, allow_newline); end - # Visit a list of elements, like the elements of an array or arguments. + # 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#474 - def visit_elements(elements); end + # source://prism//lib/prism/translation/ripper.rb#1489 + def visit_constant_path_write_node_target(node); end - # Visit an InterpolatedStringNode or an InterpolatedSymbolNode node. + # Visit a destructured positional parameter node. # - # source://prism//lib/prism/translation/ripper.rb#482 - def visit_enumerated_node(node); end + # source://prism//lib/prism/translation/ripper.rb#2607 + def visit_destructured_parameter_node(node); end - # Generate Ripper events for a CallNode with no opening_loc + # Visit a string that is expressed using a <<~ heredoc. # - # source://prism//lib/prism/translation/ripper.rb#410 - def visit_no_paren_call(node); end + # source://prism//lib/prism/translation/ripper.rb#2978 + 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#2953 + def visit_heredoc_node_whitespace(parts); end + + # Visit a heredoc node that is representing a string. + # + # source://prism//lib/prism/translation/ripper.rb#3024 + def visit_heredoc_string_node(node); end + + # Visit a heredoc node that is representing an xstring. + # + # source://prism//lib/prism/translation/ripper.rb#3041 + def visit_heredoc_x_string_node(node); end + + # Visit the targets of a multi-target node. + # + # source://prism//lib/prism/translation/ripper.rb#2460 + 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#611 - def visit_number(node); end + # source://prism//lib/prism/translation/ripper.rb#3317 + def visit_number_node(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. + # 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#580 - def visit_symbol_literal_node(node, no_symbol_wrapper: T.unsafe(nil)); end + # source://prism//lib/prism/translation/ripper.rb#595 + def visit_pattern_node(node); end - # For most Rubies and JRuby after 9.4.6.0 this is a no-op. + # 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#634 - def visit_unary_operator(value); end + # source://prism//lib/prism/translation/ripper.rb#2919 + def visit_statements_node_body(body); 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 + # Visit an individual part of a string-like node. + # + # source://prism//lib/prism/translation/ripper.rb#2211 + def visit_string_content(part); 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 + # 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#3290 + 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#3335 + 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#3283 + 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#3402 + 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#3407 + 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 + + Result = type_member 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. +# 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#532 -Prism::Translation::Ripper::RUBY_KEYWORDS = T.let(T.unsafe(nil), Array) +# 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.rb#24 +# source://prism//lib/prism/translation/ripper/sexp.rb#10 class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper - private + Result = type_member { { fixed: T::Array[T.untyped] } } + + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper/sexp.rb#13 + def error; end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_BEGIN(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_CHAR(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_CHAR(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_END(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on___end__(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on___end__(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_alias(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_alias_error(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_aref(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_aref_field(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_arg_ambiguous(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_arg_paren(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_args_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_args_add_block(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_args_add_star(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_args_forward(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_args_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_array(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_aryptn(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_assign(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_assign_error(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_assoc_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_assoc_splat(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_backref(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_backtick(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backtick(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_bare_assoc_hash(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_begin(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_binary(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_block_var(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_blockarg(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_bodystmt(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_brace_block(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_break(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_call(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_case(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_class(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_comma(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_command(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_comment(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_const(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_const(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_const_path_field(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_const_path_ref(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_cvar(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_def(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_defined(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_defs(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_do_block(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_dot2(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_dot3(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_dyna_symbol(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_else(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_elsif(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embdoc(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embdoc_beg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embdoc_end(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_end(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embexpr_beg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embexpr_end(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_end(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_embvar(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embvar(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_ensure(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_excessed_comma(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_fcall(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_field(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_float(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_float(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_fndptn(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_for(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_gvar(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_gvar(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_heredoc_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_heredoc_end(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_end(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_hshptn(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_ident(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ident(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_if(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_if_mod(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_ignored_nl(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_ignored_sp(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_sp(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_imaginary(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_imaginary(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_in(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_int(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_int(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_ivar(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ivar(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_kw(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_kw(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_label(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_label_end(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label_end(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_lambda(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_lbrace(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbrace(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_lbracket(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbracket(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_lparen(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lparen(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_magic_comment(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_massign(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_method_add_arg(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_method_add_block(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mlhs_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mlhs_add_post(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mlhs_add_star(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mlhs_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mlhs_paren(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_module(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mrhs_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mrhs_add_star(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mrhs_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_mrhs_new_from_args(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_next(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_nl(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_nl(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_op(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_opassign(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_operator_ambiguous(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_param_error(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_params(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_period(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_period(value); end - - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_program(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_qsymbols_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_qsymbols_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_qwords_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_rational(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_rbrace(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbrace(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_rbracket(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbracket(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_redo(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_regexp_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_regexp_end(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_end(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_regexp_literal(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_regexp_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_rescue(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_rescue_mod(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_rest_param(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_retry(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_return(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_return0(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_rparen(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rparen(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_sclass(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_semicolon(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_semicolon(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_sp(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_sp(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_stmts_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_stmts_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_string_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_string_concat(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_string_content(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_string_dvar(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_string_embexpr(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_string_literal(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_super(*args); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_symbeg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbeg(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_symbol(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_symbol_literal(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_symbols_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_tlambda(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_tlambeg(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambeg(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_top_const_field(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_tstring_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_tstring_content(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_content(tok); end - # source://prism//lib/prism/translation/ripper.rb#34 - def on_tstring_end(value); end + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_end(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_unary(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_undef(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_unless(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_unless_mod(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_until(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_until_mod(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_var_alias(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_var_field(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_var_ref(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_vcall(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_void_stmt(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_when(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_while(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_while_mod(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_word_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_word_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_words_beg(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 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/sexp.rb#55 + def on_words_sep(tok); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_xstring_add(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_xstring_literal(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_xstring_new(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_yield(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # source://prism//lib/prism/translation/ripper/sexp.rb#47 def on_yield0(*args); end - # source://prism//lib/prism/translation/ripper.rb#28 + # 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.rb#43 +# source://prism//lib/prism/translation/ripper/sexp.rb#74 class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper::SexpBuilder + Result = type_member { { fixed: T::Array[T.untyped] } } + private - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def _dispatch_event_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def _dispatch_event_push(list, item); end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_args_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_args_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # 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.rb#46 + # 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.rb#50 + # 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.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_mrhs_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_qsymbols_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_qsymbols_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_qwords_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_qwords_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_regexp_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_regexp_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_stmts_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_stmts_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_string_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_symbols_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_symbols_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_word_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_word_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_words_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_words_new; end - # source://prism//lib/prism/translation/ripper.rb#50 + # source://prism//lib/prism/translation/ripper/sexp.rb#96 def on_xstring_add(list, item); end - # source://prism//lib/prism/translation/ripper.rb#46 + # source://prism//lib/prism/translation/ripper/sexp.rb#92 def on_xstring_new; end end +class Prism::Translation::RipperCompiler < Prism::Compiler + Result = type_member +end + +class Prism::Translation::RubyParser::Compiler < Prism::Compiler + Result = type_member { { fixed: Sexp } } +end + # Represents the use of the literal `true` keyword. # # true # ^^^^ # -# source://prism//lib/prism/node.rb#18139 +# source://prism//lib/prism/node.rb#19158 class Prism::TrueNode < ::Prism::Node # def initialize: (Location location) -> void # # @return [TrueNode] a new instance of TrueNode # - # source://prism//lib/prism/node.rb#18141 + # source://prism//lib/prism/node.rb#19160 + sig { params(source: Prism::Source, location: Prism::Location).void } def initialize(source, location); 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#19235 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18148 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#19167 + 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#18153 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#19172 + 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#18163 + # source://prism//lib/prism/node.rb#19182 + 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#18158 + # source://prism//lib/prism/node.rb#19177 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> TrueNode + # def copy: (?location: Location) -> TrueNode # - # source://prism//lib/prism/node.rb#18168 - sig { params(params: T.untyped).returns(Prism::TrueNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#19187 + sig { params(location: Prism::Location).returns(Prism::TrueNode) } + def copy(location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#19172 + sig { override.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 + # source://prism//lib/prism/node.rb#19195 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18185 + # source://prism//lib/prism/node.rb#19200 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -29115,7 +34799,8 @@ class Prism::TrueNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18204 + # source://prism//lib/prism/node.rb#19219 + sig { override.returns(Symbol) } def type; end class << self @@ -29126,7 +34811,7 @@ class Prism::TrueNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18214 + # source://prism//lib/prism/node.rb#19229 def type; end end end @@ -29136,81 +34821,103 @@ end # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18223 +# source://prism//lib/prism/node.rb#19244 class Prism::UndefNode < ::Prism::Node - # def initialize: (Array[Node] names, Location keyword_loc, Location location) -> void + # def initialize: (Array[SymbolNode | InterpolatedSymbolNode] names, Location keyword_loc, Location location) -> void # # @return [UndefNode] a new instance of UndefNode # - # source://prism//lib/prism/node.rb#18225 + # source://prism//lib/prism/node.rb#19246 + sig do + params( + source: Prism::Source, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(source, names, keyword_loc, location); 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#19340 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18234 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#19255 + 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#18239 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#19260 + 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#18249 + # source://prism//lib/prism/node.rb#19270 + 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#18244 + # source://prism//lib/prism/node.rb#19265 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> UndefNode + # def copy: (?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location, ?location: Location) -> UndefNode # - # source://prism//lib/prism/node.rb#18254 - sig { params(params: T.untyped).returns(Prism::UndefNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#19275 + sig do + params( + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location, + location: Prism::Location + ).returns(Prism::UndefNode) + end + def copy(names: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#19260 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[Node], keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[SymbolNode | InterpolatedSymbolNode], 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 + # source://prism//lib/prism/node.rb#19283 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18287 + # source://prism//lib/prism/node.rb#19303 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18282 + # source://prism//lib/prism/node.rb#19298 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18275 + # source://prism//lib/prism/node.rb#19291 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader names: Array[Node] + # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] # - # source://prism//lib/prism/node.rb#18272 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#19288 + sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } def names; end # Sometimes you want to check an instance of a node against a list of @@ -29228,7 +34935,8 @@ class Prism::UndefNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18308 + # source://prism//lib/prism/node.rb#19324 + sig { override.returns(Symbol) } def type; end class << self @@ -29239,7 +34947,7 @@ class Prism::UndefNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18318 + # source://prism//lib/prism/node.rb#19334 def type; end end end @@ -29252,119 +34960,172 @@ end # unless foo then bar end # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18330 +# source://prism//lib/prism/node.rb#19355 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 + # def initialize: (Location keyword_loc, Prism::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 + # source://prism//lib/prism/node.rb#19357 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); 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#19543 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18345 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#19370 + 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#18354 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#19379 + 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#18368 + # source://prism//lib/prism/node.rb#19393 + 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#18359 + # source://prism//lib/prism/node.rb#19384 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader consequent: ElseNode? + # The else clause of the unless expression, if present. + # + # unless cond then bar else baz end + # ^^^^^^^^ # - # source://prism//lib/prism/node.rb#18419 + # source://prism//lib/prism/node.rb#19457 sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end - # def copy: (**params) -> UnlessNode + # def copy: (?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: ElseNode?, ?end_keyword_loc: Location?, ?location: Location) -> UnlessNode # - # source://prism//lib/prism/node.rb#18373 - sig { params(params: T.untyped).returns(Prism::UnlessNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#19398 + sig do + params( + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + consequent: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::UnlessNode) + end + def copy(keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#19379 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, predicate: Prism::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 + # source://prism//lib/prism/node.rb#19406 + 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#18445 + # source://prism//lib/prism/node.rb#19486 sig { returns(T.nilable(String)) } def end_keyword; end - # attr_reader end_keyword_loc: Location? + # The location of the `end` keyword, if present. # - # source://prism//lib/prism/node.rb#18422 + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#19463 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18450 + # source://prism//lib/prism/node.rb#19491 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18435 + # source://prism//lib/prism/node.rb#19476 sig { returns(String) } def keyword; end - # attr_reader keyword_loc: Location + # The location of the `unless` keyword. + # + # unless cond then bar end + # ^^^^^^ + # + # bar unless cond + # ^^^^^^ # - # source://prism//lib/prism/node.rb#18395 + # source://prism//lib/prism/node.rb#19417 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader predicate: Node + # 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). # - # source://prism//lib/prism/node.rb#18401 + # unless cond then bar end + # ^^^^ + # + # bar unless cond + # ^^^^ + # + # source://prism//lib/prism/node.rb#19430 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#18349 + # source://prism//lib/prism/node.rb#19374 def set_newline_flag(newline_marked); end - # attr_reader statements: StatementsNode? + # The body of statements that will executed if the unless condition is + # falsey. Will be `nil` if no body is provided. # - # source://prism//lib/prism/node.rb#18416 + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#19451 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18440 + # source://prism//lib/prism/node.rb#19481 sig { returns(T.nilable(String)) } def then_keyword; end - # attr_reader then_keyword_loc: Location? + # The location of the `then` keyword, if present. + # unless cond then bar end ^^^^ # - # source://prism//lib/prism/node.rb#18404 + # source://prism//lib/prism/node.rb#19434 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end @@ -29383,7 +35144,8 @@ class Prism::UnlessNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18486 + # source://prism//lib/prism/node.rb#19527 + sig { override.returns(Symbol) } def type; end class << self @@ -29394,7 +35156,7 @@ class Prism::UnlessNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18496 + # source://prism//lib/prism/node.rb#19537 def type; end end end @@ -29407,109 +35169,137 @@ end # until foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18508 +# source://prism//lib/prism/node.rb#19561 class Prism::UntilNode < ::Prism::Node - # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Node predicate, StatementsNode? statements, Location location) -> void + # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void # # @return [UntilNode] a new instance of UntilNode # - # source://prism//lib/prism/node.rb#18510 + # source://prism//lib/prism/node.rb#19563 + sig do + params( + source: Prism::Source, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).void + end def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); 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#19707 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18522 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#19575 + 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#18599 + # source://prism//lib/prism/node.rb#19645 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)]) } + # source://prism//lib/prism/node.rb#19584 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18609 + # source://prism//lib/prism/node.rb#19655 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18580 + # source://prism//lib/prism/node.rb#19626 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18544 + # source://prism//lib/prism/node.rb#19597 + 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#18536 + # source://prism//lib/prism/node.rb#19589 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> UntilNode + # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> UntilNode # - # source://prism//lib/prism/node.rb#18549 - sig { params(params: T.untyped).returns(Prism::UntilNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#19602 + sig do + params( + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).returns(Prism::UntilNode) + end + def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#19584 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::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 + # source://prism//lib/prism/node.rb#19610 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18614 + # source://prism//lib/prism/node.rb#19660 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18604 + # source://prism//lib/prism/node.rb#19650 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18574 + # source://prism//lib/prism/node.rb#19619 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader predicate: Node + # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#18592 + # source://prism//lib/prism/node.rb#19639 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#18526 + # source://prism//lib/prism/node.rb#19579 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18595 + # source://prism//lib/prism/node.rb#19642 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -29528,14 +35318,15 @@ class Prism::UntilNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18645 + # source://prism//lib/prism/node.rb#19691 + sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18570 + # source://prism//lib/prism/node.rb#19615 sig { returns(Integer) } def flags; end @@ -29547,14 +35338,11 @@ class Prism::UntilNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18655 + # source://prism//lib/prism/node.rb#19701 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 @@ -29574,893 +35362,905 @@ Prism::VERSION = T.let(T.unsafe(nil), String) # end # end # -# source://prism//lib/prism/visitor.rb#50 +# source://prism//lib/prism/visitor.rb#54 class Prism::Visitor < ::Prism::BasicVisitor # Visit a AliasGlobalVariableNode node # - # source://prism//lib/prism/visitor.rb#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::InterpolatedXStringNode).void } def visit_interpolated_x_string_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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # 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#26 + # source://prism//lib/prism/visitor.rb#29 sig { params(node: Prism::YieldNode).void } def visit_yield_node(node); end end @@ -30472,89 +36272,127 @@ end # ^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#18666 +# source://prism//lib/prism/node.rb#19723 class Prism::WhenNode < ::Prism::Node - # def initialize: (Location keyword_loc, Array[Node] conditions, StatementsNode? statements, Location location) -> void + # def initialize: (Location keyword_loc, Array[Prism::node] conditions, Location? then_keyword_loc, 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 + # source://prism//lib/prism/node.rb#19725 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).void + end + def initialize(source, keyword_loc, conditions, then_keyword_loc, statements, location); 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#19852 + def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18678 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#19736 + 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#18683 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#19741 + 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#18696 + # source://prism//lib/prism/node.rb#19754 + 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#18688 + # source://prism//lib/prism/node.rb#19746 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader conditions: Array[Node] + # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#18726 + # source://prism//lib/prism/node.rb#19779 sig { returns(T::Array[Prism::Node]) } def conditions; end - # def copy: (**params) -> WhenNode + # def copy: (?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?location: Location) -> WhenNode # - # source://prism//lib/prism/node.rb#18701 - sig { params(params: T.untyped).returns(Prism::WhenNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#19759 + sig do + params( + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).returns(Prism::WhenNode) + end + def copy(keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#19741 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, 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 + # source://prism//lib/prism/node.rb#19767 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18738 + # source://prism//lib/prism/node.rb#19808 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18733 + # source://prism//lib/prism/node.rb#19798 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18720 + # source://prism//lib/prism/node.rb#19772 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18729 + # source://prism//lib/prism/node.rb#19795 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#19803 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#19782 + 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 @@ -30570,7 +36408,8 @@ class Prism::WhenNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18765 + # source://prism//lib/prism/node.rb#19836 + sig { override.returns(Symbol) } def type; end class << self @@ -30581,7 +36420,7 @@ class Prism::WhenNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18775 + # source://prism//lib/prism/node.rb#19846 def type; end end end @@ -30594,109 +36433,137 @@ end # while foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18787 +# source://prism//lib/prism/node.rb#19869 class Prism::WhileNode < ::Prism::Node - # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Node predicate, StatementsNode? statements, Location location) -> void + # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void # # @return [WhileNode] a new instance of WhileNode # - # source://prism//lib/prism/node.rb#18789 + # source://prism//lib/prism/node.rb#19871 + sig do + params( + source: Prism::Source, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).void + end def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); 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#20015 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18801 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#19883 + 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#18878 + # source://prism//lib/prism/node.rb#19953 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)]) } + # source://prism//lib/prism/node.rb#19892 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18888 + # source://prism//lib/prism/node.rb#19963 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18859 + # source://prism//lib/prism/node.rb#19934 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18823 + # source://prism//lib/prism/node.rb#19905 + 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#18815 + # source://prism//lib/prism/node.rb#19897 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> WhileNode + # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> WhileNode # - # source://prism//lib/prism/node.rb#18828 - sig { params(params: T.untyped).returns(Prism::WhileNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#19910 + sig do + params( + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + location: Prism::Location + ).returns(Prism::WhileNode) + end + def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#19892 + sig { override.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 } + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::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 + # source://prism//lib/prism/node.rb#19918 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#18893 + # source://prism//lib/prism/node.rb#19968 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18883 + # source://prism//lib/prism/node.rb#19958 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18853 + # source://prism//lib/prism/node.rb#19927 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader predicate: Node + # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#18871 + # source://prism//lib/prism/node.rb#19947 sig { returns(Prism::Node) } def predicate; end - # source://prism//lib/prism/node.rb#18805 + # source://prism//lib/prism/node.rb#19887 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18874 + # source://prism//lib/prism/node.rb#19950 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end @@ -30715,14 +36582,15 @@ class Prism::WhileNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#18924 + # source://prism//lib/prism/node.rb#19999 + sig { override.returns(Symbol) } def type; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18849 + # source://prism//lib/prism/node.rb#19923 sig { returns(Integer) } def flags; end @@ -30734,7 +36602,7 @@ class Prism::WhileNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#18934 + # source://prism//lib/prism/node.rb#20009 def type; end end end @@ -30744,7 +36612,7 @@ end # `foo` # ^^^^^ # -# source://prism//lib/prism/node.rb#18943 +# source://prism//lib/prism/node.rb#20029 class Prism::XStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -30752,83 +36620,110 @@ class Prism::XStringNode < ::Prism::Node # # @return [XStringNode] a new instance of XStringNode # - # source://prism//lib/prism/node.rb#18945 + # source://prism//lib/prism/node.rb#20031 + sig do + params( + source: Prism::Source, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); 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#20170 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18957 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#20043 + 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#18962 - sig { returns(T::Array[T.nilable(Prism::Node)]) } + # source://prism//lib/prism/node.rb#20048 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#19044 + # source://prism//lib/prism/node.rb#20124 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#19014 + # source://prism//lib/prism/node.rb#20094 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18972 + # source://prism//lib/prism/node.rb#20058 + 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#18967 + # source://prism//lib/prism/node.rb#20053 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#19039 + # source://prism//lib/prism/node.rb#20119 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#19008 + # source://prism//lib/prism/node.rb#20087 sig { returns(Prism::Location) } def content_loc; end - # def copy: (**params) -> XStringNode + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> XStringNode # - # source://prism//lib/prism/node.rb#18977 - sig { params(params: T.untyped).returns(Prism::XStringNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#20063 + sig do + params( + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).returns(Prism::XStringNode) + end + def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#20048 + sig { override.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 + # source://prism//lib/prism/node.rb#20071 + 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#19029 + # source://prism//lib/prism/node.rb#20109 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -30836,27 +36731,38 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#19024 + # source://prism//lib/prism/node.rb#20104 sig { returns(T::Boolean) } def forced_utf8_encoding?; end + sig { returns(T::Boolean) } + def heredoc?; end + # def inspect(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#19049 + # source://prism//lib/prism/node.rb#20129 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#19034 + # source://prism//lib/prism/node.rb#20114 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#19002 + # source://prism//lib/prism/node.rb#20080 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#72 + sig { returns(Prism::InterpolatedXStringNode) } + def to_interpolated; 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 @@ -30872,20 +36778,21 @@ class Prism::XStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19074 + # source://prism//lib/prism/node.rb#20154 + sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#19020 + # source://prism//lib/prism/node.rb#20101 sig { returns(String) } def unescaped; end - private + protected - # private attr_reader flags: Integer + # protected attr_reader flags: Integer # - # source://prism//lib/prism/node.rb#18998 + # source://prism//lib/prism/node.rb#20076 sig { returns(Integer) } def flags; end @@ -30897,7 +36804,7 @@ class Prism::XStringNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19084 + # source://prism//lib/prism/node.rb#20164 def type; end end end @@ -30907,104 +36814,130 @@ end # yield 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#19093 +# source://prism//lib/prism/node.rb#20184 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 + # source://prism//lib/prism/node.rb#20186 + sig do + params( + source: Prism::Source, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, location); 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#20327 + def ===(other); end + # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#19106 - sig { params(visitor: Prism::Visitor).void } + # source://prism//lib/prism/node.rb#20197 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#19166 + # source://prism//lib/prism/node.rb#20252 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)]) } + # source://prism//lib/prism/node.rb#20202 + 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#19123 + # source://prism//lib/prism/node.rb#20214 + 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#19116 + # source://prism//lib/prism/node.rb#20207 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (**params) -> YieldNode + # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?location: Location) -> YieldNode # - # source://prism//lib/prism/node.rb#19128 - sig { params(params: T.untyped).returns(Prism::YieldNode) } - def copy(**params); end + # source://prism//lib/prism/node.rb#20219 + sig do + params( + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + location: Prism::Location + ).returns(Prism::YieldNode) + end + def copy(keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); 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)]) } + # source://prism//lib/prism/node.rb#20202 + sig { override.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 + # source://prism//lib/prism/node.rb#20227 + 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(NodeInspector inspector) -> String # - # source://prism//lib/prism/node.rb#19197 + # source://prism//lib/prism/node.rb#20283 + sig { params(inspector: T.untyped).returns(String) } def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19182 + # source://prism//lib/prism/node.rb#20268 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19148 + # source://prism//lib/prism/node.rb#20232 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#19187 + # source://prism//lib/prism/node.rb#20273 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#19154 + # source://prism//lib/prism/node.rb#20239 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#19192 + # source://prism//lib/prism/node.rb#20278 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#19169 + # source://prism//lib/prism/node.rb#20255 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end @@ -31023,7 +36956,8 @@ class Prism::YieldNode < ::Prism::Node # # def type: () -> Symbol # - # source://prism//lib/prism/node.rb#19225 + # source://prism//lib/prism/node.rb#20311 + sig { override.returns(Symbol) } def type; end class << self @@ -31034,7 +36968,13 @@ class Prism::YieldNode < ::Prism::Node # # def self.type: () -> Symbol # - # source://prism//lib/prism/node.rb#19235 + # source://prism//lib/prism/node.rb#20321 def type; end end end + +# We keep this shim in here because our client libraries might not have +# ruby_parser in their bundle. +class Sexp < ::Array + Elem = type_member { { fixed: T.untyped }} +end diff --git a/sorbet/rbi/gems/psych@5.1.0.rbi b/sorbet/rbi/gems/psych@5.1.2.rbi similarity index 93% rename from sorbet/rbi/gems/psych@5.1.0.rbi rename to sorbet/rbi/gems/psych@5.1.2.rbi index 1b4025dd..5d651c68 100644 --- a/sorbet/rbi/gems/psych@5.1.0.rbi +++ b/sorbet/rbi/gems/psych@5.1.2.rbi @@ -239,9 +239,15 @@ module Psych # source://psych//lib/psych.rb#692 def add_tag(tag, klass); end - # source://psych//lib/psych.rb#726 + # source://psych//lib/psych.rb#708 def config; end + # source://psych//lib/psych.rb#720 + def domain_types; end + + # source://psych//lib/psych.rb#732 + def domain_types=(value); end + # call-seq: # Psych.dump(o) -> string of yaml # Psych.dump(o, options) -> string of yaml @@ -296,6 +302,12 @@ module Psych # source://psych//lib/psych.rb#595 def dump_stream(*objects); end + # source://psych//lib/psych.rb#716 + def dump_tags; end + + # source://psych//lib/psych.rb#728 + def dump_tags=(value); end + # Load +yaml+ in to a Ruby data structure. If multiple documents are # provided, the object contained in the first document will be returned. # +filename+ will be used in the exception message if any exception @@ -353,6 +365,12 @@ module Psych # source://psych//lib/psych.rb#626 def load_stream(yaml, filename: T.unsafe(nil), fallback: T.unsafe(nil), **kwargs); end + # source://psych//lib/psych.rb#712 + def load_tags; end + + # source://psych//lib/psych.rb#724 + def load_tags=(value); end + # Parse a YAML string in +yaml+. Returns the Psych::Nodes::Document. # +filename+ is used in the exception message if a Psych::SyntaxError is # raised. @@ -592,16 +610,6 @@ module Psych # # source://psych//lib/psych.rb#647 def unsafe_load_file(filename, **kwargs); end - - private - - # source://psych//lib/psych.rb#703 - def parse_caller(at); end - - # Workaround for emulating `warn '...', uplevel: 1` in Ruby 2.4 or lower. - # - # source://psych//lib/psych.rb#698 - def warn_with_uplevel(message, uplevel: T.unsafe(nil)); end end end @@ -1445,21 +1453,21 @@ class Psych::Visitors::DepthFirst < ::Psych::Visitors::Visitor def visit_Psych_Nodes_Stream(o); end end -# source://psych//lib/psych/visitors/yaml_tree.rb#541 +# source://psych//lib/psych/visitors/yaml_tree.rb#540 class Psych::Visitors::RestrictedYAMLTree < ::Psych::Visitors::YAMLTree # @return [RestrictedYAMLTree] a new instance of RestrictedYAMLTree # - # source://psych//lib/psych/visitors/yaml_tree.rb#553 + # source://psych//lib/psych/visitors/yaml_tree.rb#552 def initialize(emitter, ss, options); end - # source://psych//lib/psych/visitors/yaml_tree.rb#566 + # source://psych//lib/psych/visitors/yaml_tree.rb#565 def accept(target); end - # source://psych//lib/psych/visitors/yaml_tree.rb#578 + # source://psych//lib/psych/visitors/yaml_tree.rb#577 def visit_Symbol(sym); end end -# source://psych//lib/psych/visitors/yaml_tree.rb#542 +# source://psych//lib/psych/visitors/yaml_tree.rb#541 Psych::Visitors::RestrictedYAMLTree::DEFAULT_PERMITTED_CLASSES = T.let(T.unsafe(nil), Hash) # This class walks a YAML AST, converting each node to Ruby @@ -1565,174 +1573,174 @@ end class Psych::Visitors::YAMLTree < ::Psych::Visitors::Visitor # @return [YAMLTree] a new instance of YAMLTree # - # source://psych//lib/psych/visitors/yaml_tree.rb#56 + # source://psych//lib/psych/visitors/yaml_tree.rb#55 def initialize(emitter, ss, options); end - # source://psych//lib/psych/visitors/yaml_tree.rb#103 + # source://psych//lib/psych/visitors/yaml_tree.rb#102 def <<(object); end - # source://psych//lib/psych/visitors/yaml_tree.rb#123 + # source://psych//lib/psych/visitors/yaml_tree.rb#122 def accept(target); end - # source://psych//lib/psych/visitors/yaml_tree.rb#92 + # source://psych//lib/psych/visitors/yaml_tree.rb#91 def finish; end # Returns the value of attribute finished. # - # source://psych//lib/psych/visitors/yaml_tree.rb#45 + # source://psych//lib/psych/visitors/yaml_tree.rb#44 def finished; end # Returns the value of attribute finished. # - # source://psych//lib/psych/visitors/yaml_tree.rb#45 + # source://psych//lib/psych/visitors/yaml_tree.rb#44 def finished?; end - # source://psych//lib/psych/visitors/yaml_tree.rb#103 + # source://psych//lib/psych/visitors/yaml_tree.rb#102 def push(object); end - # source://psych//lib/psych/visitors/yaml_tree.rb#86 + # source://psych//lib/psych/visitors/yaml_tree.rb#85 def start(encoding = T.unsafe(nil)); end # Returns the value of attribute started. # - # source://psych//lib/psych/visitors/yaml_tree.rb#45 + # source://psych//lib/psych/visitors/yaml_tree.rb#44 def started; end # Returns the value of attribute started. # - # source://psych//lib/psych/visitors/yaml_tree.rb#45 + # source://psych//lib/psych/visitors/yaml_tree.rb#44 def started?; end - # source://psych//lib/psych/visitors/yaml_tree.rb#98 + # source://psych//lib/psych/visitors/yaml_tree.rb#97 def tree; end - # source://psych//lib/psych/visitors/yaml_tree.rb#351 + # source://psych//lib/psych/visitors/yaml_tree.rb#350 def visit_Array(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#377 + # source://psych//lib/psych/visitors/yaml_tree.rb#376 def visit_BasicObject(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#251 + # source://psych//lib/psych/visitors/yaml_tree.rb#250 def visit_BigDecimal(o); end # @raise [TypeError] # - # source://psych//lib/psych/visitors/yaml_tree.rb#314 + # source://psych//lib/psych/visitors/yaml_tree.rb#313 def visit_Class(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#224 + # source://psych//lib/psych/visitors/yaml_tree.rb#223 def visit_Complex(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#195 + # source://psych//lib/psych/visitors/yaml_tree.rb#194 def visit_Date(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#199 + # source://psych//lib/psych/visitors/yaml_tree.rb#198 def visit_DateTime(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#153 + # source://psych//lib/psych/visitors/yaml_tree.rb#152 def visit_Delegator(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#148 + # source://psych//lib/psych/visitors/yaml_tree.rb#147 def visit_Encoding(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#359 + # source://psych//lib/psych/visitors/yaml_tree.rb#358 def visit_Enumerator(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#183 + # source://psych//lib/psych/visitors/yaml_tree.rb#182 def visit_Exception(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#234 + # source://psych//lib/psych/visitors/yaml_tree.rb#233 def visit_FalseClass(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#240 + # source://psych//lib/psych/visitors/yaml_tree.rb#239 def visit_Float(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#327 + # source://psych//lib/psych/visitors/yaml_tree.rb#326 def visit_Hash(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#234 + # source://psych//lib/psych/visitors/yaml_tree.rb#233 def visit_Integer(o); end # @raise [TypeError] # - # source://psych//lib/psych/visitors/yaml_tree.rb#309 + # source://psych//lib/psych/visitors/yaml_tree.rb#308 def visit_Module(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#187 + # source://psych//lib/psych/visitors/yaml_tree.rb#186 def visit_NameError(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#365 + # source://psych//lib/psych/visitors/yaml_tree.rb#364 def visit_NilClass(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#153 + # source://psych//lib/psych/visitors/yaml_tree.rb#152 def visit_Object(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#140 + # source://psych//lib/psych/visitors/yaml_tree.rb#139 def visit_Psych_Omap(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#340 + # source://psych//lib/psych/visitors/yaml_tree.rb#339 def visit_Psych_Set(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#319 + # source://psych//lib/psych/visitors/yaml_tree.rb#318 def visit_Range(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#211 + # source://psych//lib/psych/visitors/yaml_tree.rb#210 def visit_Rational(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#191 + # source://psych//lib/psych/visitors/yaml_tree.rb#190 def visit_Regexp(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#255 + # source://psych//lib/psych/visitors/yaml_tree.rb#254 def visit_String(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#169 + # source://psych//lib/psych/visitors/yaml_tree.rb#168 def visit_Struct(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#369 + # source://psych//lib/psych/visitors/yaml_tree.rb#368 def visit_Symbol(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#206 + # source://psych//lib/psych/visitors/yaml_tree.rb#205 def visit_Time(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#234 + # source://psych//lib/psych/visitors/yaml_tree.rb#233 def visit_TrueClass(o); end private # @return [Boolean] # - # source://psych//lib/psych/visitors/yaml_tree.rb#391 + # source://psych//lib/psych/visitors/yaml_tree.rb#390 def binary?(string); end - # source://psych//lib/psych/visitors/yaml_tree.rb#498 + # source://psych//lib/psych/visitors/yaml_tree.rb#497 def dump_coder(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#467 + # source://psych//lib/psych/visitors/yaml_tree.rb#466 def dump_exception(o, msg); end - # source://psych//lib/psych/visitors/yaml_tree.rb#533 + # source://psych//lib/psych/visitors/yaml_tree.rb#532 def dump_ivars(target); end - # source://psych//lib/psych/visitors/yaml_tree.rb#464 + # source://psych//lib/psych/visitors/yaml_tree.rb#463 def dump_list(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#511 + # source://psych//lib/psych/visitors/yaml_tree.rb#510 def emit_coder(c, o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#485 + # source://psych//lib/psych/visitors/yaml_tree.rb#484 def format_time(time, utc = T.unsafe(nil)); end - # source://psych//lib/psych/visitors/yaml_tree.rb#493 + # source://psych//lib/psych/visitors/yaml_tree.rb#492 def register(target, yaml_obj); end - # source://psych//lib/psych/visitors/yaml_tree.rb#395 + # source://psych//lib/psych/visitors/yaml_tree.rb#394 def visit_array_subclass(o); end - # source://psych//lib/psych/visitors/yaml_tree.rb#426 + # source://psych//lib/psych/visitors/yaml_tree.rb#425 def visit_hash_subclass(o); end class << self - # source://psych//lib/psych/visitors/yaml_tree.rb#49 + # source://psych//lib/psych/visitors/yaml_tree.rb#48 def create(options = T.unsafe(nil), emitter = T.unsafe(nil)); end end end @@ -1744,15 +1752,15 @@ class Psych::Visitors::YAMLTree::Registrar # source://psych//lib/psych/visitors/yaml_tree.rb#17 def initialize; end - # source://psych//lib/psych/visitors/yaml_tree.rb#36 + # source://psych//lib/psych/visitors/yaml_tree.rb#35 def id_for(target); end # @return [Boolean] # - # source://psych//lib/psych/visitors/yaml_tree.rb#30 + # source://psych//lib/psych/visitors/yaml_tree.rb#29 def key?(target); end - # source://psych//lib/psych/visitors/yaml_tree.rb#40 + # source://psych//lib/psych/visitors/yaml_tree.rb#39 def node_for(target); end # source://psych//lib/psych/visitors/yaml_tree.rb#24 diff --git a/sorbet/rbi/gems/public_suffix@5.0.4.rbi b/sorbet/rbi/gems/public_suffix@5.0.5.rbi similarity index 100% rename from sorbet/rbi/gems/public_suffix@5.0.4.rbi rename to sorbet/rbi/gems/public_suffix@5.0.5.rbi diff --git a/sorbet/rbi/gems/rack@3.0.9.1.rbi b/sorbet/rbi/gems/rack@3.0.10.rbi similarity index 99% rename from sorbet/rbi/gems/rack@3.0.9.1.rbi rename to sorbet/rbi/gems/rack@3.0.10.rbi index 7f5b8469..3c68a85c 100644 --- a/sorbet/rbi/gems/rack@3.0.9.1.rbi +++ b/sorbet/rbi/gems/rack@3.0.10.rbi @@ -2442,10 +2442,10 @@ class Rack::Multipart::Parser # source://rack//lib/rack/multipart/parser.rb#205 def initialize(boundary, tempfile, bufsize, query_parser); end - # source://rack//lib/rack/multipart/parser.rb#220 + # source://rack//lib/rack/multipart/parser.rb#221 def parse(io); end - # source://rack//lib/rack/multipart/parser.rb#243 + # source://rack//lib/rack/multipart/parser.rb#244 def result; end # Returns the value of attribute state. @@ -2460,21 +2460,21 @@ class Rack::Multipart::Parser # end of the boundary. If we don't find the start or end of the # boundary, clear the buffer and return nil. # - # source://rack//lib/rack/multipart/parser.rb#346 + # source://rack//lib/rack/multipart/parser.rb#354 def consume_boundary; end # From WEBrick::HTTPUtils # - # source://rack//lib/rack/multipart/parser.rb#255 + # source://rack//lib/rack/multipart/parser.rb#256 def dequote(str); end - # source://rack//lib/rack/multipart/parser.rb#355 + # source://rack//lib/rack/multipart/parser.rb#363 def get_filename(head); end - # source://rack//lib/rack/multipart/parser.rb#290 + # source://rack//lib/rack/multipart/parser.rb#298 def handle_consume_token; end - # source://rack//lib/rack/multipart/parser.rb#427 + # source://rack//lib/rack/multipart/parser.rb#435 def handle_empty_content!(content); end # This handles the initial parser state. We read until we find the starting @@ -2485,19 +2485,19 @@ class Rack::Multipart::Parser # boundary. The client would have to deliberately craft a response # with the opening boundary beyond the buffer size for that to happen. # - # source://rack//lib/rack/multipart/parser.rb#274 + # source://rack//lib/rack/multipart/parser.rb#275 def handle_fast_forward; end - # source://rack//lib/rack/multipart/parser.rb#323 + # source://rack//lib/rack/multipart/parser.rb#331 def handle_mime_body; end - # source://rack//lib/rack/multipart/parser.rb#300 + # source://rack//lib/rack/multipart/parser.rb#308 def handle_mime_head; end - # source://rack//lib/rack/multipart/parser.rb#261 + # source://rack//lib/rack/multipart/parser.rb#262 def read_data(io, outbuf); end - # source://rack//lib/rack/multipart/parser.rb#393 + # source://rack//lib/rack/multipart/parser.rb#401 def tag_multipart_encoding(filename, content_type, name, body); end class << self @@ -2523,7 +2523,7 @@ class Rack::Multipart::Parser::BoundedIO def read(size, outbuf = T.unsafe(nil)); end end -# source://rack//lib/rack/multipart/parser.rb#390 +# source://rack//lib/rack/multipart/parser.rb#398 Rack::Multipart::Parser::CHARSET = T.let(T.unsafe(nil), String) # source://rack//lib/rack/multipart/parser.rb#112 diff --git a/sorbet/rbi/gems/rbi@0.1.9.rbi b/sorbet/rbi/gems/rbi@0.1.12.rbi similarity index 90% rename from sorbet/rbi/gems/rbi@0.1.9.rbi rename to sorbet/rbi/gems/rbi@0.1.12.rbi index 62908f14..7e121a97 100644 --- a/sorbet/rbi/gems/rbi@0.1.9.rbi +++ b/sorbet/rbi/gems/rbi@0.1.12.rbi @@ -7,13 +7,13 @@ # source://rbi//lib/rbi/loc.rb#4 module RBI; end -# source://rbi//lib/rbi/model.rb#968 +# source://rbi//lib/rbi/model.rb#1041 class RBI::Arg < ::RBI::Node - # source://rbi//lib/rbi/model.rb#980 + # source://rbi//lib/rbi/model.rb#1053 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 + # source://rbi//lib/rbi/model.rb#1059 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -21,11 +21,11 @@ class RBI::Arg < ::RBI::Node sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#991 + # source://rbi//lib/rbi/model.rb#1064 sig { returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#972 + # source://rbi//lib/rbi/model.rb#1045 sig { returns(::String) } def value; end end @@ -197,9 +197,9 @@ class RBI::BlankLine < ::RBI::Comment def accept_printer(v); end end -# source://rbi//lib/rbi/model.rb#741 +# source://rbi//lib/rbi/model.rb#814 class RBI::BlockParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#752 + # source://rbi//lib/rbi/model.rb#825 sig do params( name: ::String, @@ -210,7 +210,7 @@ class RBI::BlockParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#763 + # source://rbi//lib/rbi/model.rb#836 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -222,7 +222,7 @@ class RBI::BlockParam < ::RBI::Param 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 + # source://rbi//lib/rbi/model.rb#831 sig { override.returns(::String) } def to_s; end end @@ -379,11 +379,11 @@ class RBI::Const < ::RBI::NodeWithComments def value; end end -# source://rbi//lib/rbi/model.rb#816 +# source://rbi//lib/rbi/model.rb#889 class RBI::Extend < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#828 + # source://rbi//lib/rbi/model.rb#901 sig do params( name: ::String, @@ -403,7 +403,7 @@ class RBI::Extend < ::RBI::Mixin sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#834 + # source://rbi//lib/rbi/model.rb#907 sig { override.returns(::String) } def to_s; end end @@ -568,11 +568,11 @@ end # Sorbet's misc. # -# source://rbi//lib/rbi/model.rb#1294 +# source://rbi//lib/rbi/model.rb#1372 class RBI::Helper < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1308 + # source://rbi//lib/rbi/model.rb#1386 sig do params( name: ::String, @@ -595,20 +595,20 @@ class RBI::Helper < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1298 + # source://rbi//lib/rbi/model.rb#1376 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1315 + # source://rbi//lib/rbi/model.rb#1393 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#793 +# source://rbi//lib/rbi/model.rb#866 class RBI::Include < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#805 + # source://rbi//lib/rbi/model.rb#878 sig do params( name: ::String, @@ -628,7 +628,7 @@ class RBI::Include < ::RBI::Mixin sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#811 + # source://rbi//lib/rbi/model.rb#884 sig { override.returns(::String) } def to_s; end end @@ -668,7 +668,7 @@ class RBI::Index < ::RBI::Visitor end end -# A Node that can be refered to by a unique ID inside an index +# A Node that can be referred to by a unique ID inside an index # # @abstract Subclasses must implement the `abstract` methods below. # @@ -688,13 +688,13 @@ module RBI::Indexable def index_ids; end end -# source://rbi//lib/rbi/model.rb#996 +# source://rbi//lib/rbi/model.rb#1069 class RBI::KwArg < ::RBI::Arg - # source://rbi//lib/rbi/model.rb#1009 + # source://rbi//lib/rbi/model.rb#1082 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 + # source://rbi//lib/rbi/model.rb#1088 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -702,18 +702,18 @@ class RBI::KwArg < ::RBI::Arg sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1000 + # source://rbi//lib/rbi/model.rb#1073 sig { returns(::String) } def keyword; end - # source://rbi//lib/rbi/model.rb#1020 + # source://rbi//lib/rbi/model.rb#1093 sig { returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#682 +# source://rbi//lib/rbi/model.rb#755 class RBI::KwOptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#697 + # source://rbi//lib/rbi/model.rb#770 sig do params( name: ::String, @@ -725,7 +725,7 @@ class RBI::KwOptParam < ::RBI::Param end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#709 + # source://rbi//lib/rbi/model.rb#782 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -737,18 +737,18 @@ class RBI::KwOptParam < ::RBI::Param 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 + # source://rbi//lib/rbi/model.rb#777 sig { override.returns(::String) } def to_s; end - # source://rbi//lib/rbi/model.rb#686 + # source://rbi//lib/rbi/model.rb#759 sig { returns(::String) } def value; end end -# source://rbi//lib/rbi/model.rb#655 +# source://rbi//lib/rbi/model.rb#728 class RBI::KwParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#666 + # source://rbi//lib/rbi/model.rb#739 sig do params( name: ::String, @@ -759,7 +759,7 @@ class RBI::KwParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#677 + # source://rbi//lib/rbi/model.rb#750 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -771,14 +771,14 @@ class RBI::KwParam < ::RBI::Param 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 + # source://rbi//lib/rbi/model.rb#745 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#714 +# source://rbi//lib/rbi/model.rb#787 class RBI::KwRestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#725 + # source://rbi//lib/rbi/model.rb#798 sig do params( name: ::String, @@ -789,7 +789,7 @@ class RBI::KwRestParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#736 + # source://rbi//lib/rbi/model.rb#809 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -801,7 +801,7 @@ class RBI::KwRestParam < ::RBI::Param 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 + # source://rbi//lib/rbi/model.rb#804 sig { override.returns(::String) } def to_s; end end @@ -907,11 +907,55 @@ class RBI::Method < ::RBI::NodeWithComments sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end + # source://rbi//lib/rbi/model.rb#568 + sig { params(name: ::String).void } + def add_block_param(name); end + + # source://rbi//lib/rbi/model.rb#558 + sig { params(name: ::String, default_value: ::String).void } + def add_kw_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#553 + sig { params(name: ::String).void } + def add_kw_param(name); end + + # source://rbi//lib/rbi/model.rb#563 + sig { params(name: ::String).void } + def add_kw_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#543 + sig { params(name: ::String, default_value: ::String).void } + def add_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#538 + sig { params(name: ::String).void } + def add_param(name); end + + # source://rbi//lib/rbi/model.rb#548 + sig { params(name: ::String).void } + def add_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#585 + 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), + 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#461 sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#538 + # source://rbi//lib/rbi/model.rb#611 sig { returns(::String) } def fully_qualified_name; end @@ -962,7 +1006,7 @@ class RBI::Method < ::RBI::NodeWithComments # source://rbi//lib/rbi/model.rb#499 def sigs=(_arg0); end - # source://rbi//lib/rbi/model.rb#547 + # source://rbi//lib/rbi/model.rb#620 sig { override.returns(::String) } def to_s; end @@ -976,11 +1020,11 @@ class RBI::Method < ::RBI::NodeWithComments def visibility=(_arg0); end end -# source://rbi//lib/rbi/model.rb#1355 +# source://rbi//lib/rbi/model.rb#1433 class RBI::MixesInClassMethods < ::RBI::Mixin include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1367 + # source://rbi//lib/rbi/model.rb#1445 sig do params( name: ::String, @@ -1000,7 +1044,7 @@ class RBI::MixesInClassMethods < ::RBI::Mixin sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1373 + # source://rbi//lib/rbi/model.rb#1451 sig { override.returns(::String) } def to_s; end end @@ -1009,11 +1053,11 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#770 +# source://rbi//lib/rbi/model.rb#843 class RBI::Mixin < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#787 + # source://rbi//lib/rbi/model.rb#860 sig do params( name: ::String, @@ -1032,7 +1076,7 @@ class RBI::Mixin < ::RBI::NodeWithComments sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#777 + # source://rbi//lib/rbi/model.rb#850 sig { returns(T::Array[::String]) } def names; end end @@ -1202,9 +1246,9 @@ class RBI::NodeWithComments < ::RBI::Node def version_requirements; end end -# source://rbi//lib/rbi/model.rb#601 +# source://rbi//lib/rbi/model.rb#674 class RBI::OptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#616 + # source://rbi//lib/rbi/model.rb#689 sig do params( name: ::String, @@ -1216,7 +1260,7 @@ class RBI::OptParam < ::RBI::Param end def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#623 + # source://rbi//lib/rbi/model.rb#696 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -1228,18 +1272,18 @@ class RBI::OptParam < ::RBI::Param 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 + # source://rbi//lib/rbi/model.rb#678 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 +# source://rbi//lib/rbi/model.rb#625 class RBI::Param < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#568 + # source://rbi//lib/rbi/model.rb#641 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 @@ -1251,7 +1295,7 @@ class RBI::Param < ::RBI::NodeWithComments sig { returns(T::Array[::String]) } def comments_lines; end - # source://rbi//lib/rbi/model.rb#559 + # source://rbi//lib/rbi/model.rb#632 sig { returns(::String) } def name; end @@ -1259,7 +1303,7 @@ class RBI::Param < ::RBI::NodeWithComments sig { params(v: ::RBI::Printer, last: T::Boolean).void } def print_comment_leading_space(v, last:); end - # source://rbi//lib/rbi/model.rb#574 + # source://rbi//lib/rbi/model.rb#647 sig { override.returns(::String) } def to_s; end end @@ -1566,9 +1610,9 @@ class RBI::Printer < ::RBI::Visitor def visit_file(file); end end -# source://rbi//lib/rbi/model.rb#909 +# source://rbi//lib/rbi/model.rb#982 class RBI::Private < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#919 + # source://rbi//lib/rbi/model.rb#992 sig do params( loc: T.nilable(::RBI::Loc), @@ -1579,9 +1623,9 @@ class RBI::Private < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#893 +# source://rbi//lib/rbi/model.rb#966 class RBI::Protected < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#903 + # source://rbi//lib/rbi/model.rb#976 sig do params( loc: T.nilable(::RBI::Loc), @@ -1592,9 +1636,9 @@ class RBI::Protected < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#877 +# source://rbi//lib/rbi/model.rb#950 class RBI::Public < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#887 + # source://rbi//lib/rbi/model.rb#960 sig do params( loc: T.nilable(::RBI::Loc), @@ -1605,9 +1649,9 @@ class RBI::Public < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#579 +# source://rbi//lib/rbi/model.rb#652 class RBI::ReqParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#590 + # source://rbi//lib/rbi/model.rb#663 sig do params( name: ::String, @@ -1618,16 +1662,16 @@ class RBI::ReqParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#596 + # source://rbi//lib/rbi/model.rb#669 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end end -# source://rbi//lib/rbi/model.rb#1378 +# source://rbi//lib/rbi/model.rb#1456 class RBI::RequiresAncestor < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1391 + # source://rbi//lib/rbi/model.rb#1469 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 @@ -1639,18 +1683,18 @@ class RBI::RequiresAncestor < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1382 + # source://rbi//lib/rbi/model.rb#1460 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1397 + # source://rbi//lib/rbi/model.rb#1475 sig { override.returns(::String) } def to_s; end end -# source://rbi//lib/rbi/model.rb#628 +# source://rbi//lib/rbi/model.rb#701 class RBI::RestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#639 + # source://rbi//lib/rbi/model.rb#712 sig do params( name: ::String, @@ -1661,7 +1705,7 @@ class RBI::RestParam < ::RBI::Param end def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#650 + # source://rbi//lib/rbi/model.rb#723 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -1673,7 +1717,7 @@ class RBI::RestParam < ::RBI::Param 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 + # source://rbi//lib/rbi/model.rb#718 sig { override.returns(::String) } def to_s; end end @@ -1900,7 +1944,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -2117,7 +2161,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -2231,11 +2275,11 @@ end # Sends # -# source://rbi//lib/rbi/model.rb#927 +# source://rbi//lib/rbi/model.rb#1000 class RBI::Send < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#945 + # source://rbi//lib/rbi/model.rb#1018 sig do params( method: ::String, @@ -2247,11 +2291,11 @@ class RBI::Send < ::RBI::NodeWithComments 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 + # source://rbi//lib/rbi/model.rb#1026 sig { params(arg: ::RBI::Arg).void } def <<(arg); end - # source://rbi//lib/rbi/model.rb#958 + # source://rbi//lib/rbi/model.rb#1031 sig { params(other: T.nilable(::Object)).returns(T::Boolean) } def ==(other); end @@ -2259,7 +2303,7 @@ class RBI::Send < ::RBI::NodeWithComments sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#934 + # source://rbi//lib/rbi/model.rb#1007 sig { returns(T::Array[::RBI::Arg]) } def args; end @@ -2271,20 +2315,20 @@ class RBI::Send < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#931 + # source://rbi//lib/rbi/model.rb#1004 sig { returns(::String) } def method; end - # source://rbi//lib/rbi/model.rb#963 + # source://rbi//lib/rbi/model.rb#1036 sig { returns(::String) } def to_s; end end # Sorbet's sigs # -# source://rbi//lib/rbi/model.rb#1027 +# source://rbi//lib/rbi/model.rb#1100 class RBI::Sig < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1059 + # source://rbi//lib/rbi/model.rb#1132 sig do params( params: T::Array[::RBI::SigParam], @@ -2301,11 +2345,11 @@ class RBI::Sig < ::RBI::Node 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 + # source://rbi//lib/rbi/model.rb#1157 sig { params(param: ::RBI::SigParam).void } def <<(param); end - # source://rbi//lib/rbi/model.rb#1089 + # source://rbi//lib/rbi/model.rb#1167 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end @@ -2313,76 +2357,80 @@ class RBI::Sig < ::RBI::Node sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1043 + # source://rbi//lib/rbi/model.rb#1162 + sig { params(name: ::String, type: ::String).void } + def add_param(name, type); end + + # source://rbi//lib/rbi/model.rb#1116 sig { returns(T.nilable(::Symbol)) } def checked; end # @return [Symbol, nil] # - # source://rbi//lib/rbi/model.rb#1043 + # source://rbi//lib/rbi/model.rb#1116 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 + # source://rbi//lib/rbi/model.rb#1110 sig { returns(T::Boolean) } def is_abstract; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 def is_abstract=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 def is_final; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 def is_final=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 def is_overridable; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 def is_overridable=(_arg0); end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 def is_override; end # @return [Boolean] # - # source://rbi//lib/rbi/model.rb#1037 + # source://rbi//lib/rbi/model.rb#1110 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 + # source://rbi//lib/rbi/model.rb#1104 sig { returns(T::Array[::RBI::SigParam]) } def params; end - # source://rbi//lib/rbi/model.rb#1034 + # source://rbi//lib/rbi/model.rb#1107 sig { returns(T.nilable(::String)) } def return_type; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#1034 + # source://rbi//lib/rbi/model.rb#1107 def return_type=(_arg0); end - # source://rbi//lib/rbi/model.rb#1040 + # source://rbi//lib/rbi/model.rb#1113 sig { returns(T::Array[::String]) } def type_params; end @@ -2401,9 +2449,9 @@ class RBI::Sig < ::RBI::Node def sig_modifiers; end end -# source://rbi//lib/rbi/model.rb#1098 +# source://rbi//lib/rbi/model.rb#1176 class RBI::SigParam < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1113 + # source://rbi//lib/rbi/model.rb#1191 sig do params( name: ::String, @@ -2415,7 +2463,7 @@ class RBI::SigParam < ::RBI::NodeWithComments end def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#1121 + # source://rbi//lib/rbi/model.rb#1199 sig { params(other: ::Object).returns(T::Boolean) } def ==(other); end @@ -2427,7 +2475,7 @@ class RBI::SigParam < ::RBI::NodeWithComments sig { returns(T::Array[::String]) } def comments_lines; end - # source://rbi//lib/rbi/model.rb#1102 + # source://rbi//lib/rbi/model.rb#1180 sig { returns(::String) } def name; end @@ -2437,7 +2485,7 @@ class RBI::SigParam < ::RBI::NodeWithComments # @return [String] # - # source://rbi//lib/rbi/model.rb#1102 + # source://rbi//lib/rbi/model.rb#1180 def type; end end @@ -2519,9 +2567,9 @@ end # Sorbet's T::Enum # -# source://rbi//lib/rbi/model.rb#1239 +# source://rbi//lib/rbi/model.rb#1317 class RBI::TEnum < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1250 + # source://rbi//lib/rbi/model.rb#1328 sig do params( name: ::String, @@ -2533,11 +2581,11 @@ class RBI::TEnum < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#1256 +# source://rbi//lib/rbi/model.rb#1334 class RBI::TEnumBlock < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1270 + # source://rbi//lib/rbi/model.rb#1348 sig do params( names: T::Array[::String], @@ -2548,7 +2596,7 @@ class RBI::TEnumBlock < ::RBI::NodeWithComments end def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi//lib/rbi/model.rb#1282 + # source://rbi//lib/rbi/model.rb#1360 sig { params(name: ::String).void } def <<(name); end @@ -2556,7 +2604,7 @@ class RBI::TEnumBlock < ::RBI::NodeWithComments sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1277 + # source://rbi//lib/rbi/model.rb#1355 sig { returns(T::Boolean) } def empty?; end @@ -2568,20 +2616,20 @@ class RBI::TEnumBlock < ::RBI::NodeWithComments sig { override.params(other: ::RBI::Node).void } def merge_with(other); end - # source://rbi//lib/rbi/model.rb#1260 + # source://rbi//lib/rbi/model.rb#1338 sig { returns(T::Array[::String]) } def names; end - # source://rbi//lib/rbi/model.rb#1287 + # source://rbi//lib/rbi/model.rb#1365 sig { override.returns(::String) } def to_s; end end # Sorbet's T::Struct # -# source://rbi//lib/rbi/model.rb#1128 +# source://rbi//lib/rbi/model.rb#1206 class RBI::TStruct < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1139 + # source://rbi//lib/rbi/model.rb#1217 sig do params( name: ::String, @@ -2593,11 +2641,11 @@ class RBI::TStruct < ::RBI::Class def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end -# source://rbi//lib/rbi/model.rb#1177 +# source://rbi//lib/rbi/model.rb#1255 class RBI::TStructConst < ::RBI::TStructField include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1190 + # source://rbi//lib/rbi/model.rb#1268 sig do params( name: ::String, @@ -2614,7 +2662,7 @@ class RBI::TStructConst < ::RBI::TStructField sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1196 + # source://rbi//lib/rbi/model.rb#1274 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -2622,18 +2670,18 @@ class RBI::TStructConst < ::RBI::TStructField sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1202 + # source://rbi//lib/rbi/model.rb#1280 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 +# source://rbi//lib/rbi/model.rb#1223 class RBI::TStructField < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#1166 + # source://rbi//lib/rbi/model.rb#1244 sig do params( name: ::String, @@ -2653,46 +2701,46 @@ class RBI::TStructField < ::RBI::NodeWithComments sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1155 + # source://rbi//lib/rbi/model.rb#1233 sig { returns(T.nilable(::String)) } def default; end # @return [String, nil] # - # source://rbi//lib/rbi/model.rb#1155 + # source://rbi//lib/rbi/model.rb#1233 def default=(_arg0); end # @abstract # - # source://rbi//lib/rbi/model.rb#1174 + # source://rbi//lib/rbi/model.rb#1252 sig { abstract.returns(T::Array[::String]) } def fully_qualified_names; end - # source://rbi//lib/rbi/model.rb#1152 + # source://rbi//lib/rbi/model.rb#1230 sig { returns(::String) } def name; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1152 + # source://rbi//lib/rbi/model.rb#1230 def name=(_arg0); end # @return [String] # - # source://rbi//lib/rbi/model.rb#1152 + # source://rbi//lib/rbi/model.rb#1230 def type; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1152 + # source://rbi//lib/rbi/model.rb#1230 def type=(_arg0); end end -# source://rbi//lib/rbi/model.rb#1207 +# source://rbi//lib/rbi/model.rb#1285 class RBI::TStructProp < ::RBI::TStructField include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1220 + # source://rbi//lib/rbi/model.rb#1298 sig do params( name: ::String, @@ -2709,7 +2757,7 @@ class RBI::TStructProp < ::RBI::TStructField sig { override.params(other: ::RBI::Node).returns(T::Boolean) } def compatible_with?(other); end - # source://rbi//lib/rbi/model.rb#1226 + # source://rbi//lib/rbi/model.rb#1304 sig { override.returns(T::Array[::String]) } def fully_qualified_names; end @@ -2717,7 +2765,7 @@ class RBI::TStructProp < ::RBI::TStructField sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1232 + # source://rbi//lib/rbi/model.rb#1310 sig { override.returns(::String) } def to_s; end end @@ -2750,7 +2798,7 @@ class RBI::Tree < ::RBI::NodeWithComments 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 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#38 sig do params( name: ::String, @@ -2760,19 +2808,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_class(name, superclass_name: T.unsafe(nil), &block); end - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#45 + # source://tapioca/0.13.3/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 + # source://tapioca/0.13.3/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 + # source://tapioca/0.13.3/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 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#89 sig do params( name: ::String, @@ -2785,19 +2833,36 @@ class RBI::Tree < ::RBI::NodeWithComments 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 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#113 + sig do + params( + name: ::String, + sigs: T::Array[::RBI::Sig], + parameters: T::Array[::RBI::Param], + class_method: T::Boolean, + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] + ).void + end + def create_method_with_sigs(name, sigs:, parameters: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://tapioca/0.13.3/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 + # source://tapioca/0.13.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.12.0/lib/tapioca/rbi_ext/model.rb#9 + # source://tapioca/0.13.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.12.0/lib/tapioca/rbi_ext/model.rb#74 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#134 + sig { params(parameters: T::Hash[T.any(::String, ::Symbol), ::String], return_type: ::String).returns(::RBI::Sig) } + def create_sig(parameters:, return_type: T.unsafe(nil)); end + + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#74 sig do params( name: ::String, @@ -2863,20 +2928,20 @@ class RBI::Tree < ::RBI::NodeWithComments private - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#116 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#149 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 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#144 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end -# source://rbi//lib/rbi/model.rb#1320 +# source://rbi//lib/rbi/model.rb#1398 class RBI::TypeMember < ::RBI::NodeWithComments include ::RBI::Indexable - # source://rbi//lib/rbi/model.rb#1335 + # source://rbi//lib/rbi/model.rb#1413 sig do params( name: ::String, @@ -2892,7 +2957,7 @@ class RBI::TypeMember < ::RBI::NodeWithComments sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#1343 + # source://rbi//lib/rbi/model.rb#1421 sig { returns(::String) } def fully_qualified_name; end @@ -2900,17 +2965,17 @@ class RBI::TypeMember < ::RBI::NodeWithComments sig { override.returns(T::Array[::String]) } def index_ids; end - # source://rbi//lib/rbi/model.rb#1324 + # source://rbi//lib/rbi/model.rb#1402 sig { returns(::String) } def name; end - # source://rbi//lib/rbi/model.rb#1350 + # source://rbi//lib/rbi/model.rb#1428 sig { override.returns(::String) } def to_s; end # @return [String] # - # source://rbi//lib/rbi/model.rb#1324 + # source://rbi//lib/rbi/model.rb#1402 def value; end end @@ -2936,15 +3001,15 @@ RBI::VERSION = T.let(T.unsafe(nil), String) # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://rbi//lib/rbi/model.rb#841 +# source://rbi//lib/rbi/model.rb#914 class RBI::Visibility < ::RBI::NodeWithComments abstract! - # source://rbi//lib/rbi/model.rb#851 + # source://rbi//lib/rbi/model.rb#924 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 + # source://rbi//lib/rbi/model.rb#930 sig { params(other: ::RBI::Visibility).returns(T::Boolean) } def ==(other); end @@ -2952,19 +3017,19 @@ class RBI::Visibility < ::RBI::NodeWithComments sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi//lib/rbi/model.rb#872 + # source://rbi//lib/rbi/model.rb#945 sig { returns(T::Boolean) } def private?; end - # source://rbi//lib/rbi/model.rb#867 + # source://rbi//lib/rbi/model.rb#940 sig { returns(T::Boolean) } def protected?; end - # source://rbi//lib/rbi/model.rb#862 + # source://rbi//lib/rbi/model.rb#935 sig { returns(T::Boolean) } def public?; end - # source://rbi//lib/rbi/model.rb#848 + # source://rbi//lib/rbi/model.rb#921 sig { returns(::Symbol) } def visibility; end end diff --git a/sorbet/rbi/gems/rspec-support@3.13.0.rbi b/sorbet/rbi/gems/rspec-support@3.13.1.rbi similarity index 100% rename from sorbet/rbi/gems/rspec-support@3.13.0.rbi rename to sorbet/rbi/gems/rspec-support@3.13.1.rbi diff --git a/sorbet/rbi/gems/rubocop-ast@1.31.2.rbi b/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi similarity index 99% rename from sorbet/rbi/gems/rubocop-ast@1.31.2.rbi rename to sorbet/rbi/gems/rubocop-ast@1.31.3.rbi index 1305dfb1..5356ccf3 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.31.2.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi @@ -5164,9 +5164,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) @@ -5176,9 +5173,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) @@ -5347,6 +5341,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) diff --git a/sorbet/rbi/gems/rubocop@1.62.1.rbi b/sorbet/rbi/gems/rubocop@1.63.4.rbi similarity index 98% rename from sorbet/rbi/gems/rubocop@1.62.1.rbi rename to sorbet/rbi/gems/rubocop@1.63.4.rbi index 2a9549e0..94a07924 100644 --- a/sorbet/rbi/gems/rubocop@1.62.1.rbi +++ b/sorbet/rbi/gems/rubocop@1.63.4.rbi @@ -744,6 +744,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 @@ -999,7 +1004,9 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#237 def base_dir_for_path_parameters; end - # source://rubocop//lib/rubocop/config.rb#266 + # @return [String, nil] + # + # source://rubocop//lib/rubocop/config.rb#267 def bundler_lock_file_path; end # source://rubocop//lib/rubocop/config.rb#51 @@ -1075,7 +1082,12 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#153 def for_department(department_name); end - # source://rubocop//lib/rubocop/config.rb#289 + # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) + # + # source://rubocop//lib/rubocop/config.rb#292 + def gem_versions_in_target; end + + # source://rubocop//lib/rubocop/config.rb#296 def inspect; end # True if this is a config file that is shipped with RuboCop @@ -1120,7 +1132,7 @@ class RuboCop::Config # source://rubocop//lib/rubocop/config.rb#220 def patterns_to_include; end - # source://rubocop//lib/rubocop/config.rb#277 + # source://rubocop//lib/rubocop/config.rb#278 def pending_cops; end # Returns true if there's a chance that an Include pattern matches hidden @@ -1166,18 +1178,31 @@ class RuboCop::Config private - # source://rubocop//lib/rubocop/config.rb#324 + # source://rubocop//lib/rubocop/config.rb#347 def department_of(qualified_cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#312 + # source://rubocop//lib/rubocop/config.rb#335 def enable_cop?(qualified_cop_name, cop_options); end - # source://rubocop//lib/rubocop/config.rb#299 + # @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#321 + def gem_version_to_major_minor_float(gem_version); end + + # source://rubocop//lib/rubocop/config.rb#328 + 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#308 def read_rails_version_from_bundler_lock_file; end - # source://rubocop//lib/rubocop/config.rb#295 + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # source://rubocop//lib/rubocop/config.rb#303 def target_rails_version_from_bundler_lock_file; end class << self @@ -2913,18 +2938,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#153 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#243 + # source://rubocop//lib/rubocop/cop/base.rb#269 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#186 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) @@ -2932,25 +2957,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#198 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#313 + # source://rubocop//lib/rubocop/cop/base.rb#340 def always_autocorrect?; end # Called before any investigation # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#299 + # source://rubocop//lib/rubocop/cop/base.rb#326 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#284 + # source://rubocop//lib/rubocop/cop/base.rb#311 def callbacks_needed; end # Returns the value of attribute config. @@ -2958,29 +2983,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#249 def config_to_allow_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#227 + # source://rubocop//lib/rubocop/cop/base.rb#253 def config_to_allow_offenses=(hash); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#319 + # source://rubocop//lib/rubocop/cop/base.rb#346 def contextual_autocorrect?; end # Configuration Helpers # - # source://rubocop//lib/rubocop/cop/base.rb#217 + # source://rubocop//lib/rubocop/cop/base.rb#243 def cop_config; end - # source://rubocop//lib/rubocop/cop/base.rb#209 + # source://rubocop//lib/rubocop/cop/base.rb#235 def cop_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#255 + # source://rubocop//lib/rubocop/cop/base.rb#282 def excluded_file?(file); end # This method should be overridden when a cop's behavior depends @@ -2999,51 +3024,51 @@ 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#231 def external_dependency_checksum; end - # source://rubocop//lib/rubocop/cop/base.rb#323 + # source://rubocop//lib/rubocop/cop/base.rb#350 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#180 def message(_range = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/base.rb#209 + # source://rubocop//lib/rubocop/cop/base.rb#235 def name; end # @deprecated Make potential errors with previous API more obvious # - # source://rubocop//lib/rubocop/cop/base.rb#275 + # source://rubocop//lib/rubocop/cop/base.rb#302 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#167 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#161 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#173 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#260 + # source://rubocop//lib/rubocop/cop/base.rb#287 def parse(source, path = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/base.rb#235 + # source://rubocop//lib/rubocop/cop/base.rb#261 def parser_engine; end # Returns the value of attribute processed_source. @@ -3055,99 +3080,104 @@ class RuboCop::Cop::Base # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#266 + # source://rubocop//lib/rubocop/cop/base.rb#293 def ready; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#247 + # source://rubocop//lib/rubocop/cop/base.rb#273 def relevant_file?(file); end - # source://rubocop//lib/rubocop/cop/base.rb#239 + # source://rubocop//lib/rubocop/cop/base.rb#265 def target_rails_version; end - # source://rubocop//lib/rubocop/cop/base.rb#231 + # source://rubocop//lib/rubocop/cop/base.rb#257 def target_ruby_version; end private - # source://rubocop//lib/rubocop/cop/base.rb#451 + # source://rubocop//lib/rubocop/cop/base.rb#478 def annotate(message); end - # source://rubocop//lib/rubocop/cop/base.rb#335 + # source://rubocop//lib/rubocop/cop/base.rb#362 def apply_correction(corrector); end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#415 + # source://rubocop//lib/rubocop/cop/base.rb#442 def attempt_correction(range, corrector); end # Reserved for Cop::Cop # - # source://rubocop//lib/rubocop/cop/base.rb#331 + # source://rubocop//lib/rubocop/cop/base.rb#358 def callback_argument(range); end # Called to complete an investigation # - # source://rubocop//lib/rubocop/cop/base.rb#364 + # source://rubocop//lib/rubocop/cop/base.rb#391 def complete_investigation; end # @return [Symbol, Corrector] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#389 + # source://rubocop//lib/rubocop/cop/base.rb#416 def correct(range); end - # source://rubocop//lib/rubocop/cop/base.rb#349 + # source://rubocop//lib/rubocop/cop/base.rb#376 def current_corrector; end # Reserved for Commissioner: # - # source://rubocop//lib/rubocop/cop/base.rb#341 + # source://rubocop//lib/rubocop/cop/base.rb#368 def current_offense_locations; end - # source://rubocop//lib/rubocop/cop/base.rb#353 + # source://rubocop//lib/rubocop/cop/base.rb#380 def current_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#345 + # source://rubocop//lib/rubocop/cop/base.rb#372 def currently_disabled_lines; end - # source://rubocop//lib/rubocop/cop/base.rb#479 + # source://rubocop//lib/rubocop/cop/base.rb#506 def custom_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#475 + # source://rubocop//lib/rubocop/cop/base.rb#502 def default_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#429 + # source://rubocop//lib/rubocop/cop/base.rb#456 def disable_uncorrectable(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#465 + # source://rubocop//lib/rubocop/cop/base.rb#492 def enabled_line?(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#457 + # source://rubocop//lib/rubocop/cop/base.rb#484 def file_name_matches_any?(file, parameter, default_result); end - # source://rubocop//lib/rubocop/cop/base.rb#447 + # source://rubocop//lib/rubocop/cop/base.rb#474 def find_message(range, message); end - # source://rubocop//lib/rubocop/cop/base.rb#471 + # source://rubocop//lib/rubocop/cop/base.rb#498 def find_severity(_range, severity); end - # source://rubocop//lib/rubocop/cop/base.rb#492 + # source://rubocop//lib/rubocop/cop/base.rb#519 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/base.rb#436 + # source://rubocop//lib/rubocop/cop/base.rb#463 def range_from_node_or_range(node_or_range); end - # source://rubocop//lib/rubocop/cop/base.rb#384 + # source://rubocop//lib/rubocop/cop/base.rb#411 def reset_investigation; end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#527 + def target_satisfies_all_gem_version_requirements?; end + # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#404 + # source://rubocop//lib/rubocop/cop/base.rb#431 def use_corrector(range, corrector); end class << self @@ -3162,18 +3192,18 @@ class RuboCop::Cop::Base # Naming # - # source://rubocop//lib/rubocop/cop/base.rb#89 + # source://rubocop//lib/rubocop/cop/base.rb#90 def badge; end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#289 + # source://rubocop//lib/rubocop/cop/base.rb#316 def callbacks_needed; end - # source://rubocop//lib/rubocop/cop/base.rb#93 + # source://rubocop//lib/rubocop/cop/base.rb#94 def cop_name; end - # source://rubocop//lib/rubocop/cop/base.rb#97 + # source://rubocop//lib/rubocop/cop/base.rb#98 def department; end # Cops (other than builtin) are encouraged to implement this @@ -3186,9 +3216,14 @@ class RuboCop::Cop::Base # Call for abstract Cop classes # - # source://rubocop//lib/rubocop/cop/base.rb#77 + # source://rubocop//lib/rubocop/cop/base.rb#78 def exclude_from_registry; end + # Returns the value of attribute gem_requirements. + # + # source://rubocop//lib/rubocop/cop/base.rb#135 + def gem_requirements; end + # @private # # source://rubocop//lib/rubocop/cop/base.rb#71 @@ -3196,12 +3231,12 @@ class RuboCop::Cop::Base # 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#115 def joining_forces; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#101 + # source://rubocop//lib/rubocop/cop/base.rb#102 def lint?; end # Returns true if the cop name or the cop namespace matches any of the @@ -3209,15 +3244,30 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#107 + # source://rubocop//lib/rubocop/cop/base.rb#108 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] 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#148 + 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#84 def support_autocorrect?; end # Override if your cop should be called repeatedly for multiple investigations @@ -3230,22 +3280,22 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#125 + # source://rubocop//lib/rubocop/cop/base.rb#126 def support_multiple_source?; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#375 + # source://rubocop//lib/rubocop/cop/base.rb#402 def builtin?; end - # source://rubocop//lib/rubocop/cop/base.rb#357 + # source://rubocop//lib/rubocop/cop/base.rb#384 def restrict_on_send; end end end -# source://rubocop//lib/rubocop/cop/base.rb#361 +# source://rubocop//lib/rubocop/cop/base.rb#388 RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) # Reports of an investigation. @@ -4134,6 +4184,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 @@ -5039,7 +5092,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.1.0/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -17367,6 +17420,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) @@ -17399,43 +17457,56 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # def some_method # my_debugger # end +# @example DebuggerRequires: [my_debugger/start] # -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#67 +# # bad (ok during development) +# +# require 'my_debugger/start' +# +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 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#82 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#142 def assumed_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#96 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#121 def assumed_usage_context?(node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#106 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#131 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#108 def debugger_method?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#83 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#94 def debugger_methods; end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#79 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#114 + def debugger_require?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#101 + def debugger_requires; end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 def message(node); end end -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#69 +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#80 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#79 RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) # Checks for uses of the deprecated class method usages. @@ -20450,7 +20521,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 @@ -20464,31 +20535,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 @@ -22465,21 +22536,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#57 + # 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#67 + # 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#75 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#78 def with_index_range(send); end end @@ -24498,7 +24569,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] @@ -24508,7 +24579,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 @@ -25871,6 +25942,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. @@ -27489,43 +27565,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 @@ -27751,8 +27850,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 @@ -28004,13 +28101,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 @@ -28019,10 +28116,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 @@ -28031,10 +28128,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 @@ -28043,13 +28140,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 @@ -30796,7 +30893,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 @@ -30804,47 +30901,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 @@ -31093,7 +31190,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#185 def add_forward_all_offenses(node, send_classifications, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#350 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#351 def add_parens_if_missing(node, corrector); end # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#212 @@ -31101,10 +31198,10 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#342 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#343 def allow_only_rest_arguments?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#334 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#335 def arguments_range(node, first_node); end # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#263 @@ -31115,7 +31212,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#494 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#495 def explicit_block_name?; end # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#168 @@ -31140,7 +31237,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#282 def redundant_named_arg(arg, config_name, keyword); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#324 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#325 def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#298 @@ -31154,7 +31251,7 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#346 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#347 def use_anonymous_forwarding?; end class << self @@ -31183,115 +31280,115 @@ RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), Stri # Classifies send nodes for possible rest/kwrest/all (including block) forwarding. # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#357 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358 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#369 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370 def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#397 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#398 def classification; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#364 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#365 def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#391 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#392 def forwarded_block_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#367 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#368 def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#385 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#386 def forwarded_kwrest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#379 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#380 def forwarded_rest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#361 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#362 def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#465 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#466 def additional_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#461 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#462 def additional_kwargs_or_forwarded_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#475 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#476 def allow_offense_for_no_block?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#446 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#447 def any_arg_referenced?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#430 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#431 def arguments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#409 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#410 def can_forward_all?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#469 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#470 def forward_additional_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#426 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#427 def forwarded_rest_and_kwrest_args; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#488 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#489 def missing_rest_arg_or_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#479 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#480 def no_additional_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#454 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#455 def no_post_splat_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#422 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#423 def offensive_block_forwarding?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#442 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#443 def referenced_block_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#438 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#439 def referenced_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#434 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#435 def referenced_rest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#418 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#419 def ruby_32_missing_rest_or_kwest?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#450 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#451 def target_ruby_version; end end @@ -32889,9 +32986,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) @@ -32901,7 +32996,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 @@ -34059,36 +34156,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#83 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#69 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#90 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#76 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 @@ -35811,19 +35908,19 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#184 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#186 def add_offense_for_different_line(node, line_node, line_diff); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#131 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#201 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#208 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#180 def add_offense_for_same_line(node, line_node); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#143 @@ -35835,16 +35932,16 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#95 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#193 def expected_line(sign, line_diff); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#122 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#168 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#220 def missing_line(node, code); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#109 @@ -35860,7 +35957,7 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#118 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#172 def string_first_line(str_node); end # @return [Boolean] @@ -35955,10 +36052,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 @@ -36720,25 +36817,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 @@ -39684,6 +39781,109 @@ end # source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#43 RuboCop::Cop::Style::MapCompactWithConditionalBlock::MSG = T.let(T.unsafe(nil), String) +# 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#75 + 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#69 + def lvar_ref?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#155 + def correct_push_node(corrector, push_node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#163 + def correct_return_value_handling(corrector, block, dest_var); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#108 + def dest_used_only_for_mapping?(block, dest_var, asgn); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#102 + def find_closest_assignment(block, dest_var); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#94 + def find_dest_var(block); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#127 + def new_method_name; end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#116 + def register_offense(block, dest_var, asgn); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#148 + def remove_assignment(corrector, asgn); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#133 + def return_value_used?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#71 + 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. # @@ -44294,10 +44494,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] @@ -44906,16 +45116,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 @@ -45678,12 +45891,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#168 - def allowed_type?(node); end - - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#186 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#182 def argument_is_method?(node); end # @return [Boolean] @@ -45701,7 +45909,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#133 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#131 def inside_string_literal?(range, token); end # @return [Boolean] @@ -45716,7 +45924,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#193 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#189 def method_call_with_arguments?(node); end # A method call without parentheses such as the following cannot remove `\`: @@ -45726,7 +45934,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#141 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#139 def method_with_argument?(current_token, next_token); end # @return [Boolean] @@ -45741,12 +45949,12 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#172 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#168 def same_line?(node, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#197 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#193 def start_with_arithmetic_operator?(source_line); end # @return [Boolean] @@ -48077,12 +48285,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 @@ -51791,22 +51999,22 @@ class RuboCop::Cop::Team # source://rubocop//lib/rubocop/cop/team.rb#121 def autocorrect(processed_source, report, original:, offset:); end - # source://rubocop//lib/rubocop/cop/team.rb#182 + # source://rubocop//lib/rubocop/cop/team.rb#185 def autocorrect_report(report, offset:, original:); end # source://rubocop//lib/rubocop/cop/team.rb#140 def be_ready; end - # source://rubocop//lib/rubocop/cop/team.rb#188 + # source://rubocop//lib/rubocop/cop/team.rb#191 def collate_corrections(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#204 + # source://rubocop//lib/rubocop/cop/team.rb#207 def each_corrector(report); end - # source://rubocop//lib/rubocop/cop/team.rb#254 + # source://rubocop//lib/rubocop/cop/team.rb#257 def handle_error(error, location, cop); end - # source://rubocop//lib/rubocop/cop/team.rb#246 + # source://rubocop//lib/rubocop/cop/team.rb#249 def handle_warning(error, location); end # @return [Commissioner::InvestigationReport] @@ -51814,7 +52022,7 @@ class RuboCop::Cop::Team # source://rubocop//lib/rubocop/cop/team.rb#154 def investigate_partial(cops, processed_source, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#231 + # source://rubocop//lib/rubocop/cop/team.rb#234 def process_errors(file, errors); end # source://rubocop//lib/rubocop/cop/team.rb#148 @@ -51835,10 +52043,10 @@ class RuboCop::Cop::Team # source://rubocop//lib/rubocop/cop/team.rb#170 def support_target_ruby_version?(cop); end - # source://rubocop//lib/rubocop/cop/team.rb#219 + # source://rubocop//lib/rubocop/cop/team.rb#222 def suppress_clobbering; end - # source://rubocop//lib/rubocop/cop/team.rb#225 + # source://rubocop//lib/rubocop/cop/team.rb#228 def validate_config; end class << self @@ -54360,10 +54568,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 @@ -54371,7 +54579,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 @@ -55314,10 +55522,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 @@ -55474,7 +55682,7 @@ class RuboCop::LSP::Routes # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#170 + # source://rubocop//lib/rubocop/lsp/routes.rb#168 def handle_method_missing(request); end # source://rubocop//lib/rubocop/lsp/routes.rb#67 @@ -55482,39 +55690,39 @@ class RuboCop::LSP::Routes # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#159 + # source://rubocop//lib/rubocop/lsp/routes.rb#157 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#206 def diagnostic(file_uri, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#178 + # source://rubocop//lib/rubocop/lsp/routes.rb#176 def extract_initialization_options_from(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#188 + # source://rubocop//lib/rubocop/lsp/routes.rb#186 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#220 def remove_file_protocol_from(uri); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#226 + # source://rubocop//lib/rubocop/lsp/routes.rb#224 def to_diagnostic(offense); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#238 + # source://rubocop//lib/rubocop/lsp/routes.rb#236 def to_range(location); end class << self @@ -55608,32 +55816,32 @@ class RuboCop::LSP::Server # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#59 + # source://rubocop//lib/rubocop/lsp/server.rb#61 def configure(options); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#51 + # source://rubocop//lib/rubocop/lsp/server.rb#53 def format(path, text, command:); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#55 + # source://rubocop//lib/rubocop/lsp/server.rb#57 def offenses(path, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#32 + # source://rubocop//lib/rubocop/lsp/server.rb#34 def start; end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#65 + # source://rubocop//lib/rubocop/lsp/server.rb#67 def stop(&block); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#47 + # source://rubocop//lib/rubocop/lsp/server.rb#49 def write(response); end end @@ -55661,33 +55869,61 @@ RuboCop::LSP::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) # # @api private # -# source://rubocop//lib/rubocop/lockfile.rb#7 +# source://rubocop//lib/rubocop/lockfile.rb#15 class RuboCop::Lockfile - # Gems that the bundle depends on + # @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, nil] # - # source://rubocop//lib/rubocop/lockfile.rb#9 + # source://rubocop//lib/rubocop/lockfile.rb#29 def dependencies; end - # All activated gems, including transitive dependencies + # 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. # - # source://rubocop//lib/rubocop/lockfile.rb#16 + # @api private + # @return [Array, 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#24 + # source://rubocop//lib/rubocop/lockfile.rb#65 def includes_gem?(name); end private # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#85 + def bundler_lock_parser_defined?; end + + # @api private + # @return [Bundler::LockfileParser, nil] # - # source://rubocop//lib/rubocop/lockfile.rb#30 + # source://rubocop//lib/rubocop/lockfile.rb#72 def parser; end end @@ -56711,145 +56947,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#471 + # 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. @@ -56857,41 +57093,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#499 + # 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 @@ -56914,12 +57150,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 diff --git a/sorbet/rbi/gems/sentry-ruby-core@4.7.1.rbi b/sorbet/rbi/gems/sentry-ruby-core@4.7.1.rbi deleted file mode 100644 index d8e366bd..00000000 --- a/sorbet/rbi/gems/sentry-ruby-core@4.7.1.rbi +++ /dev/null @@ -1,2996 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `sentry-ruby-core` gem. -# Please instead update this file by running `bin/tapioca gem sentry-ruby-core`. - -# source://sentry-ruby-core//lib/sentry/core_ext/object/deep_dup.rb#24 -class Array - include ::Enumerable - - # Returns a deep copy of array. - # - # array = [1, [2, 3]] - # dup = array.deep_dup - # dup[1][2] = 4 - # - # array[1][2] # => nil - # dup[1][2] # => 4 - # - # source://sentry-ruby-core//lib/sentry/core_ext/object/deep_dup.rb#33 - def deep_dup; end -end - -# source://sentry-ruby-core//lib/sentry/core_ext/object/duplicable.rb#108 -class BigDecimal < ::Numeric - # BigDecimals are duplicable: - # - # BigDecimal("1.2").duplicable? # => true - # BigDecimal("1.2").dup # => # - # - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/core_ext/object/duplicable.rb#113 - def duplicable?; end -end - -# source://sentry-ruby-core//lib/sentry/core_ext/object/deep_dup.rb#38 -class Hash - include ::Enumerable - - # Returns a deep copy of hash. - # - # hash = { a: { b: 'b' } } - # dup = hash.deep_dup - # dup[:a][:c] = 'c' - # - # hash[:a][:c] # => nil - # dup[:a][:c] # => "c" - # - # source://sentry-ruby-core//lib/sentry/core_ext/object/deep_dup.rb#47 - def deep_dup; end -end - -# source://sentry-ruby-core//lib/sentry/core_ext/object/duplicable.rb#118 -class Method - # Methods are not duplicable: - # - # method(:puts).duplicable? # => false - # method(:puts).dup # => TypeError: allocator undefined for Method - # - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/core_ext/object/duplicable.rb#123 - def duplicable?; end -end - -# source://sentry-ruby-core//lib/sentry/core_ext/object/duplicable.rb#93 -class Numeric - include ::Comparable -end - -# -- -# Most objects are cloneable, but not all. For example you can't dup methods: -# -# method(:puts).dup # => TypeError: allocator undefined for Method -# -# Classes may signal their instances are not duplicable removing +dup+/+clone+ -# or raising exceptions from them. So, to dup an arbitrary object you normally -# use an optimistic approach and are ready to catch an exception, say: -# -# arbitrary_object.dup rescue object -# -# Rails dups objects in a few critical spots where they are not that arbitrary. -# That rescue is very expensive (like 40 times slower than a predicate), and it -# is often triggered. -# -# That's why we hardcode the following cases and check duplicable? instead of -# using that rescue idiom. -# ++ -# -# source://sentry-ruby-core//lib/sentry/core_ext/object/duplicable.rb#26 -class Object < ::BasicObject - include ::Kernel - include ::PP::ObjectMixin - - # Returns a deep copy of object if it's duplicable. If it's - # not duplicable, returns +self+. - # - # object = Object.new - # dup = object.deep_dup - # dup.instance_variable_set(:@a, 1) - # - # object.instance_variable_defined?(:@a) # => false - # dup.instance_variable_defined?(:@a) # => true - # - # source://sentry-ruby-core//lib/sentry/core_ext/object/deep_dup.rb#19 - def deep_dup; end - - # Can you safely dup this object? - # - # False for method objects; - # true otherwise. - # - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/core_ext/object/duplicable.rb#31 - def duplicable?; end -end - -# Based on ActionDispatch::RemoteIp. All security-related precautions from that -# middleware have been removed, because the Event IP just needs to be accurate, -# and spoofing an IP here only makes data inaccurate, not insecure. Don't re-use -# this module if you have to *trust* the IP address. -# -# source://sentry-ruby-core//lib/sentry/version.rb#1 -module Sentry - class << self - # Takes an instance of Sentry::Breadcrumb and stores it to the current active scope. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#111 - def add_breadcrumb(breadcrumb, **options); end - - # source://sentry-ruby-core//lib/sentry-ruby.rb#48 - def apply_patches(config); end - - # Returns the value of attribute background_worker. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#40 - def background_worker; end - - # Sets the attribute background_worker - # - # @param value the value to set the attribute background_worker to. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#40 - def background_worker=(_arg0); end - - # Takes an instance of Sentry::Event and dispatches it to the currently active hub. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#190 - def capture_event(event); end - - # Takes an exception and reports it to Sentry via the currently active hub. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#180 - def capture_exception(exception, **options, &block); end - - # Takes a message string and reports it to Sentry via the currently active hub. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#185 - def capture_message(message, **options, &block); end - - # Clones the main thread's active hub and stores it to the current thread. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#138 - def clone_hub_to_current_thread; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def configuration(*args, **_arg1, &block); end - - # Takes a block and yields the current active scope. - # - # ```ruby - # Sentry.configure_scope do |scope| - # scope.set_tags(foo: "bar") - # end - # - # Sentry.capture_message("test message") # this event will have tags { foo: "bar" } - # ``` - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#152 - def configure_scope(&block); end - - # Returns an uri for security policy reporting that's generated from the given DSN - # (To learn more about security policy reporting: https://docs.sentry.io/product/security-policy-reporting/) - # - # It returns nil if - # - # 1. The SDK is not initialized yet. - # 2. The DSN is not provided or is invalid. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#100 - def csp_report_uri; end - - # Returns the current active client. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#128 - def get_current_client; end - - # Returns the current active hub. - # If the current thread doesn't have an active hub, it will clone the main thread's active hub, - # stores it in the current thread, and then returns it. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#118 - def get_current_hub; end - - # Returns the current active scope. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#133 - def get_current_scope; end - - # Returns the main thread's active hub. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#106 - def get_main_hub; end - - # Main APIs ##### - # - # @yield [config] - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#80 - def init(&block); end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#214 - def initialized?; end - - # Integrations ##### - # - # Returns a hash that contains all the integrations that have been registered to the main SDK. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#61 - def integrations; end - - # Returns the id of the lastly reported Sentry::Event. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#200 - def last_event_id; end - - # source://sentry-ruby-core//lib/sentry-ruby.rb#218 - def logger; end - - # Registers the SDK integration with its name and version. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#66 - def register_integration(name, version); end - - # Patch Registration ##### - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#44 - def register_patch(&block); end - - # source://sentry-ruby-core//lib/sentry-ruby.rb#54 - def registered_patches; end - - # source://sentry-ruby-core//lib/sentry-ruby.rb#222 - def sdk_meta; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def send_event(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def set_context(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def set_extras(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def set_tags(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def set_user(*args, **_arg1, &block); end - - # Takes or initializes a new Sentry::Transaction and makes a sampling decision for it. - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#195 - def start_transaction(**options); end - - # Helpers ##### - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#207 - def sys_command(command); end - - # source://sentry-ruby-core//lib/sentry-ruby.rb#226 - def utc_now; end - - # Takes a block and yields a temporary scope. - # The temporary scope will inherit all the attributes from the current active scope and replace it to be the active - # scope inside the block. For example: - # - # ```ruby - # Sentry.configure_scope do |scope| - # scope.set_tags(foo: "bar") - # end - # - # Sentry.capture_message("test message") # this event will have tags { foo: "bar" } - # - # Sentry.with_scope do |temp_scope| - # temp_scope.set_tags(foo: "baz") - # Sentry.capture_message("test message 2") # this event will have tags { foo: "baz" } - # end - # - # Sentry.capture_message("test message 3") # this event will have tags { foo: "bar" } - # ``` - # - # source://sentry-ruby-core//lib/sentry-ruby.rb#175 - def with_scope(&block); end - end -end - -# source://sentry-ruby-core//lib/sentry/utils/argument_checking_helper.rb#2 -module Sentry::ArgumentCheckingHelper - private - - # source://sentry-ruby-core//lib/sentry/utils/argument_checking_helper.rb#5 - def check_argument_type!(argument, expected_type); end -end - -# source://sentry-ruby-core//lib/sentry/background_worker.rb#6 -class Sentry::BackgroundWorker - include ::Sentry::LoggingHelper - - # @return [BackgroundWorker] a new instance of BackgroundWorker - # - # source://sentry-ruby-core//lib/sentry/background_worker.rb#11 - def initialize(configuration); end - - # Returns the value of attribute logger. - # - # source://sentry-ruby-core//lib/sentry/background_worker.rb#9 - def logger; end - - # Returns the value of attribute max_queue. - # - # source://sentry-ruby-core//lib/sentry/background_worker.rb#9 - def max_queue; end - - # Returns the value of attribute number_of_threads. - # - # source://sentry-ruby-core//lib/sentry/background_worker.rb#9 - def number_of_threads; end - - # source://sentry-ruby-core//lib/sentry/background_worker.rb#35 - def perform(&block); end -end - -# Front end to parsing the backtrace for each notice -# -# source://sentry-ruby-core//lib/sentry/backtrace.rb#7 -class Sentry::Backtrace - # @return [Backtrace] a new instance of Backtrace - # - # source://sentry-ruby-core//lib/sentry/backtrace.rb#102 - def initialize(lines); end - - # source://sentry-ruby-core//lib/sentry/backtrace.rb#118 - def ==(other); end - - # source://sentry-ruby-core//lib/sentry/backtrace.rb#106 - def inspect; end - - # holder for an Array of Backtrace::Line instances - # - # source://sentry-ruby-core//lib/sentry/backtrace.rb#84 - def lines; end - - # source://sentry-ruby-core//lib/sentry/backtrace.rb#110 - def to_s; end - - class << self - # source://sentry-ruby-core//lib/sentry/backtrace.rb#86 - def parse(backtrace, project_root, app_dirs_pattern, &backtrace_cleanup_callback); end - end -end - -# source://sentry-ruby-core//lib/sentry/backtrace.rb#81 -Sentry::Backtrace::APP_DIRS_PATTERN = T.let(T.unsafe(nil), Regexp) - -# Handles backtrace parsing line by line -# -# source://sentry-ruby-core//lib/sentry/backtrace.rb#9 -class Sentry::Backtrace::Line - # @return [Line] a new instance of Line - # - # source://sentry-ruby-core//lib/sentry/backtrace.rb#51 - def initialize(file, number, method, module_name, in_app_pattern); end - - # source://sentry-ruby-core//lib/sentry/backtrace.rb#72 - def ==(other); end - - # The file portion of the line (such as app/models/user.rb) - # - # source://sentry-ruby-core//lib/sentry/backtrace.rb#22 - def file; end - - # source://sentry-ruby-core//lib/sentry/backtrace.rb#59 - def in_app; end - - # Returns the value of attribute in_app_pattern. - # - # source://sentry-ruby-core//lib/sentry/backtrace.rb#33 - def in_app_pattern; end - - # source://sentry-ruby-core//lib/sentry/backtrace.rb#76 - def inspect; end - - # The method of the line (such as index) - # - # source://sentry-ruby-core//lib/sentry/backtrace.rb#28 - def method; end - - # The module name (JRuby) - # - # source://sentry-ruby-core//lib/sentry/backtrace.rb#31 - def module_name; end - - # The line number portion of the line - # - # source://sentry-ruby-core//lib/sentry/backtrace.rb#25 - def number; end - - # Reconstructs the line in a readable fashion - # - # source://sentry-ruby-core//lib/sentry/backtrace.rb#68 - def to_s; end - - class << self - # Parses a single line of a given backtrace - # - # @param unparsed_line [String] The raw line from +caller+ or some backtrace - # @return [Line] The parsed backtrace line - # - # source://sentry-ruby-core//lib/sentry/backtrace.rb#38 - def parse(unparsed_line, in_app_pattern); end - end -end - -# org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) -# -# source://sentry-ruby-core//lib/sentry/backtrace.rb#19 -Sentry::Backtrace::Line::JAVA_INPUT_FORMAT = T.let(T.unsafe(nil), Regexp) - -# source://sentry-ruby-core//lib/sentry/backtrace.rb#10 -Sentry::Backtrace::Line::RB_EXTENSION = T.let(T.unsafe(nil), String) - -# regexp (optional leading X: on windows, or JRuby9000 class-prefix) -# -# source://sentry-ruby-core//lib/sentry/backtrace.rb#12 -Sentry::Backtrace::Line::RUBY_INPUT_FORMAT = T.let(T.unsafe(nil), Regexp) - -# source://sentry-ruby-core//lib/sentry/breadcrumb.rb#2 -class Sentry::Breadcrumb - # @return [Breadcrumb] a new instance of Breadcrumb - # - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#8 - def initialize(category: T.unsafe(nil), data: T.unsafe(nil), message: T.unsafe(nil), timestamp: T.unsafe(nil), level: T.unsafe(nil), type: T.unsafe(nil)); end - - # Returns the value of attribute category. - # - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#5 - def category; end - - # Sets the attribute category - # - # @param value the value to set the attribute category to. - # - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#5 - def category=(_arg0); end - - # Returns the value of attribute data. - # - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#5 - def data; end - - # Sets the attribute data - # - # @param value the value to set the attribute data to. - # - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#5 - def data=(_arg0); end - - # Returns the value of attribute level. - # - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#5 - def level; end - - # Sets the attribute level - # - # @param value the value to set the attribute level to. - # - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#5 - def level=(_arg0); end - - # Returns the value of attribute message. - # - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#6 - def message; end - - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#28 - def message=(msg); end - - # Returns the value of attribute timestamp. - # - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#5 - def timestamp; end - - # Sets the attribute timestamp - # - # @param value the value to set the attribute timestamp to. - # - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#5 - def timestamp=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#17 - def to_hash; end - - # Returns the value of attribute type. - # - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#5 - def type; end - - # Sets the attribute type - # - # @param value the value to set the attribute type to. - # - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#5 - def type=(_arg0); end - - private - - # source://sentry-ruby-core//lib/sentry/breadcrumb.rb#34 - def serialized_data; end -end - -# source://sentry-ruby-core//lib/sentry/breadcrumb.rb#3 -Sentry::Breadcrumb::DATA_SERIALIZATION_ERROR_MESSAGE = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/breadcrumb_buffer.rb#4 -class Sentry::BreadcrumbBuffer - include ::Enumerable - - # @return [BreadcrumbBuffer] a new instance of BreadcrumbBuffer - # - # source://sentry-ruby-core//lib/sentry/breadcrumb_buffer.rb#10 - def initialize(size = T.unsafe(nil)); end - - # Returns the value of attribute buffer. - # - # source://sentry-ruby-core//lib/sentry/breadcrumb_buffer.rb#8 - def buffer; end - - # Sets the attribute buffer - # - # @param value the value to set the attribute buffer to. - # - # source://sentry-ruby-core//lib/sentry/breadcrumb_buffer.rb#8 - def buffer=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/breadcrumb_buffer.rb#42 - def dup; end - - # source://sentry-ruby-core//lib/sentry/breadcrumb_buffer.rb#28 - def each(&block); end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/breadcrumb_buffer.rb#32 - def empty?; end - - # source://sentry-ruby-core//lib/sentry/breadcrumb_buffer.rb#20 - def members; end - - # source://sentry-ruby-core//lib/sentry/breadcrumb_buffer.rb#24 - def peek; end - - # @yield [crumb] - # - # source://sentry-ruby-core//lib/sentry/breadcrumb_buffer.rb#14 - def record(crumb); end - - # source://sentry-ruby-core//lib/sentry/breadcrumb_buffer.rb#36 - def to_hash; end -end - -# source://sentry-ruby-core//lib/sentry/breadcrumb_buffer.rb#5 -Sentry::BreadcrumbBuffer::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) - -# source://sentry-ruby-core//lib/sentry/client.rb#4 -class Sentry::Client - include ::Sentry::LoggingHelper - - # @return [Client] a new instance of Client - # - # source://sentry-ruby-core//lib/sentry/client.rb#9 - def initialize(configuration); end - - # source://sentry-ruby-core//lib/sentry/client.rb#26 - def capture_event(event, scope, hint = T.unsafe(nil)); end - - # Returns the value of attribute configuration. - # - # source://sentry-ruby-core//lib/sentry/client.rb#7 - def configuration; end - - # source://sentry-ruby-core//lib/sentry/client.rb#50 - def event_from_exception(exception, hint = T.unsafe(nil)); end - - # source://sentry-ruby-core//lib/sentry/client.rb#60 - def event_from_message(message, hint = T.unsafe(nil), backtrace: T.unsafe(nil)); end - - # source://sentry-ruby-core//lib/sentry/client.rb#67 - def event_from_transaction(transaction); end - - # source://sentry-ruby-core//lib/sentry/client.rb#103 - def generate_sentry_trace(span); end - - # Returns the value of attribute logger. - # - # source://sentry-ruby-core//lib/sentry/client.rb#7 - def logger; end - - # source://sentry-ruby-core//lib/sentry/client.rb#79 - def send_event(event, hint = T.unsafe(nil)); end - - # Returns the value of attribute transport. - # - # source://sentry-ruby-core//lib/sentry/client.rb#7 - def transport; end - - private - - # source://sentry-ruby-core//lib/sentry/client.rb#119 - def dispatch_async_event(async_block, event, hint); end - - # source://sentry-ruby-core//lib/sentry/client.rb#113 - def dispatch_background_event(event, hint); end -end - -# source://sentry-ruby-core//lib/sentry/configuration.rb#10 -class Sentry::Configuration - include ::Sentry::LoggingHelper - - # @return [Configuration] a new instance of Configuration - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#185 - def initialize; end - - # Directories to be recognized as part of your app. e.g. if you - # have an `engines` dir at the root of your project, you may want - # to set this to something like /(app|config|engines|lib)/ - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#15 - def app_dirs_pattern; end - - # Directories to be recognized as part of your app. e.g. if you - # have an `engines` dir at the root of your project, you may want - # to set this to something like /(app|config|engines|lib)/ - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#15 - def app_dirs_pattern=(_arg0); end - - # Provide an object that responds to `call` to send events asynchronously. - # E.g.: lambda { |event| Thread.new { Sentry.send_event(event) } } - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#19 - def async; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#227 - def async=(value); end - - # to send events in a non-blocking way, sentry-ruby has its own background worker - # by default, the worker holds a thread pool that has [the number of processors] threads - # but you can configure it with this configuration option - # E.g.: config.background_worker_threads = 5 - # - # if you want to send events synchronously, set the value to 0 - # E.g.: config.background_worker_threads = 0 - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#28 - def background_worker_threads; end - - # to send events in a non-blocking way, sentry-ruby has its own background worker - # by default, the worker holds a thread pool that has [the number of processors] threads - # but you can configure it with this configuration option - # E.g.: config.background_worker_threads = 5 - # - # if you want to send events synchronously, set the value to 0 - # E.g.: config.background_worker_threads = 0 - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#28 - def background_worker_threads=(_arg0); end - - # a proc/lambda that takes an array of stack traces - # it'll be used to silence (reduce) backtrace of the exception - # - # for example: - # - # ```ruby - # Sentry.configuration.backtrace_cleanup_callback = lambda do |backtrace| - # Rails.backtrace_cleaner.clean(backtrace) - # end - # ``` - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#41 - def backtrace_cleanup_callback; end - - # a proc/lambda that takes an array of stack traces - # it'll be used to silence (reduce) backtrace of the exception - # - # for example: - # - # ```ruby - # Sentry.configuration.backtrace_cleanup_callback = lambda do |backtrace| - # Rails.backtrace_cleaner.clean(backtrace) - # end - # ``` - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#41 - def backtrace_cleanup_callback=(_arg0); end - - # Optional Proc, called before adding the breadcrumb to the current scope - # E.g.: lambda { |breadcrumb, hint| breadcrumb } - # E.g.: lambda { |breadcrumb, hint| nil } - # E.g.: lambda { |breadcrumb, hint| - # breadcrumb.message = 'a' - # breadcrumb - # } - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#50 - def before_breadcrumb; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#256 - def before_breadcrumb=(value); end - - # Optional Proc, called before sending an event to the server/ - # E.g.: lambda { |event, hint| event } - # E.g.: lambda { |event, hint| nil } - # E.g.: lambda { |event, hint| - # event[:message] = 'a' - # event - # } - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#59 - def before_send; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#248 - def before_send=(value); end - - # An array of breadcrumbs loggers to be used. Available options are: - # - :sentry_logger - # - :active_support_logger - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#64 - def breadcrumbs_logger; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#235 - def breadcrumbs_logger=(logger); end - - # Number of lines of code context to capture, or nil for none - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#70 - def context_lines; end - - # Number of lines of code context to capture, or nil for none - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#70 - def context_lines=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#327 - def csp_report_uri; end - - # Whether the SDK should run in the debugging mode. Default is false. - # If set to true, SDK errors will be logged with backtrace - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#77 - def debug; end - - # Whether the SDK should run in the debugging mode. Default is false. - # If set to true, SDK errors will be logged with backtrace - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#77 - def debug=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#316 - def detect_release; end - - # the dsn value, whether it's set via `config.dsn=` or `ENV["SENTRY_DSN"]` - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#80 - def dsn; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#218 - def dsn=(value); end - - # Whitelist of enabled_environments that will send notifications to Sentry. Array of Strings. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#83 - def enabled_environments; end - - # Whitelist of enabled_environments that will send notifications to Sentry. Array of Strings. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#83 - def enabled_environments=(_arg0); end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#298 - def enabled_in_current_env?; end - - # RACK_ENV by default. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#73 - def environment; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#264 - def environment=(environment); end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#276 - def error_messages; end - - # these are not config options - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#158 - def errors; end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#285 - def exception_class_allowed?(exc); end - - # Logger 'progname's to exclude from breadcrumbs - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#86 - def exclude_loggers; end - - # Logger 'progname's to exclude from breadcrumbs - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#86 - def exclude_loggers=(_arg0); end - - # Array of exception classes that should never be sent. See IGNORE_DEFAULT. - # You should probably append to this rather than overwrite it. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#90 - def excluded_exceptions; end - - # Array of exception classes that should never be sent. See IGNORE_DEFAULT. - # You should probably append to this rather than overwrite it. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#90 - def excluded_exceptions=(_arg0); end - - # these are not config options - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#158 - def gem_specs; end - - # Boolean to check nested exceptions when deciding if to exclude. Defaults to true - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#93 - def inspect_exception_causes_for_exclusion; end - - # Boolean to check nested exceptions when deciding if to exclude. Defaults to true - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#93 - def inspect_exception_causes_for_exclusion=(_arg0); end - - # Boolean to check nested exceptions when deciding if to exclude. Defaults to true - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#93 - def inspect_exception_causes_for_exclusion?; end - - # You may provide your own LineCache for matching paths with source files. - # This may be useful if you need to get source code from places other than - # the disk. See Sentry::LineCache for the required interface you must implement. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#99 - def linecache; end - - # You may provide your own LineCache for matching paths with source files. - # This may be useful if you need to get source code from places other than - # the disk. See Sentry::LineCache for the required interface you must implement. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#99 - def linecache=(_arg0); end - - # Logger used by Sentry. In Rails, this is the Rails logger, otherwise - # Sentry provides its own Sentry::Logger. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#103 - def logger; end - - # Logger used by Sentry. In Rails, this is the Rails logger, otherwise - # Sentry provides its own Sentry::Logger. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#103 - def logger=(_arg0); end - - # Max number of breadcrumbs a breadcrumb buffer can hold - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#67 - def max_breadcrumbs; end - - # Max number of breadcrumbs a breadcrumb buffer can hold - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#67 - def max_breadcrumbs=(_arg0); end - - # Project directory root for in_app detection. Could be Rails root, etc. - # Set automatically for Rails. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#107 - def project_root; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#281 - def project_root=(root_dir); end - - # Insert sentry-trace to outgoing requests' headers - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#110 - def propagate_traces; end - - # Insert sentry-trace to outgoing requests' headers - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#110 - def propagate_traces=(_arg0); end - - # Array of rack env parameters to be included in the event sent to sentry. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#113 - def rack_env_whitelist; end - - # Array of rack env parameters to be included in the event sent to sentry. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#113 - def rack_env_whitelist=(_arg0); end - - # Release tag to be passed with every event sent to Sentry. - # We automatically try to set this to a git SHA or Capistrano release. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#117 - def release; end - - # Release tag to be passed with every event sent to Sentry. - # We automatically try to set this to a git SHA or Capistrano release. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#117 - def release=(_arg0); end - - # The sampling factor to apply to events. A value of 0.0 will not send - # any events, and a value of 1.0 will send 100% of events. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#121 - def sample_rate; end - - # The sampling factor to apply to events. A value of 0.0 will not send - # any events, and a value of 1.0 will send 100% of events. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#121 - def sample_rate=(_arg0); end - - # When send_default_pii's value is false (default), sensitive information like - # - user ip - # - user cookie - # - request body - # will not be sent to Sentry. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#131 - def send_default_pii; end - - # When send_default_pii's value is false (default), sensitive information like - # - user ip - # - user cookie - # - request body - # will not be sent to Sentry. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#131 - def send_default_pii=(_arg0); end - - # Include module versions in reports - boolean. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#124 - def send_modules; end - - # Include module versions in reports - boolean. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#124 - def send_modules=(_arg0); end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#268 - def sending_allowed?; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#218 - def server=(value); end - - # Returns the value of attribute server_name. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#139 - def server_name; end - - # Sets the attribute server_name - # - # @param value the value to set the attribute server_name to. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#139 - def server_name=(_arg0); end - - # Allow to skip Sentry emails within rake tasks - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#134 - def skip_rake_integration; end - - # Allow to skip Sentry emails within rake tasks - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#134 - def skip_rake_integration=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#306 - def stacktrace_builder; end - - # Take a float between 0.0 and 1.0 as the sample rate for tracing events (transactions). - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#145 - def traces_sample_rate; end - - # Take a float between 0.0 and 1.0 as the sample rate for tracing events (transactions). - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#145 - def traces_sample_rate=(_arg0); end - - # Take a Proc that controls the sample rate for every tracing event, e.g. - # ``` - # lambda do |tracing_context| - # # tracing_context[:transaction_context] contains the information about the transaction - # # tracing_context[:parent_sampled] contains the transaction's parent's sample decision - # true # return value can be a boolean or a float between 0.0 and 1.0 - # end - # ``` - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#155 - def traces_sampler; end - - # Take a Proc that controls the sample rate for every tracing event, e.g. - # ``` - # lambda do |tracing_context| - # # tracing_context[:transaction_context] contains the information about the transaction - # # tracing_context[:parent_sampled] contains the transaction's parent's sample decision - # true # return value can be a boolean or a float between 0.0 and 1.0 - # end - # ``` - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#155 - def traces_sampler=(_arg0); end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#302 - def tracing_enabled?; end - - # Return a Transport::Configuration object for transport-related configurations. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#142 - def transport; end - - # IP ranges for trusted proxies that will be skipped when calculating IP address. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#137 - def trusted_proxies; end - - # IP ranges for trusted proxies that will be skipped when calculating IP address. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#137 - def trusted_proxies=(_arg0); end - - private - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#398 - def capture_in_environment?; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#379 - def detect_release_from_capistrano; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#394 - def detect_release_from_env; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#390 - def detect_release_from_git; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#367 - def detect_release_from_heroku; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#432 - def environment_from_env; end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#338 - def excluded_exception?(incoming_exception); end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#344 - def excluded_exception_classes; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#348 - def get_exception_class(x); end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#352 - def matches_exception?(excluded_exception_class, incoming_exception); end - - # Try to resolve the hostname to an FQDN, but fall back to whatever - # the load name is. - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#427 - def resolve_hostname; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#444 - def run_post_initialization_callbacks; end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#375 - def running_on_heroku?; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#360 - def safe_const_get(x); end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#414 - def sample_allowed?; end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#436 - def server_name_from_env; end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#405 - def valid?; end - - class << self - # allow extensions to add their hooks to the Configuration class - # - # source://sentry-ruby-core//lib/sentry/configuration.rb#451 - def add_post_initialization_callback(&block); end - - # source://sentry-ruby-core//lib/sentry/configuration.rb#457 - def post_initialization_callbacks; end - end -end - -# source://sentry-ruby-core//lib/sentry/configuration.rb#175 -Sentry::Configuration::HEROKU_DYNO_METADATA_MESSAGE = T.let(T.unsafe(nil), String) - -# Most of these errors generate 4XX responses. In general, Sentry clients -# only automatically report 5xx responses. -# -# source://sentry-ruby-core//lib/sentry/configuration.rb#162 -Sentry::Configuration::IGNORE_DEFAULT = T.let(T.unsafe(nil), Array) - -# source://sentry-ruby-core//lib/sentry/configuration.rb#178 -Sentry::Configuration::LOG_PREFIX = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/configuration.rb#179 -Sentry::Configuration::MODULE_SEPARATOR = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/configuration.rb#169 -Sentry::Configuration::RACK_ENV_WHITELIST_DEFAULT = T.let(T.unsafe(nil), Array) - -# source://sentry-ruby-core//lib/sentry/dsn.rb#4 -class Sentry::DSN - # @return [DSN] a new instance of DSN - # - # source://sentry-ruby-core//lib/sentry/dsn.rb#10 - def initialize(dsn_string); end - - # source://sentry-ruby-core//lib/sentry/dsn.rb#43 - def csp_report_uri; end - - # source://sentry-ruby-core//lib/sentry/dsn.rb#47 - def envelope_endpoint; end - - # source://sentry-ruby-core//lib/sentry/dsn.rb#8 - def host; end - - # source://sentry-ruby-core//lib/sentry/dsn.rb#8 - def path; end - - # source://sentry-ruby-core//lib/sentry/dsn.rb#8 - def port; end - - # source://sentry-ruby-core//lib/sentry/dsn.rb#8 - def project_id; end - - # source://sentry-ruby-core//lib/sentry/dsn.rb#8 - def public_key; end - - # source://sentry-ruby-core//lib/sentry/dsn.rb#8 - def scheme; end - - # source://sentry-ruby-core//lib/sentry/dsn.rb#8 - def secret_key; end - - # source://sentry-ruby-core//lib/sentry/dsn.rb#37 - def server; end - - # source://sentry-ruby-core//lib/sentry/dsn.rb#33 - def to_s; end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/dsn.rb#29 - def valid?; end -end - -# source://sentry-ruby-core//lib/sentry/dsn.rb#5 -Sentry::DSN::PORT_MAP = T.let(T.unsafe(nil), Hash) - -# source://sentry-ruby-core//lib/sentry/dsn.rb#6 -Sentry::DSN::REQUIRED_ATTRIBUTES = T.let(T.unsafe(nil), Array) - -# source://sentry-ruby-core//lib/sentry/transport/dummy_transport.rb#2 -class Sentry::DummyTransport < ::Sentry::Transport - # @return [DummyTransport] a new instance of DummyTransport - # - # source://sentry-ruby-core//lib/sentry/transport/dummy_transport.rb#5 - def initialize(*_arg0); end - - # Returns the value of attribute events. - # - # source://sentry-ruby-core//lib/sentry/transport/dummy_transport.rb#3 - def events; end - - # Sets the attribute events - # - # @param value the value to set the attribute events to. - # - # source://sentry-ruby-core//lib/sentry/transport/dummy_transport.rb#3 - def events=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/transport/dummy_transport.rb#10 - def send_event(event); end -end - -# source://sentry-ruby-core//lib/sentry/exceptions.rb#2 -class Sentry::Error < ::StandardError; end - -# source://sentry-ruby-core//lib/sentry/event.rb#11 -class Sentry::Event - # @return [Event] a new instance of Event - # - # source://sentry-ruby-core//lib/sentry/event.rb#29 - def initialize(configuration:, integration_meta: T.unsafe(nil), message: T.unsafe(nil)); end - - # source://sentry-ruby-core//lib/sentry/event.rb#132 - def add_exception_interface(exception); end - - # source://sentry-ruby-core//lib/sentry/event.rb#120 - def add_request_interface(env); end - - # source://sentry-ruby-core//lib/sentry/event.rb#124 - def add_threads_interface(backtrace: T.unsafe(nil), **options); end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def backtrace; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def backtrace=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def breadcrumbs; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def breadcrumbs=(_arg0); end - - # Returns the value of attribute configuration. - # - # source://sentry-ruby-core//lib/sentry/event.rb#27 - def configuration; end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def contexts; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def contexts=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def environment; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def environment=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def event_id; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def event_id=(_arg0); end - - # Returns the value of attribute exception. - # - # source://sentry-ruby-core//lib/sentry/event.rb#27 - def exception; end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def extra; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def extra=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def fingerprint; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def fingerprint=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def level; end - - # needed to meet the Sentry spec - # - # source://sentry-ruby-core//lib/sentry/event.rb#86 - def level=(new_level); end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def message; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def message=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def modules; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def modules=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def platform; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def platform=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/event.rb#90 - def rack_env=(env); end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def release; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def release=(_arg0); end - - # Returns the value of attribute request. - # - # source://sentry-ruby-core//lib/sentry/event.rb#27 - def request; end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def sdk; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def sdk=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def server_name; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def server_name=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def tags; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def tags=(_arg0); end - - # Returns the value of attribute threads. - # - # source://sentry-ruby-core//lib/sentry/event.rb#27 - def threads; end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def timestamp; end - - # source://sentry-ruby-core//lib/sentry/event.rb#82 - def timestamp=(time); end - - # source://sentry-ruby-core//lib/sentry/event.rb#106 - def to_hash; end - - # source://sentry-ruby-core//lib/sentry/event.rb#116 - def to_json_compatible; end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def transaction; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def transaction=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def type; end - - # source://sentry-ruby-core//lib/sentry/event.rb#25 - def user; end - - # source://sentry-ruby-core//lib/sentry/event.rb#24 - def user=(_arg0); end - - private - - # When behind a proxy (or if the user is using a proxy), we can't use - # REMOTE_ADDR to determine the Event IP, and must use other headers instead. - # - # source://sentry-ruby-core//lib/sentry/event.rb#152 - def calculate_real_ip_from_rack(env); end - - # source://sentry-ruby-core//lib/sentry/event.rb#142 - def serialize_attributes; end - - class << self - # source://sentry-ruby-core//lib/sentry/event.rb#57 - def get_log_message(event_hash); end - - # source://sentry-ruby-core//lib/sentry/event.rb#73 - def get_message_from_exception(event_hash); end - end -end - -# source://sentry-ruby-core//lib/sentry/event.rb#22 -Sentry::Event::MAX_MESSAGE_SIZE_IN_BYTES = T.let(T.unsafe(nil), Integer) - -# source://sentry-ruby-core//lib/sentry/event.rb#12 -Sentry::Event::SERIALIZEABLE_ATTRIBUTES = T.let(T.unsafe(nil), Array) - -# source://sentry-ruby-core//lib/sentry/event.rb#20 -Sentry::Event::WRITER_ATTRIBUTES = T.let(T.unsafe(nil), Array) - -# source://sentry-ruby-core//lib/sentry/interfaces/exception.rb#2 -class Sentry::ExceptionInterface < ::Sentry::Interface - # @return [ExceptionInterface] a new instance of ExceptionInterface - # - # source://sentry-ruby-core//lib/sentry/interfaces/exception.rb#3 - def initialize(values:); end - - # source://sentry-ruby-core//lib/sentry/interfaces/exception.rb#7 - def to_hash; end - - class << self - # source://sentry-ruby-core//lib/sentry/interfaces/exception.rb#13 - def build(exception:, stacktrace_builder:); end - end -end - -# source://sentry-ruby-core//lib/sentry/exceptions.rb#5 -class Sentry::ExternalError < ::Sentry::Error; end - -# source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#5 -class Sentry::HTTPTransport < ::Sentry::Transport - # @return [HTTPTransport] a new instance of HTTPTransport - # - # source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#16 - def initialize(*args); end - - # Returns the value of attribute adapter. - # - # source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#14 - def adapter; end - - # Returns the value of attribute conn. - # - # source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#14 - def conn; end - - # source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#23 - def send_data(data); end - - private - - # TODO: deprecate and replace where possible w/Faraday Builder - # - # source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#135 - def faraday_opts; end - - # source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#62 - def handle_rate_limited_response(headers); end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#58 - def has_rate_limited_header?(headers); end - - # source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#88 - def parse_rate_limit_header(rate_limit_header); end - - # source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#120 - def set_conn; end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#116 - def should_compress?(data); end - - # source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#141 - def ssl_configuration; end -end - -# source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#8 -Sentry::HTTPTransport::CONTENT_TYPE = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#10 -Sentry::HTTPTransport::DEFAULT_DELAY = T.let(T.unsafe(nil), Integer) - -# source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#6 -Sentry::HTTPTransport::GZIP_ENCODING = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#7 -Sentry::HTTPTransport::GZIP_THRESHOLD = T.let(T.unsafe(nil), Integer) - -# source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#12 -Sentry::HTTPTransport::RATE_LIMIT_HEADER = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/transport/http_transport.rb#11 -Sentry::HTTPTransport::RETRY_AFTER_HEADER = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/hub.rb#5 -class Sentry::Hub - include ::Sentry::ArgumentCheckingHelper - - # @return [Hub] a new instance of Hub - # - # source://sentry-ruby-core//lib/sentry/hub.rb#10 - def initialize(client, scope); end - - # source://sentry-ruby-core//lib/sentry/hub.rb#138 - def add_breadcrumb(breadcrumb, hint: T.unsafe(nil)); end - - # source://sentry-ruby-core//lib/sentry/hub.rb#42 - def bind_client(client); end - - # source://sentry-ruby-core//lib/sentry/hub.rb#116 - def capture_event(event, **options, &block); end - - # source://sentry-ruby-core//lib/sentry/hub.rb#92 - def capture_exception(exception, **options, &block); end - - # source://sentry-ruby-core//lib/sentry/hub.rb#106 - def capture_message(message, **options, &block); end - - # source://sentry-ruby-core//lib/sentry/hub.rb#32 - def clone; end - - # source://sentry-ruby-core//lib/sentry/hub.rb#24 - def configuration; end - - # source://sentry-ruby-core//lib/sentry/hub.rb#50 - def configure_scope(&block); end - - # source://sentry-ruby-core//lib/sentry/hub.rb#20 - def current_client; end - - # source://sentry-ruby-core//lib/sentry/hub.rb#28 - def current_scope; end - - # Returns the value of attribute last_event_id. - # - # source://sentry-ruby-core//lib/sentry/hub.rb#8 - def last_event_id; end - - # source://sentry-ruby-core//lib/sentry/hub.rb#16 - def new_from_top; end - - # source://sentry-ruby-core//lib/sentry/hub.rb#72 - def pop_scope; end - - # source://sentry-ruby-core//lib/sentry/hub.rb#61 - def push_scope; end - - # source://sentry-ruby-core//lib/sentry/hub.rb#76 - def start_transaction(transaction: T.unsafe(nil), custom_sampling_context: T.unsafe(nil), **options); end - - # this doesn't do anything to the already initialized background worker - # but it temporarily disables dispatching events to it - # - # source://sentry-ruby-core//lib/sentry/hub.rb#152 - def with_background_worker_disabled(&block); end - - # source://sentry-ruby-core//lib/sentry/hub.rb#54 - def with_scope(&block); end - - private - - # source://sentry-ruby-core//lib/sentry/hub.rb#163 - def current_layer; end -end - -# source://sentry-ruby-core//lib/sentry/hub.rb#167 -class Sentry::Hub::Layer - # @return [Layer] a new instance of Layer - # - # source://sentry-ruby-core//lib/sentry/hub.rb#171 - def initialize(client, scope); end - - # Returns the value of attribute client. - # - # source://sentry-ruby-core//lib/sentry/hub.rb#168 - def client; end - - # Sets the attribute client - # - # @param value the value to set the attribute client to. - # - # source://sentry-ruby-core//lib/sentry/hub.rb#168 - def client=(_arg0); end - - # Returns the value of attribute scope. - # - # source://sentry-ruby-core//lib/sentry/hub.rb#169 - def scope; end -end - -# source://sentry-ruby-core//lib/sentry/interface.rb#2 -class Sentry::Interface - # source://sentry-ruby-core//lib/sentry/interface.rb#13 - def to_hash; end - - class << self - # @private - # - # source://sentry-ruby-core//lib/sentry/interface.rb#3 - def inherited(klass); end - - # source://sentry-ruby-core//lib/sentry/interface.rb#9 - def registered; end - end -end - -# source://sentry-ruby-core//lib/sentry-ruby.rb#33 -Sentry::LOGGER_PROGNAME = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/linecache.rb#2 -class Sentry::LineCache - # @return [LineCache] a new instance of LineCache - # - # source://sentry-ruby-core//lib/sentry/linecache.rb#3 - def initialize; end - - # Any linecache you provide to Sentry must implement this method. - # Returns an Array of Strings representing the lines in the source - # file. The number of lines retrieved is (2 * context) + 1, the middle - # line should be the line requested by lineno. See specs for more information. - # - # source://sentry-ruby-core//lib/sentry/linecache.rb#11 - def get_file_context(filename, lineno, context); end - - private - - # source://sentry-ruby-core//lib/sentry/linecache.rb#35 - def getline(path, n); end - - # source://sentry-ruby-core//lib/sentry/linecache.rb#27 - def getlines(path); end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/linecache.rb#22 - def valid_path?(path); end -end - -# source://sentry-ruby-core//lib/sentry/logger.rb#6 -class Sentry::Logger < ::Logger - # @return [Logger] a new instance of Logger - # - # source://sentry-ruby-core//lib/sentry/logger.rb#10 - def initialize(*_arg0); end -end - -# source://sentry-ruby-core//lib/sentry/logger.rb#7 -Sentry::Logger::LOG_PREFIX = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/logger.rb#8 -Sentry::Logger::PROGNAME = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/utils/logging_helper.rb#2 -module Sentry::LoggingHelper - # source://sentry-ruby-core//lib/sentry/utils/logging_helper.rb#16 - def log_debug(message); end - - # source://sentry-ruby-core//lib/sentry/utils/logging_helper.rb#3 - def log_error(message, exception, debug: T.unsafe(nil)); end - - # source://sentry-ruby-core//lib/sentry/utils/logging_helper.rb#12 - def log_info(message); end - - # source://sentry-ruby-core//lib/sentry/utils/logging_helper.rb#20 - def log_warn(message); end -end - -# source://sentry-ruby-core//lib/sentry-ruby.rb#31 -Sentry::META = T.let(T.unsafe(nil), Hash) - -# source://sentry-ruby-core//lib/sentry/net/http.rb#4 -module Sentry::Net; end - -# source://sentry-ruby-core//lib/sentry/net/http.rb#5 -module Sentry::Net::HTTP - # source://sentry-ruby-core//lib/sentry/net/http.rb#50 - def do_finish; end - - # source://sentry-ruby-core//lib/sentry/net/http.rb#44 - def do_start; end - - # To explain how the entire thing works, we need to know how the original Net::HTTP#request works - # Here's part of its definition. As you can see, it usually calls itself inside a #start block - # - # ``` - # def request(req, body = nil, &block) - # unless started? - # start { - # req['connection'] ||= 'close' - # return request(req, body, &block) # <- request will be called for the second time from the first call - # } - # end - # # ..... - # end - # ``` - # - # So when the entire flow looks like this: - # - # 1. #request is called. - # - But because the request hasn't started yet, it calls #start (which then calls #do_start) - # - At this moment @sentry_span is still nil, so #set_sentry_trace_header returns early - # 2. #do_start then creates a new Span and assigns it to @sentry_span - # 3. #request is called for the second time. - # - This time @sentry_span should present. So #set_sentry_trace_header will set the sentry-trace header on the request object - # 4. Once the request finished, it - # - Records a breadcrumb if http_logger is set - # - Finishes the Span inside @sentry_span and clears the instance variable - # - # source://sentry-ruby-core//lib/sentry/net/http.rb#35 - def request(req, body = T.unsafe(nil), &block); end - - private - - # source://sentry-ruby-core//lib/sentry/net/http.rb#114 - def extract_request_info(req); end - - # source://sentry-ruby-core//lib/sentry/net/http.rb#102 - def finish_sentry_span; end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/net/http.rb#109 - def from_sentry_sdk?; end - - # source://sentry-ruby-core//lib/sentry/net/http.rb#65 - def record_sentry_breadcrumb(req, res); end - - # source://sentry-ruby-core//lib/sentry/net/http.rb#84 - def record_sentry_span(req, res); end - - # source://sentry-ruby-core//lib/sentry/net/http.rb#58 - def set_sentry_trace_header(req); end - - # source://sentry-ruby-core//lib/sentry/net/http.rb#92 - def start_sentry_span; end -end - -# source://sentry-ruby-core//lib/sentry/net/http.rb#6 -Sentry::Net::HTTP::OP_NAME = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/rack/capture_exceptions.rb#2 -module Sentry::Rack; end - -# source://sentry-ruby-core//lib/sentry/rack/capture_exceptions.rb#3 -class Sentry::Rack::CaptureExceptions - # @return [CaptureExceptions] a new instance of CaptureExceptions - # - # source://sentry-ruby-core//lib/sentry/rack/capture_exceptions.rb#4 - def initialize(app); end - - # source://sentry-ruby-core//lib/sentry/rack/capture_exceptions.rb#8 - def call(env); end - - private - - # source://sentry-ruby-core//lib/sentry/rack/capture_exceptions.rb#52 - def capture_exception(exception); end - - # source://sentry-ruby-core//lib/sentry/rack/capture_exceptions.rb#44 - def collect_exception(env); end - - # source://sentry-ruby-core//lib/sentry/rack/capture_exceptions.rb#64 - def finish_transaction(transaction, status_code); end - - # source://sentry-ruby-core//lib/sentry/rack/capture_exceptions.rb#56 - def start_transaction(env, scope); end - - # source://sentry-ruby-core//lib/sentry/rack/capture_exceptions.rb#48 - def transaction_op; end -end - -# source://sentry-ruby-core//lib/sentry/interfaces/request.rb#4 -class Sentry::RequestInterface < ::Sentry::Interface - # @return [RequestInterface] a new instance of RequestInterface - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#37 - def initialize(request:); end - - # Returns the value of attribute cookies. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def cookies; end - - # Sets the attribute cookies - # - # @param value the value to set the attribute cookies to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def cookies=(_arg0); end - - # Returns the value of attribute data. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def data; end - - # Sets the attribute data - # - # @param value the value to set the attribute data to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def data=(_arg0); end - - # Returns the value of attribute env. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def env; end - - # Sets the attribute env - # - # @param value the value to set the attribute env to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def env=(_arg0); end - - # Returns the value of attribute headers. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def headers; end - - # Sets the attribute headers - # - # @param value the value to set the attribute headers to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def headers=(_arg0); end - - # Returns the value of attribute method. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def method; end - - # Sets the attribute method - # - # @param value the value to set the attribute method to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def method=(_arg0); end - - # Returns the value of attribute query_string. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def query_string; end - - # Sets the attribute query_string - # - # @param value the value to set the attribute query_string to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def query_string=(_arg0); end - - # Returns the value of attribute url. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def url; end - - # Sets the attribute url - # - # @param value the value to set the attribute url to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#18 - def url=(_arg0); end - - private - - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#91 - def encode_to_utf_8(value); end - - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#119 - def filter_and_format_env(env); end - - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#68 - def filter_and_format_headers(env); end - - # Rack adds in an incorrect HTTP_VERSION key, which causes downstream - # to think this is a Version header. Instead, this is mapped to - # env['SERVER_PROTOCOL']. But we don't want to ignore a valid header - # if the request has legitimately sent a Version header themselves. - # See: https://github.com/rack/rack/blob/028438f/lib/rack/handler/cgi.rb#L29 - # NOTE: This will be removed in version 3.0+ - # - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#115 - def is_server_protocol?(key, value, protocol_version); end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#103 - def is_skippable_header?(key); end - - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#55 - def read_data_from(request); end - - class << self - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#20 - def build(env:); end - - # source://sentry-ruby-core//lib/sentry/interfaces/request.rb#26 - def clean_env(env); end - end -end - -# source://sentry-ruby-core//lib/sentry/interfaces/request.rb#6 -Sentry::RequestInterface::CONTENT_HEADERS = T.let(T.unsafe(nil), Array) - -# source://sentry-ruby-core//lib/sentry/interfaces/request.rb#7 -Sentry::RequestInterface::IP_HEADERS = T.let(T.unsafe(nil), Array) - -# See Sentry server default limits at -# https://github.com/getsentry/sentry/blob/master/src/sentry/conf/server.py -# -# source://sentry-ruby-core//lib/sentry/interfaces/request.rb#16 -Sentry::RequestInterface::MAX_BODY_LIMIT = T.let(T.unsafe(nil), Integer) - -# source://sentry-ruby-core//lib/sentry/interfaces/request.rb#5 -Sentry::RequestInterface::REQUEST_ID_HEADERS = T.let(T.unsafe(nil), Array) - -# source://sentry-ruby-core//lib/sentry-ruby.rb#35 -Sentry::SENTRY_TRACE_HEADER_NAME = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/scope.rb#5 -class Sentry::Scope - include ::Sentry::ArgumentCheckingHelper - - # @return [Scope] a new instance of Scope - # - # source://sentry-ruby-core//lib/sentry/scope.rb#12 - def initialize(max_breadcrumbs: T.unsafe(nil)); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#46 - def add_breadcrumb(breadcrumb); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#163 - def add_event_processor(&block); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#21 - def apply_to_event(event, hint = T.unsafe(nil)); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#10 - def breadcrumbs; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#17 - def clear; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#50 - def clear_breadcrumbs; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#10 - def contexts; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#54 - def dup; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#10 - def event_processors; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#10 - def extra; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#10 - def fingerprint; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#153 - def get_span; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#149 - def get_transaction; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#10 - def level; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#10 - def rack_env; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#132 - def set_context(key, value); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#127 - def set_contexts(contexts_hash); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#114 - def set_extra(key, value); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#109 - def set_extras(extras_hash); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#157 - def set_fingerprint(fingerprint); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#137 - def set_level(level); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#94 - def set_rack_env(env); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#99 - def set_span(span); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#123 - def set_tag(key, value); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#118 - def set_tags(tags_hash); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#141 - def set_transaction_name(transaction_name); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#104 - def set_user(user_hash); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#10 - def span; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#10 - def tags; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#145 - def transaction_name; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#10 - def transaction_names; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#78 - def update_from_options(contexts: T.unsafe(nil), extra: T.unsafe(nil), tags: T.unsafe(nil), user: T.unsafe(nil), level: T.unsafe(nil), fingerprint: T.unsafe(nil)); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#67 - def update_from_scope(scope); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#10 - def user; end - - protected - - # source://sentry-ruby-core//lib/sentry/scope.rb#170 - def breadcrumbs=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#170 - def contexts=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#170 - def event_processors=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#170 - def extra=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#170 - def fingerprint=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#170 - def level=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#170 - def rack_env=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#170 - def span=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#170 - def tags=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#170 - def transaction_names=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/scope.rb#170 - def user=(_arg0); end - - private - - # source://sentry-ruby-core//lib/sentry/scope.rb#174 - def set_default_value; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#188 - def set_new_breadcrumb_buffer; end - - class << self - # source://sentry-ruby-core//lib/sentry/scope.rb#194 - def os_context; end - - # source://sentry-ruby-core//lib/sentry/scope.rb#207 - def runtime_context; end - end -end - -# source://sentry-ruby-core//lib/sentry/scope.rb#8 -Sentry::Scope::ATTRIBUTES = T.let(T.unsafe(nil), Array) - -# source://sentry-ruby-core//lib/sentry/interfaces/single_exception.rb#2 -class Sentry::SingleExceptionInterface < ::Sentry::Interface - # @return [SingleExceptionInterface] a new instance of SingleExceptionInterface - # - # source://sentry-ruby-core//lib/sentry/interfaces/single_exception.rb#5 - def initialize(exception:, stacktrace: T.unsafe(nil)); end - - # Returns the value of attribute module. - # - # source://sentry-ruby-core//lib/sentry/interfaces/single_exception.rb#3 - def module; end - - # Returns the value of attribute stacktrace. - # - # source://sentry-ruby-core//lib/sentry/interfaces/single_exception.rb#3 - def stacktrace; end - - # Returns the value of attribute thread_id. - # - # source://sentry-ruby-core//lib/sentry/interfaces/single_exception.rb#3 - def thread_id; end - - # source://sentry-ruby-core//lib/sentry/interfaces/single_exception.rb#13 - def to_hash; end - - # Returns the value of attribute type. - # - # source://sentry-ruby-core//lib/sentry/interfaces/single_exception.rb#3 - def type; end - - # Returns the value of attribute value. - # - # source://sentry-ruby-core//lib/sentry/interfaces/single_exception.rb#3 - def value; end - - class << self - # patch this method if you want to change an exception's stacktrace frames - # also see `StacktraceBuilder.build`. - # - # source://sentry-ruby-core//lib/sentry/interfaces/single_exception.rb#21 - def build_with_stacktrace(exception:, stacktrace_builder:); end - end -end - -# source://sentry-ruby-core//lib/sentry/span.rb#5 -class Sentry::Span - # @return [Span] a new instance of Span - # - # source://sentry-ruby-core//lib/sentry/span.rb#24 - def initialize(description: T.unsafe(nil), op: T.unsafe(nil), status: T.unsafe(nil), trace_id: T.unsafe(nil), parent_span_id: T.unsafe(nil), sampled: T.unsafe(nil), start_timestamp: T.unsafe(nil), timestamp: T.unsafe(nil)); end - - # Returns the value of attribute data. - # - # source://sentry-ruby-core//lib/sentry/span.rb#21 - def data; end - - # source://sentry-ruby-core//lib/sentry/span.rb#109 - def deep_dup; end - - # Returns the value of attribute description. - # - # source://sentry-ruby-core//lib/sentry/span.rb#21 - def description; end - - # source://sentry-ruby-core//lib/sentry/span.rb#47 - def finish; end - - # source://sentry-ruby-core//lib/sentry/span.rb#77 - def get_trace_context; end - - # Returns the value of attribute op. - # - # source://sentry-ruby-core//lib/sentry/span.rb#21 - def op; end - - # Returns the value of attribute parent_span_id. - # - # source://sentry-ruby-core//lib/sentry/span.rb#21 - def parent_span_id; end - - # Returns the value of attribute sampled. - # - # source://sentry-ruby-core//lib/sentry/span.rb#21 - def sampled; end - - # source://sentry-ruby-core//lib/sentry/span.rb#142 - def set_data(key, value); end - - # source://sentry-ruby-core//lib/sentry/span.rb#117 - def set_description(description); end - - # source://sentry-ruby-core//lib/sentry/span.rb#129 - def set_http_status(status_code); end - - # source://sentry-ruby-core//lib/sentry/span.rb#113 - def set_op(op); end - - # source://sentry-ruby-core//lib/sentry/span.rb#121 - def set_status(status); end - - # source://sentry-ruby-core//lib/sentry/span.rb#146 - def set_tag(key, value); end - - # source://sentry-ruby-core//lib/sentry/span.rb#125 - def set_timestamp(timestamp); end - - # Returns the value of attribute span_id. - # - # source://sentry-ruby-core//lib/sentry/span.rb#21 - def span_id; end - - # Returns the value of attribute span_recorder. - # - # source://sentry-ruby-core//lib/sentry/span.rb#22 - def span_recorder; end - - # Sets the attribute span_recorder - # - # @param value the value to set the attribute span_recorder to. - # - # source://sentry-ruby-core//lib/sentry/span.rb#22 - def span_recorder=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/span.rb#88 - def start_child(**options); end - - # Returns the value of attribute start_timestamp. - # - # source://sentry-ruby-core//lib/sentry/span.rb#21 - def start_timestamp; end - - # Returns the value of attribute status. - # - # source://sentry-ruby-core//lib/sentry/span.rb#21 - def status; end - - # Returns the value of attribute tags. - # - # source://sentry-ruby-core//lib/sentry/span.rb#21 - def tags; end - - # Returns the value of attribute timestamp. - # - # source://sentry-ruby-core//lib/sentry/span.rb#21 - def timestamp; end - - # source://sentry-ruby-core//lib/sentry/span.rb#62 - def to_hash; end - - # source://sentry-ruby-core//lib/sentry/span.rb#55 - def to_sentry_trace; end - - # Returns the value of attribute trace_id. - # - # source://sentry-ruby-core//lib/sentry/span.rb#21 - def trace_id; end - - # Returns the value of attribute transaction. - # - # source://sentry-ruby-core//lib/sentry/span.rb#22 - def transaction; end - - # Sets the attribute transaction - # - # @param value the value to set the attribute transaction to. - # - # source://sentry-ruby-core//lib/sentry/span.rb#22 - def transaction=(_arg0); end - - # @yield [child_span] - # - # source://sentry-ruby-core//lib/sentry/span.rb#101 - def with_child_span(**options, &block); end -end - -# source://sentry-ruby-core//lib/sentry/span.rb#6 -Sentry::Span::STATUS_MAP = T.let(T.unsafe(nil), Hash) - -# source://sentry-ruby-core//lib/sentry/interfaces/stacktrace_builder.rb#2 -class Sentry::StacktraceBuilder - # @return [StacktraceBuilder] a new instance of StacktraceBuilder - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace_builder.rb#5 - def initialize(project_root:, app_dirs_pattern:, linecache:, context_lines:, backtrace_cleanup_callback: T.unsafe(nil)); end - - # Returns the value of attribute app_dirs_pattern. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace_builder.rb#3 - def app_dirs_pattern; end - - # Returns the value of attribute backtrace_cleanup_callback. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace_builder.rb#3 - def backtrace_cleanup_callback; end - - # you can pass a block to customize/exclude frames: - # - # ```ruby - # builder.build(backtrace) do |frame| - # if frame.module.match?(/a_gem/) - # nil - # else - # frame - # end - # end - # ``` - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace_builder.rb#24 - def build(backtrace:, &frame_callback); end - - # Returns the value of attribute context_lines. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace_builder.rb#3 - def context_lines; end - - # Returns the value of attribute linecache. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace_builder.rb#3 - def linecache; end - - # Returns the value of attribute project_root. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace_builder.rb#3 - def project_root; end - - private - - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace_builder.rb#38 - def convert_parsed_line_into_frame(line); end - - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace_builder.rb#44 - def parse_backtrace_lines(backtrace); end -end - -# source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#2 -class Sentry::StacktraceInterface - # @return [StacktraceInterface] a new instance of StacktraceInterface - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#5 - def initialize(frames:); end - - # Returns the value of attribute frames. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#3 - def frames; end - - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#9 - def to_hash; end -end - -# Not actually an interface, but I want to use the same style -# -# source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#16 -class Sentry::StacktraceInterface::Frame < ::Sentry::Interface - # @return [Frame] a new instance of Frame - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#20 - def initialize(project_root, line); end - - # Returns the value of attribute abs_path. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def abs_path; end - - # Sets the attribute abs_path - # - # @param value the value to set the attribute abs_path to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def abs_path=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#31 - def compute_filename; end - - # Returns the value of attribute context_line. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def context_line; end - - # Sets the attribute context_line - # - # @param value the value to set the attribute context_line to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def context_line=(_arg0); end - - # Returns the value of attribute filename. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def filename; end - - # Sets the attribute filename - # - # @param value the value to set the attribute filename to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def filename=(_arg0); end - - # Returns the value of attribute function. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def function; end - - # Sets the attribute function - # - # @param value the value to set the attribute function to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def function=(_arg0); end - - # Returns the value of attribute in_app. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def in_app; end - - # Sets the attribute in_app - # - # @param value the value to set the attribute in_app to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def in_app=(_arg0); end - - # Returns the value of attribute lineno. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def lineno; end - - # Sets the attribute lineno - # - # @param value the value to set the attribute lineno to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def lineno=(_arg0); end - - # Returns the value of attribute module. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def module; end - - # Sets the attribute module - # - # @param value the value to set the attribute module to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def module=(_arg0); end - - # Returns the value of attribute post_context. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def post_context; end - - # Sets the attribute post_context - # - # @param value the value to set the attribute post_context to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def post_context=(_arg0); end - - # Returns the value of attribute pre_context. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def pre_context; end - - # Sets the attribute pre_context - # - # @param value the value to set the attribute pre_context to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def pre_context=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#46 - def set_context(linecache, context_lines); end - - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#53 - def to_hash(*args); end - - # Returns the value of attribute vars. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def vars; end - - # Sets the attribute vars - # - # @param value the value to set the attribute vars to. - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#17 - def vars=(_arg0); end - - private - - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#68 - def longest_load_path; end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/interfaces/stacktrace.rb#64 - def under_project_root?; end -end - -# source://sentry-ruby-core//lib/sentry-ruby.rb#37 -Sentry::THREAD_LOCAL = T.let(T.unsafe(nil), Symbol) - -# source://sentry-ruby-core//lib/sentry/interfaces/threads.rb#2 -class Sentry::ThreadsInterface - # @return [ThreadsInterface] a new instance of ThreadsInterface - # - # source://sentry-ruby-core//lib/sentry/interfaces/threads.rb#3 - def initialize(crashed: T.unsafe(nil), stacktrace: T.unsafe(nil)); end - - # source://sentry-ruby-core//lib/sentry/interfaces/threads.rb#11 - def to_hash; end - - class << self - # patch this method if you want to change a threads interface's stacktrace frames - # also see `StacktraceBuilder.build`. - # - # source://sentry-ruby-core//lib/sentry/interfaces/threads.rb#27 - def build(backtrace:, stacktrace_builder:, **options); end - end -end - -# source://sentry-ruby-core//lib/sentry/transaction.rb#2 -class Sentry::Transaction < ::Sentry::Span - include ::Sentry::LoggingHelper - - # @return [Transaction] a new instance of Transaction - # - # source://sentry-ruby-core//lib/sentry/transaction.rb#17 - def initialize(hub:, name: T.unsafe(nil), parent_sampled: T.unsafe(nil), **options); end - - # Returns the value of attribute configuration. - # - # source://sentry-ruby-core//lib/sentry/transaction.rb#15 - def configuration; end - - # source://sentry-ruby-core//lib/sentry/transaction.rb#53 - def deep_dup; end - - # source://sentry-ruby-core//lib/sentry/transaction.rb#114 - def finish(hub: T.unsafe(nil)); end - - # Returns the value of attribute hub. - # - # source://sentry-ruby-core//lib/sentry/transaction.rb#15 - def hub; end - - # Returns the value of attribute logger. - # - # source://sentry-ruby-core//lib/sentry/transaction.rb#15 - def logger; end - - # Returns the value of attribute name. - # - # source://sentry-ruby-core//lib/sentry/transaction.rb#15 - def name; end - - # Returns the value of attribute parent_sampled. - # - # source://sentry-ruby-core//lib/sentry/transaction.rb#15 - def parent_sampled; end - - # source://sentry-ruby-core//lib/sentry/transaction.rb#66 - def set_initial_sample_decision(sampling_context:); end - - # source://sentry-ruby-core//lib/sentry/transaction.rb#47 - def to_hash; end - - protected - - # source://sentry-ruby-core//lib/sentry/transaction.rb#140 - def init_span_recorder(limit = T.unsafe(nil)); end - - private - - # source://sentry-ruby-core//lib/sentry/transaction.rb#147 - def generate_transaction_description; end - - class << self - # source://sentry-ruby-core//lib/sentry/transaction.rb#29 - def from_sentry_trace(sentry_trace, hub: T.unsafe(nil), **options); end - end -end - -# source://sentry-ruby-core//lib/sentry/transaction.rb#11 -Sentry::Transaction::MESSAGE_PREFIX = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/transaction.rb#3 -Sentry::Transaction::SENTRY_TRACE_REGEXP = T.let(T.unsafe(nil), Regexp) - -# source://sentry-ruby-core//lib/sentry/transaction.rb#154 -class Sentry::Transaction::SpanRecorder - # @return [SpanRecorder] a new instance of SpanRecorder - # - # source://sentry-ruby-core//lib/sentry/transaction.rb#157 - def initialize(max_length); end - - # source://sentry-ruby-core//lib/sentry/transaction.rb#162 - def add(span); end - - # Returns the value of attribute max_length. - # - # source://sentry-ruby-core//lib/sentry/transaction.rb#155 - def max_length; end - - # Returns the value of attribute spans. - # - # source://sentry-ruby-core//lib/sentry/transaction.rb#155 - def spans; end -end - -# whitespace -# -# source://sentry-ruby-core//lib/sentry/transaction.rb#10 -Sentry::Transaction::UNLABELD_NAME = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/transaction_event.rb#4 -class Sentry::TransactionEvent < ::Sentry::Event - # @return [TransactionEvent] a new instance of TransactionEvent - # - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#21 - def initialize(configuration:, integration_meta: T.unsafe(nil), message: T.unsafe(nil)); end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def contexts; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#16 - def contexts=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def environment; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#16 - def environment=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def event_id; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#16 - def event_id=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def extra; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#16 - def extra=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def level; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def modules; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#16 - def modules=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def platform; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#16 - def platform=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def release; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#16 - def release=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def sdk; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#16 - def sdk=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def server_name; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#16 - def server_name=(_arg0); end - - # Returns the value of attribute spans. - # - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#19 - def spans; end - - # Sets the attribute spans - # - # @param value the value to set the attribute spans to. - # - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#19 - def spans=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def start_timestamp; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#26 - def start_timestamp=(time); end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def tags; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#16 - def tags=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def timestamp; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#30 - def to_hash; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def transaction; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#16 - def transaction=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def type; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#17 - def user; end - - # source://sentry-ruby-core//lib/sentry/transaction_event.rb#16 - def user=(_arg0); end -end - -# source://sentry-ruby-core//lib/sentry/transaction_event.rb#7 -Sentry::TransactionEvent::SERIALIZEABLE_ATTRIBUTES = T.let(T.unsafe(nil), Array) - -# source://sentry-ruby-core//lib/sentry/transaction_event.rb#5 -Sentry::TransactionEvent::TYPE = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/transaction_event.rb#14 -Sentry::TransactionEvent::WRITER_ATTRIBUTES = T.let(T.unsafe(nil), Array) - -# source://sentry-ruby-core//lib/sentry/transport/configuration.rb#2 -class Sentry::Transport - include ::Sentry::LoggingHelper - - # @return [Transport] a new instance of Transport - # - # source://sentry-ruby-core//lib/sentry/transport.rb#14 - def initialize(configuration); end - - # Returns the value of attribute configuration. - # - # source://sentry-ruby-core//lib/sentry/transport.rb#11 - def configuration; end - - # Sets the attribute configuration - # - # @param value the value to set the attribute configuration to. - # - # source://sentry-ruby-core//lib/sentry/transport.rb#11 - def configuration=(_arg0); end - - # source://sentry-ruby-core//lib/sentry/transport.rb#92 - def encode(event); end - - # source://sentry-ruby-core//lib/sentry/transport.rb#80 - def generate_auth_header; end - - # @return [Boolean] - # - # source://sentry-ruby-core//lib/sentry/transport.rb#51 - def is_rate_limited?(item_type); end - - # Returns the value of attribute logger. - # - # source://sentry-ruby-core//lib/sentry/transport.rb#12 - def logger; end - - # Returns the value of attribute rate_limits. - # - # source://sentry-ruby-core//lib/sentry/transport.rb#12 - def rate_limits; end - - # @raise [NotImplementedError] - # - # source://sentry-ruby-core//lib/sentry/transport.rb#22 - def send_data(data, options = T.unsafe(nil)); end - - # source://sentry-ruby-core//lib/sentry/transport.rb#26 - def send_event(event); end - - private - - # source://sentry-ruby-core//lib/sentry/transport.rb#112 - def get_item_type(event_hash); end -end - -# source://sentry-ruby-core//lib/sentry/transport/configuration.rb#3 -class Sentry::Transport::Configuration - # @return [Configuration] a new instance of Configuration - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#8 - def initialize; end - - # Returns the value of attribute encoding. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def encoding; end - - # Sets the attribute encoding - # - # @param value the value to set the attribute encoding to. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def encoding=(_arg0); end - - # Returns the value of attribute faraday_builder. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def faraday_builder; end - - # Sets the attribute faraday_builder - # - # @param value the value to set the attribute faraday_builder to. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def faraday_builder=(_arg0); end - - # Returns the value of attribute http_adapter. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def http_adapter; end - - # Sets the attribute http_adapter - # - # @param value the value to set the attribute http_adapter to. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def http_adapter=(_arg0); end - - # Returns the value of attribute open_timeout. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def open_timeout; end - - # Sets the attribute open_timeout - # - # @param value the value to set the attribute open_timeout to. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def open_timeout=(_arg0); end - - # Returns the value of attribute proxy. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def proxy; end - - # Sets the attribute proxy - # - # @param value the value to set the attribute proxy to. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def proxy=(_arg0); end - - # Returns the value of attribute ssl. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def ssl; end - - # Sets the attribute ssl - # - # @param value the value to set the attribute ssl to. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def ssl=(_arg0); end - - # Returns the value of attribute ssl_ca_file. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def ssl_ca_file; end - - # Sets the attribute ssl_ca_file - # - # @param value the value to set the attribute ssl_ca_file to. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def ssl_ca_file=(_arg0); end - - # Returns the value of attribute ssl_verification. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def ssl_verification; end - - # Sets the attribute ssl_verification - # - # @param value the value to set the attribute ssl_verification to. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def ssl_verification=(_arg0); end - - # Returns the value of attribute timeout. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def timeout; end - - # Sets the attribute timeout - # - # @param value the value to set the attribute timeout to. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#4 - def timeout=(_arg0); end - - # Returns the value of attribute transport_class. - # - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#6 - def transport_class; end - - # source://sentry-ruby-core//lib/sentry/transport/configuration.rb#15 - def transport_class=(klass); end -end - -# source://sentry-ruby-core//lib/sentry/transport.rb#6 -Sentry::Transport::PROTOCOL_VERSION = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/transport.rb#7 -Sentry::Transport::USER_AGENT = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/utils/exception_cause_chain.rb#2 -module Sentry::Utils; end - -# source://sentry-ruby-core//lib/sentry/utils/exception_cause_chain.rb#3 -module Sentry::Utils::ExceptionCauseChain - class << self - # source://sentry-ruby-core//lib/sentry/utils/exception_cause_chain.rb#4 - def exception_to_array(exception); end - end -end - -# source://sentry-ruby-core//lib/sentry/utils/real_ip.rb#9 -class Sentry::Utils::RealIp - # @return [RealIp] a new instance of RealIp - # - # source://sentry-ruby-core//lib/sentry/utils/real_ip.rb#21 - def initialize(remote_addr: T.unsafe(nil), client_ip: T.unsafe(nil), real_ip: T.unsafe(nil), forwarded_for: T.unsafe(nil), trusted_proxies: T.unsafe(nil)); end - - # source://sentry-ruby-core//lib/sentry/utils/real_ip.rb#41 - def calculate_ip; end - - # Returns the value of attribute ip. - # - # source://sentry-ruby-core//lib/sentry/utils/real_ip.rb#19 - def ip; end - - protected - - # source://sentry-ruby-core//lib/sentry/utils/real_ip.rb#77 - def filter_trusted_proxy_addresses(ips); end - - # source://sentry-ruby-core//lib/sentry/utils/real_ip.rb#62 - def ips_from(header); end -end - -# source://sentry-ruby-core//lib/sentry/utils/real_ip.rb#10 -Sentry::Utils::RealIp::LOCAL_ADDRESSES = T.let(T.unsafe(nil), Array) - -# source://sentry-ruby-core//lib/sentry/utils/request_id.rb#3 -module Sentry::Utils::RequestId - class << self - # Request ID based on ActionDispatch::RequestId - # - # source://sentry-ruby-core//lib/sentry/utils/request_id.rb#7 - def read_from(env); end - end -end - -# source://sentry-ruby-core//lib/sentry/utils/request_id.rb#4 -Sentry::Utils::RequestId::REQUEST_ID_HEADERS = T.let(T.unsafe(nil), Array) - -# source://sentry-ruby-core//lib/sentry/version.rb#2 -Sentry::VERSION = T.let(T.unsafe(nil), String) - -# source://sentry-ruby-core//lib/sentry/core_ext/object/duplicable.rb#78 -class Symbol - include ::Comparable -end diff --git a/sorbet/rbi/gems/sentry-ruby@4.7.1.rbi b/sorbet/rbi/gems/sentry-ruby@4.7.1.rbi deleted file mode 100644 index 1c1484a2..00000000 --- a/sorbet/rbi/gems/sentry-ruby@4.7.1.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `sentry-ruby` gem. -# Please instead update this file by running `bin/tapioca gem sentry-ruby`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/sentry-ruby@5.17.3.rbi b/sorbet/rbi/gems/sentry-ruby@5.17.3.rbi new file mode 100644 index 00000000..7398b463 --- /dev/null +++ b/sorbet/rbi/gems/sentry-ruby@5.17.3.rbi @@ -0,0 +1,5812 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `sentry-ruby` gem. +# Please instead update this file by running `bin/tapioca gem sentry-ruby`. + +# source://sentry-ruby//lib/sentry/core_ext/object/deep_dup.rb#26 +class Array + include ::Enumerable + + # Returns a deep copy of array. + # + # array = [1, [2, 3]] + # dup = array.deep_dup + # dup[1][2] = 4 + # + # array[1][2] # => nil + # dup[1][2] # => 4 + # + # source://sentry-ruby//lib/sentry/core_ext/object/deep_dup.rb#35 + def deep_dup; end +end + +# source://sentry-ruby//lib/sentry/core_ext/object/duplicable.rb#109 +class BigDecimal < ::Numeric + # BigDecimals are duplicable: + # + # BigDecimal("1.2").duplicable? # => true + # BigDecimal("1.2").dup # => # + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/core_ext/object/duplicable.rb#114 + def duplicable?; end +end + +# source://sentry-ruby//lib/sentry/core_ext/object/deep_dup.rb#40 +class Hash + include ::Enumerable + + # Returns a deep copy of hash. + # + # hash = { a: { b: 'b' } } + # dup = hash.deep_dup + # dup[:a][:c] = 'c' + # + # hash[:a][:c] # => nil + # dup[:a][:c] # => "c" + # + # source://sentry-ruby//lib/sentry/core_ext/object/deep_dup.rb#49 + def deep_dup; end +end + +# source://sentry-ruby//lib/sentry/core_ext/object/duplicable.rb#119 +class Method + # Methods are not duplicable: + # + # method(:puts).duplicable? # => false + # method(:puts).dup # => TypeError: allocator undefined for Method + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/core_ext/object/duplicable.rb#124 + def duplicable?; end +end + +# source://sentry-ruby//lib/sentry/core_ext/object/duplicable.rb#94 +class Numeric + include ::Comparable +end + +# -- +# Most objects are cloneable, but not all. For example you can't dup methods: +# +# method(:puts).dup # => TypeError: allocator undefined for Method +# +# Classes may signal their instances are not duplicable removing +dup+/+clone+ +# or raising exceptions from them. So, to dup an arbitrary object you normally +# use an optimistic approach and are ready to catch an exception, say: +# +# arbitrary_object.dup rescue object +# +# Rails dups objects in a few critical spots where they are not that arbitrary. +# That rescue is very expensive (like 40 times slower than a predicate), and it +# is often triggered. +# +# That's why we hardcode the following cases and check duplicable? instead of +# using that rescue idiom. +# ++ +# +# source://sentry-ruby//lib/sentry/core_ext/object/duplicable.rb#27 +class Object < ::BasicObject + include ::Kernel + include ::PP::ObjectMixin + + # Returns a deep copy of object if it's duplicable. If it's + # not duplicable, returns +self+. + # + # object = Object.new + # dup = object.deep_dup + # dup.instance_variable_set(:@a, 1) + # + # object.instance_variable_defined?(:@a) # => false + # dup.instance_variable_defined?(:@a) # => true + # + # source://sentry-ruby//lib/sentry/core_ext/object/deep_dup.rb#21 + def deep_dup; end + + # Can you safely dup this object? + # + # False for method objects; + # true otherwise. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/core_ext/object/duplicable.rb#32 + def duplicable?; end +end + +# Based on ActionDispatch::RemoteIp. All security-related precautions from that +# middleware have been removed, because the Event IP just needs to be accurate, +# and spoofing an IP here only makes data inaccurate, not insecure. Don't re-use +# this module if you have to *trust* the IP address. +# +# source://sentry-ruby//lib/sentry/version.rb#3 +module Sentry + class << self + # Takes an instance of Sentry::Breadcrumb and stores it to the current active scope. + # + # @return [Breadcrumb, nil] + # + # source://sentry-ruby//lib/sentry-ruby.rb#303 + def add_breadcrumb(breadcrumb, **options); end + + # Add a global event processor [Proc]. + # These run before scope event processors. + # + # @example + # Sentry.add_global_event_processor do |event, hint| + # event.tags = { foo: 42 } + # event + # end + # @return [void] + # @yieldparam event [Event] + # @yieldparam hint [Hash, nil] + # + # source://sentry-ruby//lib/sentry-ruby.rb#522 + def add_global_event_processor(&block); end + + # source://sentry-ruby//lib/sentry-ruby.rb#103 + def apply_patches(config); end + + # @return [BackgroundWorker] + # + # source://sentry-ruby//lib/sentry-ruby.rb#71 + def background_worker; end + + # Sets the attribute background_worker + # + # @param value the value to set the attribute background_worker to. + # + # source://sentry-ruby//lib/sentry-ruby.rb#71 + def background_worker=(_arg0); end + + # Returns the value of attribute backpressure_monitor. + # + # source://sentry-ruby//lib/sentry-ruby.rb#79 + def backpressure_monitor; end + + # Captures a check-in and sends it to Sentry via the currently active hub. + # + # @option options + # @option options + # @option options + # @param slug [String] identifier of this monitor + # @param status [Symbol] status of this check-in, one of {CheckInEvent::VALID_STATUSES} + # @param options [Hash] extra check-in options + # @return [String, nil] The {CheckInEvent#check_in_id} to use for later updates on the same slug + # + # source://sentry-ruby//lib/sentry-ruby.rb#462 + def capture_check_in(slug, status, **options); end + + # Takes an instance of Sentry::Event and dispatches it to the currently active hub. + # + # @return [Event, nil] + # + # source://sentry-ruby//lib/sentry-ruby.rb#446 + def capture_event(event); end + + # Takes an exception and reports it to Sentry via the currently active hub. + # + # @return [Event, nil] + # @yieldparam scope [Scope] + # + # source://sentry-ruby//lib/sentry-ruby.rb#410 + def capture_exception(exception, **options, &block); end + + # Takes a message string and reports it to Sentry via the currently active hub. + # + # @return [Event, nil] + # @yieldparam scope [Scope] + # + # source://sentry-ruby//lib/sentry-ruby.rb#438 + def capture_message(message, **options, &block); end + + # Clones the main thread's active hub and stores it to the current thread. + # + # @return [void] + # + # source://sentry-ruby//lib/sentry-ruby.rb#340 + def clone_hub_to_current_thread; end + + # Flushes pending events and cleans up SDK state. + # SDK will stop sending events and all top-level APIs will be no-ops after this. + # + # @return [void] + # + # source://sentry-ruby//lib/sentry-ruby.rb#241 + def close; end + + # source://sentry-ruby//lib/sentry-ruby.rb#155 + def configuration; end + + # Takes a block and yields the current active scope. + # + # @example + # Sentry.configure_scope do |scope| + # scope.set_tags(foo: "bar") + # end + # + # Sentry.capture_message("test message") # this event will have tags { foo: "bar" } + # @return [void] + # @yieldparam scope [Scope] + # + # source://sentry-ruby//lib/sentry-ruby.rb#356 + def configure_scope(&block); end + + # Continue an incoming trace from a rack env like hash. + # + # @param env [Hash] + # @return [Transaction, nil] + # + # source://sentry-ruby//lib/sentry-ruby.rb#557 + def continue_trace(env, **options); end + + # Returns an uri for security policy reporting that's generated from the given DSN + # (To learn more about security policy reporting: https://docs.sentry.io/product/security-policy-reporting/) + # + # It returns nil if + # - The SDK is not initialized yet. + # - The DSN is not provided or is invalid. + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry-ruby.rb#288 + def csp_report_uri; end + + # Checks if the exception object has been captured by the SDK. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry-ruby.rb#504 + def exception_captured?(exc); end + + # source://sentry-ruby//lib/sentry-ruby.rb#53 + def exception_locals_tp; end + + # Returns the baggage header for distributed tracing. + # Can be either from the currently active span or the propagation context. + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry-ruby.rb#539 + def get_baggage; end + + # Returns the current active client. + # + # @return [Client, nil] + # + # source://sentry-ruby//lib/sentry-ruby.rb#324 + def get_current_client; end + + # Returns the current active hub. + # If the current thread doesn't have an active hub, it will clone the main thread's active hub, + # stores it in the current thread, and then returns it. + # + # @return [Hub] + # + # source://sentry-ruby//lib/sentry-ruby.rb#313 + def get_current_hub; end + + # Returns the current active scope. + # + # @return [Scope, nil] + # + # source://sentry-ruby//lib/sentry-ruby.rb#332 + def get_current_scope; end + + # Returns the main thread's active hub. + # + # @return [Hub] + # + # source://sentry-ruby//lib/sentry-ruby.rb#296 + def get_main_hub; end + + # Returns the a Hash containing sentry-trace and baggage. + # Can be either from the currently active span or the propagation context. + # + # @return [Hash, nil] + # + # source://sentry-ruby//lib/sentry-ruby.rb#548 + def get_trace_propagation_headers; end + + # Returns the traceparent (sentry-trace) header for distributed tracing. + # Can be either from the currently active span or the propagation context. + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry-ruby.rb#530 + def get_traceparent; end + + # Initializes the SDK with given configuration. + # + # @return [void] + # @yieldparam config [Configuration] + # + # source://sentry-ruby//lib/sentry-ruby.rb#219 + def init(&block); end + + # Returns true if the SDK is initialized. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry-ruby.rb#276 + def initialized?; end + + # Returns a hash that contains all the integrations that have been registered to the main SDK. + # + # @return [Hash{String=>Hash}] + # + # source://sentry-ruby//lib/sentry-ruby.rb#119 + def integrations; end + + # Returns the id of the lastly reported Sentry::Event. + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry-ruby.rb#496 + def last_event_id; end + + # source://sentry-ruby//lib/sentry-ruby.rb#573 + def logger; end + + # Returns the value of attribute metrics_aggregator. + # + # source://sentry-ruby//lib/sentry-ruby.rb#83 + def metrics_aggregator; end + + # Registers the SDK integration with its name and version. + # + # @param name [String] name of the integration + # @param version [String] version of the integration + # + # source://sentry-ruby//lib/sentry-ruby.rb#127 + def register_integration(name, version); end + + # source://sentry-ruby//lib/sentry-ruby.rb#88 + def register_patch(key, patch = T.unsafe(nil), target = T.unsafe(nil), &block); end + + # source://sentry-ruby//lib/sentry-ruby.rb#110 + def registered_patches; end + + # source://sentry-ruby//lib/sentry-ruby.rb#578 + def sdk_meta; end + + # source://sentry-ruby//lib/sentry-ruby.rb#162 + def send_event(*args); end + + # Returns the value of attribute session_flusher. + # + # source://sentry-ruby//lib/sentry-ruby.rb#75 + def session_flusher; end + + # source://sentry-ruby//lib/sentry-ruby.rb#208 + def set_context(*args); end + + # source://sentry-ruby//lib/sentry-ruby.rb#194 + def set_extras(*args); end + + # source://sentry-ruby//lib/sentry-ruby.rb#187 + def set_tags(*args); end + + # source://sentry-ruby//lib/sentry-ruby.rb#201 + def set_user(*args); end + + # Takes or initializes a new Sentry::Transaction and makes a sampling decision for it. + # + # @return [Transaction, nil] + # + # source://sentry-ruby//lib/sentry-ruby.rb#470 + def start_transaction(**options); end + + # source://sentry-ruby//lib/sentry-ruby.rb#565 + def sys_command(command); end + + # source://sentry-ruby//lib/sentry-ruby.rb#583 + def utc_now; end + + # Records the block's execution as a child of the current span. + # If the current scope doesn't have a span, the block would still be executed but the yield param will be nil. + # + # @example + # Sentry.with_child_span(op: "my operation") do |child_span| + # child_span.set_data(operation_data) + # child_span.set_description(operation_detail) + # # result will be returned + # end + # @param attributes [Hash] attributes for the child span. + # @return yield result + # @yieldparam child_span [Span, nil] + # + # source://sentry-ruby//lib/sentry-ruby.rb#488 + def with_child_span(**attributes, &block); end + + # Takes a block and evaluates it. If the block raised an exception, it reports the exception to Sentry and re-raises it. + # If the block ran without exception, it returns the evaluation result. + # + # @example + # Sentry.with_exception_captured do + # 1/1 #=> 1 will be returned + # end + # + # Sentry.with_exception_captured do + # 1/0 #=> ZeroDivisionError will be reported and re-raised + # end + # + # source://sentry-ruby//lib/sentry-ruby.rb#427 + def with_exception_captured(**options, &block); end + + # Takes a block and yields a temporary scope. + # The temporary scope will inherit all the attributes from the current active scope and replace it to be the active + # scope inside the block. + # + # @example + # Sentry.configure_scope do |scope| + # scope.set_tags(foo: "bar") + # end + # + # Sentry.capture_message("test message") # this event will have tags { foo: "bar" } + # + # Sentry.with_scope do |temp_scope| + # temp_scope.set_tags(foo: "baz") + # Sentry.capture_message("test message 2") # this event will have tags { foo: "baz" } + # end + # + # Sentry.capture_message("test message 3") # this event will have tags { foo: "bar" } + # @return [void] + # @yieldparam scope [Scope] + # + # source://sentry-ruby//lib/sentry-ruby.rb#381 + def with_scope(&block); end + + # Wrap a given block with session tracking. + # Aggregate sessions in minutely buckets will be recorded + # around this block and flushed every minute. + # + # @example + # Sentry.with_session_tracking do + # a = 1 + 1 # new session recorded with :exited status + # end + # + # Sentry.with_session_tracking do + # 1 / 0 + # rescue => e + # Sentry.capture_exception(e) # new session recorded with :errored status + # end + # @return [void] + # + # source://sentry-ruby//lib/sentry-ruby.rb#401 + def with_session_tracking(&block); end + end +end + +# source://sentry-ruby//lib/sentry/utils/argument_checking_helper.rb#4 +module Sentry::ArgumentCheckingHelper + private + + # source://sentry-ruby//lib/sentry/utils/argument_checking_helper.rb#13 + def check_argument_includes!(argument, values); end + + # source://sentry-ruby//lib/sentry/utils/argument_checking_helper.rb#7 + def check_argument_type!(argument, *expected_types); end + + # source://sentry-ruby//lib/sentry/utils/argument_checking_helper.rb#19 + def check_callable!(name, value); end +end + +# source://sentry-ruby//lib/sentry-ruby.rb#47 +Sentry::BAGGAGE_HEADER_NAME = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/background_worker.rb#8 +class Sentry::BackgroundWorker + include ::Sentry::LoggingHelper + + # @return [BackgroundWorker] a new instance of BackgroundWorker + # + # source://sentry-ruby//lib/sentry/background_worker.rb#18 + def initialize(configuration); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/background_worker.rb#68 + def full?; end + + # @deprecated Use Sentry.logger to retrieve the current logger instead. + # + # source://sentry-ruby//lib/sentry/background_worker.rb#13 + def logger; end + + # Returns the value of attribute max_queue. + # + # source://sentry-ruby//lib/sentry/background_worker.rb#11 + def max_queue; end + + # Returns the value of attribute number_of_threads. + # + # source://sentry-ruby//lib/sentry/background_worker.rb#11 + def number_of_threads; end + + # if you want to monkey-patch this method, please override `_perform` instead + # + # source://sentry-ruby//lib/sentry/background_worker.rb#53 + def perform(&block); end + + # source://sentry-ruby//lib/sentry/background_worker.rb#63 + def shutdown; end + + # Returns the value of attribute shutdown_timeout. + # + # source://sentry-ruby//lib/sentry/background_worker.rb#14 + def shutdown_timeout; end + + # Sets the attribute shutdown_timeout + # + # @param value the value to set the attribute shutdown_timeout to. + # + # source://sentry-ruby//lib/sentry/background_worker.rb#14 + def shutdown_timeout=(_arg0); end + + private + + # source://sentry-ruby//lib/sentry/background_worker.rb#75 + def _perform(&block); end +end + +# source://sentry-ruby//lib/sentry/background_worker.rb#16 +Sentry::BackgroundWorker::DEFAULT_MAX_QUEUE = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry/backpressure_monitor.rb#4 +class Sentry::BackpressureMonitor + include ::Sentry::LoggingHelper + + # @return [BackpressureMonitor] a new instance of BackpressureMonitor + # + # source://sentry-ruby//lib/sentry/backpressure_monitor.rb#10 + def initialize(configuration, client, interval: T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/backpressure_monitor.rb#37 + def check_health; end + + # source://sentry-ruby//lib/sentry/backpressure_monitor.rb#27 + def downsample_factor; end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/backpressure_monitor.rb#22 + def healthy?; end + + # source://sentry-ruby//lib/sentry/backpressure_monitor.rb#51 + def kill; end + + # source://sentry-ruby//lib/sentry/backpressure_monitor.rb#32 + def run; end + + # source://sentry-ruby//lib/sentry/backpressure_monitor.rb#41 + def set_downsample_factor; end + + private + + # source://sentry-ruby//lib/sentry/backpressure_monitor.rb#60 + def ensure_thread; end +end + +# source://sentry-ruby//lib/sentry/backpressure_monitor.rb#7 +Sentry::BackpressureMonitor::DEFAULT_INTERVAL = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry/backpressure_monitor.rb#8 +Sentry::BackpressureMonitor::MAX_DOWNSAMPLE_FACTOR = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://sentry-ruby//lib/sentry/backtrace.rb#7 +class Sentry::Backtrace + # @api private + # @return [Backtrace] a new instance of Backtrace + # + # source://sentry-ruby//lib/sentry/backtrace.rb#104 + def initialize(lines); end + + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#120 + def ==(other); end + + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#108 + def inspect; end + + # holder for an Array of Backtrace::Line instances + # + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#86 + def lines; end + + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#112 + def to_s; end + + class << self + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#88 + def parse(backtrace, project_root, app_dirs_pattern, &backtrace_cleanup_callback); end + end +end + +# @api private +# +# source://sentry-ruby//lib/sentry/backtrace.rb#83 +Sentry::Backtrace::APP_DIRS_PATTERN = T.let(T.unsafe(nil), Regexp) + +# Handles backtrace parsing line by line +# +# @api private +# +# source://sentry-ruby//lib/sentry/backtrace.rb#9 +class Sentry::Backtrace::Line + # @api private + # @return [Line] a new instance of Line + # + # source://sentry-ruby//lib/sentry/backtrace.rb#51 + def initialize(file, number, method, module_name, in_app_pattern); end + + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#74 + def ==(other); end + + # The file portion of the line (such as app/models/user.rb) + # + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#22 + def file; end + + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#59 + def in_app; end + + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#33 + def in_app_pattern; end + + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#78 + def inspect; end + + # The method of the line (such as index) + # + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#28 + def method; end + + # The module name (JRuby) + # + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#31 + def module_name; end + + # The line number portion of the line + # + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#25 + def number; end + + # Reconstructs the line in a readable fashion + # + # @api private + # + # source://sentry-ruby//lib/sentry/backtrace.rb#70 + def to_s; end + + class << self + # Parses a single line of a given backtrace + # + # @api private + # @param unparsed_line [String] The raw line from +caller+ or some backtrace + # @return [Line] The parsed backtrace line + # + # source://sentry-ruby//lib/sentry/backtrace.rb#38 + def parse(unparsed_line, in_app_pattern = T.unsafe(nil)); end + end +end + +# org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170) +# +# @api private +# +# source://sentry-ruby//lib/sentry/backtrace.rb#19 +Sentry::Backtrace::Line::JAVA_INPUT_FORMAT = T.let(T.unsafe(nil), Regexp) + +# @api private +# +# source://sentry-ruby//lib/sentry/backtrace.rb#10 +Sentry::Backtrace::Line::RB_EXTENSION = T.let(T.unsafe(nil), String) + +# regexp (optional leading X: on windows, or JRuby9000 class-prefix) +# +# @api private +# +# source://sentry-ruby//lib/sentry/backtrace.rb#12 +Sentry::Backtrace::Line::RUBY_INPUT_FORMAT = T.let(T.unsafe(nil), Regexp) + +# A {https://www.w3.org/TR/baggage W3C Baggage Header} implementation. +# +# source://sentry-ruby//lib/sentry/baggage.rb#7 +class Sentry::Baggage + # @return [Baggage] a new instance of Baggage + # + # source://sentry-ruby//lib/sentry/baggage.rb#17 + def initialize(items, mutable: T.unsafe(nil)); end + + # A {https://develop.sentry.dev/sdk/performance/dynamic-sampling-context/#envelope-header Dynamic Sampling Context} + # hash to be used in the trace envelope header. + # + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/baggage.rb#59 + def dynamic_sampling_context; end + + # Make the Baggage immutable. + # + # @return [void] + # + # source://sentry-ruby//lib/sentry/baggage.rb#52 + def freeze!; end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/baggage.rb#12 + def items; end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/baggage.rb#15 + def mutable; end + + # Serialize the Baggage object back to a string. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/baggage.rb#65 + def serialize; end + + class << self + # Creates a Baggage object from an incoming W3C Baggage header string. + # + # Sentry items are identified with the 'sentry-' prefix and stored in a hash. + # The presence of a Sentry item makes the baggage object immutable. + # + # @param header [String] The incoming Baggage header string. + # @return [Baggage, nil] + # + # source://sentry-ruby//lib/sentry/baggage.rb#29 + def from_incoming_header(header); end + end +end + +# source://sentry-ruby//lib/sentry/baggage.rb#8 +Sentry::Baggage::SENTRY_PREFIX = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/baggage.rb#9 +Sentry::Baggage::SENTRY_PREFIX_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://sentry-ruby//lib/sentry/breadcrumb.rb#4 +class Sentry::Breadcrumb + # @param category [String, nil] + # @param data [Hash, nil] + # @param message [String, nil] + # @param timestamp [Time, Integer, nil] + # @param level [String, nil] + # @param type [String, nil] + # @return [Breadcrumb] a new instance of Breadcrumb + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#26 + def initialize(category: T.unsafe(nil), data: T.unsafe(nil), message: T.unsafe(nil), timestamp: T.unsafe(nil), level: T.unsafe(nil), type: T.unsafe(nil)); end + + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#8 + def category; end + + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#8 + def category=(_arg0); end + + # @return [Hash, nil] + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#10 + def data; end + + # @return [Hash, nil] + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#10 + def data=(_arg0); end + + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#12 + def level; end + + # @param level [String] + # @return [void] + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#55 + def level=(level); end + + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#18 + def message; end + + # @param message [String] + # @return [void] + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#49 + def message=(message); end + + # @return [Time, Integer, nil] + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#14 + def timestamp; end + + # @return [Time, Integer, nil] + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#14 + def timestamp=(_arg0); end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#36 + def to_hash; end + + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#16 + def type; end + + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/breadcrumb.rb#16 + def type=(_arg0); end + + private + + # source://sentry-ruby//lib/sentry/breadcrumb.rb#61 + def serialized_data; end +end + +# source://sentry-ruby//lib/sentry/breadcrumb.rb#5 +Sentry::Breadcrumb::DATA_SERIALIZATION_ERROR_MESSAGE = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/breadcrumb_buffer.rb#6 +class Sentry::BreadcrumbBuffer + include ::Enumerable + + # @param size [Integer, nil] If it's not provided, it'll fallback to DEFAULT_SIZE + # @return [BreadcrumbBuffer] a new instance of BreadcrumbBuffer + # + # source://sentry-ruby//lib/sentry/breadcrumb_buffer.rb#14 + def initialize(size = T.unsafe(nil)); end + + # @return [Array] + # + # source://sentry-ruby//lib/sentry/breadcrumb_buffer.rb#11 + def buffer; end + + # @return [Array] + # + # source://sentry-ruby//lib/sentry/breadcrumb_buffer.rb#11 + def buffer=(_arg0); end + + # @return [BreadcrumbBuffer] + # + # source://sentry-ruby//lib/sentry/breadcrumb_buffer.rb#58 + def dup; end + + # Iterates through all breadcrumbs. + # + # @param block [Proc] + # @return [Array] + # @yieldparam crumb [Breadcrumb] + # + # source://sentry-ruby//lib/sentry/breadcrumb_buffer.rb#41 + def each(&block); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/breadcrumb_buffer.rb#46 + def empty?; end + + # @return [Array] + # + # source://sentry-ruby//lib/sentry/breadcrumb_buffer.rb#27 + def members; end + + # Returns the last breadcrumb stored in the buffer. If the buffer it's empty, it returns nil. + # + # @return [Breadcrumb, nil] + # + # source://sentry-ruby//lib/sentry/breadcrumb_buffer.rb#33 + def peek; end + + # @param crumb [Breadcrumb] + # @return [void] + # @yield [crumb] + # + # source://sentry-ruby//lib/sentry/breadcrumb_buffer.rb#20 + def record(crumb); end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/breadcrumb_buffer.rb#51 + def to_hash; end +end + +# source://sentry-ruby//lib/sentry/breadcrumb_buffer.rb#7 +Sentry::BreadcrumbBuffer::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry-ruby.rb#41 +Sentry::CAPTURED_SIGNATURE = T.let(T.unsafe(nil), Symbol) + +# source://sentry-ruby//lib/sentry/check_in_event.rb#7 +class Sentry::CheckInEvent < ::Sentry::Event + # @return [CheckInEvent] a new instance of CheckInEvent + # + # source://sentry-ruby//lib/sentry/check_in_event.rb#32 + def initialize(slug:, status:, duration: T.unsafe(nil), monitor_config: T.unsafe(nil), check_in_id: T.unsafe(nil), **options); end + + # uuid to identify this check-in. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/check_in_event.rb#12 + def check_in_id; end + + # uuid to identify this check-in. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/check_in_event.rb#12 + def check_in_id=(_arg0); end + + # Duration of this check since it has started in seconds. + # + # @return [Integer, nil] + # + # source://sentry-ruby//lib/sentry/check_in_event.rb#20 + def duration; end + + # Duration of this check since it has started in seconds. + # + # @return [Integer, nil] + # + # source://sentry-ruby//lib/sentry/check_in_event.rb#20 + def duration=(_arg0); end + + # Monitor configuration to support upserts. + # + # @return [Cron::MonitorConfig, nil] + # + # source://sentry-ruby//lib/sentry/check_in_event.rb#24 + def monitor_config; end + + # Monitor configuration to support upserts. + # + # @return [Cron::MonitorConfig, nil] + # + # source://sentry-ruby//lib/sentry/check_in_event.rb#24 + def monitor_config=(_arg0); end + + # Identifier of the monitor for this check-in. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/check_in_event.rb#16 + def monitor_slug; end + + # Identifier of the monitor for this check-in. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/check_in_event.rb#16 + def monitor_slug=(_arg0); end + + # Status of this check-in. + # + # @return [Symbol] + # + # source://sentry-ruby//lib/sentry/check_in_event.rb#28 + def status; end + + # Status of this check-in. + # + # @return [Symbol] + # + # source://sentry-ruby//lib/sentry/check_in_event.rb#28 + def status=(_arg0); end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/check_in_event.rb#50 + def to_hash; end +end + +# source://sentry-ruby//lib/sentry/check_in_event.rb#8 +Sentry::CheckInEvent::TYPE = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/check_in_event.rb#30 +Sentry::CheckInEvent::VALID_STATUSES = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/client.rb#6 +class Sentry::Client + include ::Sentry::LoggingHelper + + # @param configuration [Configuration] + # @return [Client] a new instance of Client + # + # source://sentry-ruby//lib/sentry/client.rb#24 + def initialize(configuration); end + + # Capture an envelope directly. + # + # @param envelope [Envelope] the envelope to be captured. + # @return [void] + # + # source://sentry-ruby//lib/sentry/client.rb#84 + def capture_envelope(envelope); end + + # Applies the given scope's data to the event and sends it to Sentry. + # + # @param event [Event] the event to be sent. + # @param scope [Scope] the scope with contextual data that'll be applied to the event before it's sent. + # @param hint [Hash] the hint data that'll be passed to `before_send` callback and the scope's event processors. + # @return [Event, nil] + # + # source://sentry-ruby//lib/sentry/client.rb#48 + def capture_event(event, scope, hint = T.unsafe(nil)); end + + # Returns the value of attribute configuration. + # + # source://sentry-ruby//lib/sentry/client.rb#18 + def configuration; end + + # Initializes a CheckInEvent object with the given options. + # + # @param slug [String] identifier of this monitor + # @param status [Symbol] status of this check-in, one of {CheckInEvent::VALID_STATUSES} + # @param hint [Hash] the hint data that'll be passed to `before_send` callback and the scope's event processors. + # @param duration [Integer, nil] seconds elapsed since this monitor started + # @param monitor_config [Cron::MonitorConfig, nil] configuration for this monitor + # @param check_in_id [String, nil] for updating the status of an existing monitor + # @return [Event] + # + # source://sentry-ruby//lib/sentry/client.rb#139 + def event_from_check_in(slug, status, hint = T.unsafe(nil), duration: T.unsafe(nil), monitor_config: T.unsafe(nil), check_in_id: T.unsafe(nil)); end + + # Initializes an Event object with the given exception. Returns `nil` if the exception's class is excluded from reporting. + # + # @param exception [Exception] the exception to be reported. + # @param hint [Hash] the hint data that'll be passed to `before_send` callback and the scope's event processors. + # @return [Event, nil] + # + # source://sentry-ruby//lib/sentry/client.rb#99 + def event_from_exception(exception, hint = T.unsafe(nil)); end + + # Initializes an Event object with the given message. + # + # @param message [String] the message to be reported. + # @param hint [Hash] the hint data that'll be passed to `before_send` callback and the scope's event processors. + # @return [Event] + # + # source://sentry-ruby//lib/sentry/client.rb#119 + def event_from_message(message, hint = T.unsafe(nil), backtrace: T.unsafe(nil)); end + + # Initializes an Event object with the given Transaction object. + # + # @param transaction [Transaction] the transaction to be recorded. + # @return [TransactionEvent] + # + # source://sentry-ruby//lib/sentry/client.rb#163 + def event_from_transaction(transaction); end + + # Flush pending events to Sentry. + # + # @return [void] + # + # source://sentry-ruby//lib/sentry/client.rb#90 + def flush; end + + # Generates a W3C Baggage header for distributed tracing from the given Span. + # Returns `nil` if `config.propagate_traces` is `false`. + # + # @deprecated Use Sentry.get_baggage instead. + # @param span [Span] the span to generate trace from. + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/client.rb#238 + def generate_baggage(span); end + + # Generates a Sentry trace for distribted tracing from the given Span. + # Returns `nil` if `config.propagate_traces` is `false`. + # + # @deprecated use Sentry.get_traceparent instead. + # @param span [Span] the span to generate trace from. + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/client.rb#224 + def generate_sentry_trace(span); end + + # @deprecated Use Sentry.logger to retrieve the current logger instead. + # + # source://sentry-ruby//lib/sentry/client.rb#21 + def logger; end + + # Send an envelope directly to Sentry. + # + # @param envelope [Envelope] the envelope to be sent. + # @return [void] + # + # source://sentry-ruby//lib/sentry/client.rb#205 + def send_envelope(envelope); end + + # source://sentry-ruby//lib/sentry/client.rb#168 + def send_event(event, hint = T.unsafe(nil)); end + + # The Transport object that'll send events for the client. + # + # @return [SpotlightTransport, nil] + # + # source://sentry-ruby//lib/sentry/client.rb#15 + def spotlight_transport; end + + # The Transport object that'll send events for the client. + # + # @return [Transport] + # + # source://sentry-ruby//lib/sentry/client.rb#11 + def transport; end + + private + + # source://sentry-ruby//lib/sentry/client.rb#258 + def dispatch_async_event(async_block, event, hint); end + + # source://sentry-ruby//lib/sentry/client.rb#252 + def dispatch_background_event(event, hint); end +end + +# source://sentry-ruby//lib/sentry/configuration.rb#16 +class Sentry::Configuration + include ::Sentry::CustomInspection + include ::Sentry::LoggingHelper + include ::Sentry::ArgumentCheckingHelper + + # @return [Configuration] a new instance of Configuration + # + # source://sentry-ruby//lib/sentry/configuration.rb#351 + def initialize; end + + # Directories to be recognized as part of your app. e.g. if you + # have an `engines` dir at the root of your project, you may want + # to set this to something like /(app|config|engines|lib)/ + # + # @return [Regexp, nil] + # + # source://sentry-ruby//lib/sentry/configuration.rb#26 + def app_dirs_pattern; end + + # Directories to be recognized as part of your app. e.g. if you + # have an `engines` dir at the root of your project, you may want + # to set this to something like /(app|config|engines|lib)/ + # + # @return [Regexp, nil] + # + # source://sentry-ruby//lib/sentry/configuration.rb#26 + def app_dirs_pattern=(_arg0); end + + # Provide an object that responds to `call` to send events asynchronously. + # E.g.: lambda { |event| Thread.new { Sentry.send_event(event) } } + # + # @deprecated It will be removed in the next major release. Please read https://github.com/getsentry/sentry-ruby/issues/1522 for more information + # @return [Proc, nil] + # + # source://sentry-ruby//lib/sentry/configuration.rb#33 + def async; end + + # source://sentry-ruby//lib/sentry/configuration.rb#412 + def async=(value); end + + # Track sessions in request/response cycles automatically + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#269 + def auto_session_tracking; end + + # Track sessions in request/response cycles automatically + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#269 + def auto_session_tracking=(_arg0); end + + # The maximum queue size for the background worker. + # Jobs will be rejected above this limit. + # + # Default is {BackgroundWorker::DEFAULT_MAX_QUEUE}. + # + # @return [Integer] + # + # source://sentry-ruby//lib/sentry/configuration.rb#50 + def background_worker_max_queue; end + + # The maximum queue size for the background worker. + # Jobs will be rejected above this limit. + # + # Default is {BackgroundWorker::DEFAULT_MAX_QUEUE}. + # + # @return [Integer] + # + # source://sentry-ruby//lib/sentry/configuration.rb#50 + def background_worker_max_queue=(_arg0); end + + # to send events in a non-blocking way, sentry-ruby has its own background worker + # by default, the worker holds a thread pool that has [the number of processors] threads + # but you can configure it with this configuration option + # E.g.: config.background_worker_threads = 5 + # + # if you want to send events synchronously, set the value to 0 + # E.g.: config.background_worker_threads = 0 + # + # @return [Integer] + # + # source://sentry-ruby//lib/sentry/configuration.rb#43 + def background_worker_threads; end + + # to send events in a non-blocking way, sentry-ruby has its own background worker + # by default, the worker holds a thread pool that has [the number of processors] threads + # but you can configure it with this configuration option + # E.g.: config.background_worker_threads = 5 + # + # if you want to send events synchronously, set the value to 0 + # E.g.: config.background_worker_threads = 0 + # + # @return [Integer] + # + # source://sentry-ruby//lib/sentry/configuration.rb#43 + def background_worker_threads=(_arg0); end + + # a proc/lambda that takes an array of stack traces + # it'll be used to silence (reduce) backtrace of the exception + # + # @example + # config.backtrace_cleanup_callback = lambda do |backtrace| + # Rails.backtrace_cleaner.clean(backtrace) + # end + # @return [Proc, nil] + # + # source://sentry-ruby//lib/sentry/configuration.rb#61 + def backtrace_cleanup_callback; end + + # a proc/lambda that takes an array of stack traces + # it'll be used to silence (reduce) backtrace of the exception + # + # @example + # config.backtrace_cleanup_callback = lambda do |backtrace| + # Rails.backtrace_cleaner.clean(backtrace) + # end + # @return [Proc, nil] + # + # source://sentry-ruby//lib/sentry/configuration.rb#61 + def backtrace_cleanup_callback=(_arg0); end + + # Optional Proc, called before adding the breadcrumb to the current scope + # + # @example + # config.before = lambda do |breadcrumb, hint| + # breadcrumb.message = 'a' + # breadcrumb + # end + # @return [Proc] + # + # source://sentry-ruby//lib/sentry/configuration.rb#70 + def before_breadcrumb; end + + # source://sentry-ruby//lib/sentry/configuration.rb#453 + def before_breadcrumb=(value); end + + # Optional Proc, called before sending an event to the server + # + # @example + # config.before_send = lambda do |event, hint| + # # skip ZeroDivisionError exceptions + # # note: hint[:exception] would be a String if you use async callback + # if hint[:exception].is_a?(ZeroDivisionError) + # nil + # else + # event + # end + # end + # @return [Proc] + # + # source://sentry-ruby//lib/sentry/configuration.rb#84 + def before_send; end + + # source://sentry-ruby//lib/sentry/configuration.rb#441 + def before_send=(value); end + + # Optional Proc, called before sending an event to the server + # + # @example + # config.before_send_transaction = lambda do |event, hint| + # # skip unimportant transactions or strip sensitive data + # if event.transaction == "/healthcheck/route" + # nil + # else + # event + # end + # end + # @return [Proc] + # + # source://sentry-ruby//lib/sentry/configuration.rb#97 + def before_send_transaction; end + + # source://sentry-ruby//lib/sentry/configuration.rb#447 + def before_send_transaction=(value); end + + # An array of breadcrumbs loggers to be used. Available options are: + # - :sentry_logger + # - :http_logger + # - :redis_logger + # + # And if you also use sentry-rails: + # - :active_support_logger + # - :monotonic_active_support_logger + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/configuration.rb#109 + def breadcrumbs_logger; end + + # source://sentry-ruby//lib/sentry/configuration.rb#428 + def breadcrumbs_logger=(logger); end + + # Whether to capture local variables from the raised exception's frame. Default is false. + # + # @deprecated Use {#include_local_variables} instead. + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#152 + def capture_exception_frame_locals; end + + # @deprecated Use {#include_local_variables=} instead. + # + # source://sentry-ruby//lib/sentry/configuration.rb#166 + def capture_exception_frame_locals=(value); end + + # Number of lines of code context to capture, or nil for none + # + # @return [Integer, nil] + # + # source://sentry-ruby//lib/sentry/configuration.rb#117 + def context_lines; end + + # Number of lines of code context to capture, or nil for none + # + # @return [Integer, nil] + # + # source://sentry-ruby//lib/sentry/configuration.rb#117 + def context_lines=(_arg0); end + + # Cron related configuration. + # + # @return [Cron::Configuration] + # + # source://sentry-ruby//lib/sentry/configuration.rb#237 + def cron; end + + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/configuration.rb#542 + def csp_report_uri; end + + # Whether the SDK should run in the debugging mode. Default is false. + # If set to true, SDK errors will be logged with backtrace + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#126 + def debug; end + + # Whether the SDK should run in the debugging mode. Default is false. + # If set to true, SDK errors will be logged with backtrace + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#126 + def debug=(_arg0); end + + # @api private + # + # source://sentry-ruby//lib/sentry/configuration.rb#563 + def detect_release; end + + # the dsn value, whether it's set via `config.dsn=` or `ENV["SENTRY_DSN"]` + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/configuration.rb#130 + def dsn; end + + # source://sentry-ruby//lib/sentry/configuration.rb#400 + def dsn=(value); end + + # Whether to downsample transactions automatically because of backpressure. + # Starts a new monitor thread to check health of the SDK every 10 seconds. + # Default is false + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#275 + def enable_backpressure_handling; end + + # Whether to downsample transactions automatically because of backpressure. + # Starts a new monitor thread to check health of the SDK every 10 seconds. + # Default is false + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#275 + def enable_backpressure_handling=(_arg0); end + + # Easier way to use performance tracing + # If set to true, will set traces_sample_rate to 1.0 + # + # @return [Boolean, nil] + # + # source://sentry-ruby//lib/sentry/configuration.rb#260 + def enable_tracing; end + + # source://sentry-ruby//lib/sentry/configuration.rb#467 + def enable_tracing=(enable_tracing); end + + # Whitelist of enabled_environments that will send notifications to Sentry. Array of Strings. + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/configuration.rb#134 + def enabled_environments; end + + # Whitelist of enabled_environments that will send notifications to Sentry. Array of Strings. + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/configuration.rb#134 + def enabled_environments=(_arg0); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#520 + def enabled_in_current_env?; end + + # Array of patches to apply. + # Default is {DEFAULT_PATCHES} + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/configuration.rb#295 + def enabled_patches; end + + # Array of patches to apply. + # Default is {DEFAULT_PATCHES} + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/configuration.rb#295 + def enabled_patches=(_arg0); end + + # RACK_ENV by default. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/configuration.rb#121 + def environment; end + + # source://sentry-ruby//lib/sentry/configuration.rb#459 + def environment=(environment); end + + # @api private + # + # source://sentry-ruby//lib/sentry/configuration.rb#576 + def error_messages; end + + # these are not config options + # + # source://sentry-ruby//lib/sentry/configuration.rb#299 + def errors; end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#507 + def exception_class_allowed?(exc); end + + # Logger 'progname's to exclude from breadcrumbs + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/configuration.rb#138 + def exclude_loggers; end + + # Logger 'progname's to exclude from breadcrumbs + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/configuration.rb#138 + def exclude_loggers=(_arg0); end + + # Array of exception classes that should never be sent. See IGNORE_DEFAULT. + # You should probably append to this rather than overwrite it. + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/configuration.rb#143 + def excluded_exceptions; end + + # Array of exception classes that should never be sent. See IGNORE_DEFAULT. + # You should probably append to this rather than overwrite it. + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/configuration.rb#143 + def excluded_exceptions=(_arg0); end + + # these are not config options + # + # source://sentry-ruby//lib/sentry/configuration.rb#299 + def gem_specs; end + + # Whether to capture local variables from the raised exception's frame. Default is false. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#152 + def include_local_variables; end + + # Whether to capture local variables from the raised exception's frame. Default is false. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#152 + def include_local_variables=(_arg0); end + + # Boolean to check nested exceptions when deciding if to exclude. Defaults to true + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#147 + def inspect_exception_causes_for_exclusion; end + + # Boolean to check nested exceptions when deciding if to exclude. Defaults to true + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#147 + def inspect_exception_causes_for_exclusion=(_arg0); end + + # Boolean to check nested exceptions when deciding if to exclude. Defaults to true + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#147 + def inspect_exception_causes_for_exclusion?; end + + # The instrumenter to use, :sentry or :otel + # + # @return [Symbol] + # + # source://sentry-ruby//lib/sentry/configuration.rb#284 + def instrumenter; end + + # source://sentry-ruby//lib/sentry/configuration.rb#463 + def instrumenter=(instrumenter); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#472 + def is_numeric_or_nil?(value); end + + # You may provide your own LineCache for matching paths with source files. + # This may be useful if you need to get source code from places other than the disk. + # + # @return [LineCache] + # @see LineCache + # + # source://sentry-ruby//lib/sentry/configuration.rb#178 + def linecache; end + + # You may provide your own LineCache for matching paths with source files. + # This may be useful if you need to get source code from places other than the disk. + # + # @return [LineCache] + # @see LineCache + # + # source://sentry-ruby//lib/sentry/configuration.rb#178 + def linecache=(_arg0); end + + # Logger used by Sentry. In Rails, this is the Rails logger, otherwise + # Sentry provides its own Sentry::Logger. + # + # @return [Logger] + # + # source://sentry-ruby//lib/sentry/configuration.rb#183 + def logger; end + + # Logger used by Sentry. In Rails, this is the Rails logger, otherwise + # Sentry provides its own Sentry::Logger. + # + # @return [Logger] + # + # source://sentry-ruby//lib/sentry/configuration.rb#183 + def logger=(_arg0); end + + # Max number of breadcrumbs a breadcrumb buffer can hold + # + # @return [Integer] + # + # source://sentry-ruby//lib/sentry/configuration.rb#113 + def max_breadcrumbs; end + + # Max number of breadcrumbs a breadcrumb buffer can hold + # + # @return [Integer] + # + # source://sentry-ruby//lib/sentry/configuration.rb#113 + def max_breadcrumbs=(_arg0); end + + # Metrics related configuration. + # + # @return [Metrics::Configuration] + # + # source://sentry-ruby//lib/sentry/configuration.rb#241 + def metrics; end + + # Take a float between 0.0 and 1.0 as the sample rate for capturing profiles. + # Note that this rate is relative to traces_sample_rate / traces_sampler, + # i.e. the profile is sampled by this rate after the transaction is sampled. + # + # @return [Float, nil] + # + # source://sentry-ruby//lib/sentry/configuration.rb#290 + def profiles_sample_rate; end + + # @raise [ArgumentError] + # + # source://sentry-ruby//lib/sentry/configuration.rb#481 + def profiles_sample_rate=(profiles_sample_rate); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#535 + def profiling_enabled?; end + + # Project directory root for in_app detection. Could be Rails root, etc. + # Set automatically for Rails. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/configuration.rb#188 + def project_root; end + + # Project directory root for in_app detection. Could be Rails root, etc. + # Set automatically for Rails. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/configuration.rb#188 + def project_root=(_arg0); end + + # Insert sentry-trace to outgoing requests' headers + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#192 + def propagate_traces; end + + # Insert sentry-trace to outgoing requests' headers + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#192 + def propagate_traces=(_arg0); end + + # Array of rack env parameters to be included in the event sent to sentry. + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/configuration.rb#196 + def rack_env_whitelist; end + + # Array of rack env parameters to be included in the event sent to sentry. + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/configuration.rb#196 + def rack_env_whitelist=(_arg0); end + + # Release tag to be passed with every event sent to Sentry. + # We automatically try to set this to a git SHA or Capistrano release. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/configuration.rb#201 + def release; end + + # source://sentry-ruby//lib/sentry/configuration.rb#406 + def release=(value); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#497 + def sample_allowed?; end + + # The sampling factor to apply to events. A value of 0.0 will not send + # any events, and a value of 1.0 will send 100% of events. + # + # @return [Float] + # + # source://sentry-ruby//lib/sentry/configuration.rb#206 + def sample_rate; end + + # The sampling factor to apply to events. A value of 0.0 will not send + # any events, and a value of 1.0 will send 100% of events. + # + # @return [Float] + # + # source://sentry-ruby//lib/sentry/configuration.rb#206 + def sample_rate=(_arg0); end + + # Send diagnostic client reports about dropped events, true by default + # tries to attach to an existing envelope max once every 30s + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#265 + def send_client_reports; end + + # Send diagnostic client reports about dropped events, true by default + # tries to attach to an existing envelope max once every 30s + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#265 + def send_client_reports=(_arg0); end + + # When send_default_pii's value is false (default), sensitive information like + # - user ip + # - user cookie + # - request body + # - query string + # will not be sent to Sentry. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#219 + def send_default_pii; end + + # When send_default_pii's value is false (default), sensitive information like + # - user ip + # - user cookie + # - request body + # - query string + # will not be sent to Sentry. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#219 + def send_default_pii=(_arg0); end + + # Include module versions in reports - boolean. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#210 + def send_modules; end + + # Include module versions in reports - boolean. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#210 + def send_modules=(_arg0); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#487 + def sending_allowed?; end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#491 + def sending_to_dsn_allowed?; end + + # source://sentry-ruby//lib/sentry/configuration.rb#400 + def server=(value); end + + # @return [String] + # + # source://sentry-ruby//lib/sentry/configuration.rb#229 + def server_name; end + + # @return [String] + # + # source://sentry-ruby//lib/sentry/configuration.rb#229 + def server_name=(_arg0); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#503 + def session_tracking?; end + + # Allow to skip Sentry emails within rake tasks + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#223 + def skip_rake_integration; end + + # Allow to skip Sentry emails within rake tasks + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#223 + def skip_rake_integration=(_arg0); end + + # Whether to capture events and traces into Spotlight. Default is false. + # If you set this to true, Sentry will send events and traces to the local + # Sidecar proxy at http://localhost:8969/stream. + # If you want to use a different Sidecar proxy address, set this to String + # with the proxy URL. + # + # @return [Boolean, String] + # + # source://sentry-ruby//lib/sentry/configuration.rb#160 + def spotlight; end + + # Whether to capture events and traces into Spotlight. Default is false. + # If you set this to true, Sentry will send events and traces to the local + # Sidecar proxy at http://localhost:8969/stream. + # If you want to use a different Sidecar proxy address, set this to String + # with the proxy URL. + # + # @return [Boolean, String] + # + # source://sentry-ruby//lib/sentry/configuration.rb#160 + def spotlight=(_arg0); end + + # @api private + # + # source://sentry-ruby//lib/sentry/configuration.rb#552 + def stacktrace_builder; end + + # Allowlist of outgoing request targets to which sentry-trace and baggage headers are attached. + # Default is all (/.*/) + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/configuration.rb#280 + def trace_propagation_targets; end + + # Allowlist of outgoing request targets to which sentry-trace and baggage headers are attached. + # Default is all (/.*/) + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/configuration.rb#280 + def trace_propagation_targets=(_arg0); end + + # Take a float between 0.0 and 1.0 as the sample rate for tracing events (transactions). + # + # @return [Float, nil] + # + # source://sentry-ruby//lib/sentry/configuration.rb#245 + def traces_sample_rate; end + + # @raise [ArgumentError] + # + # source://sentry-ruby//lib/sentry/configuration.rb#476 + def traces_sample_rate=(traces_sample_rate); end + + # Take a Proc that controls the sample rate for every tracing event, e.g. + # + # @example + # config.traces_sampler = lambda do |tracing_context| + # # tracing_context[:transaction_context] contains the information about the transaction + # # tracing_context[:parent_sampled] contains the transaction's parent's sample decision + # true # return value can be a boolean or a float between 0.0 and 1.0 + # end + # @return [Proc] + # + # source://sentry-ruby//lib/sentry/configuration.rb#255 + def traces_sampler; end + + # Take a Proc that controls the sample rate for every tracing event, e.g. + # + # @example + # config.traces_sampler = lambda do |tracing_context| + # # tracing_context[:transaction_context] contains the information about the transaction + # # tracing_context[:parent_sampled] contains the transaction's parent's sample decision + # true # return value can be a boolean or a float between 0.0 and 1.0 + # end + # @return [Proc] + # + # source://sentry-ruby//lib/sentry/configuration.rb#255 + def traces_sampler=(_arg0); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#529 + def tracing_enabled?; end + + # Transport related configuration. + # + # @return [Transport::Configuration] + # + # source://sentry-ruby//lib/sentry/configuration.rb#233 + def transport; end + + # IP ranges for trusted proxies that will be skipped when calculating IP address. + # + # source://sentry-ruby//lib/sentry/configuration.rb#226 + def trusted_proxies; end + + # IP ranges for trusted proxies that will be skipped when calculating IP address. + # + # source://sentry-ruby//lib/sentry/configuration.rb#226 + def trusted_proxies=(_arg0); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#524 + def valid_sample_rate?(sample_rate); end + + private + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#618 + def capture_in_environment?; end + + # source://sentry-ruby//lib/sentry/configuration.rb#634 + def environment_from_env; end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#589 + def excluded_exception?(incoming_exception); end + + # source://sentry-ruby//lib/sentry/configuration.rb#595 + def excluded_exception_classes; end + + # source://sentry-ruby//lib/sentry/configuration.rb#599 + def get_exception_class(x); end + + # source://sentry-ruby//lib/sentry/configuration.rb#583 + def init_dsn(dsn_string); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#603 + def matches_exception?(excluded_exception_class, incoming_exception); end + + # source://sentry-ruby//lib/sentry/configuration.rb#652 + def run_post_initialization_callbacks; end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#648 + def running_on_heroku?; end + + # source://sentry-ruby//lib/sentry/configuration.rb#611 + def safe_const_get(x); end + + # source://sentry-ruby//lib/sentry/configuration.rb#638 + def server_name_from_env; end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/configuration.rb#625 + def valid?; end + + class << self + # allow extensions to add their hooks to the Configuration class + # + # source://sentry-ruby//lib/sentry/configuration.rb#346 + def add_post_initialization_callback(&block); end + + # Post initialization callbacks are called at the end of initialization process + # allowing extending the configuration of sentry-ruby by multiple extensions + # + # source://sentry-ruby//lib/sentry/configuration.rb#341 + def post_initialization_callbacks; end + end +end + +# source://sentry-ruby//lib/sentry/configuration.rb#336 +Sentry::Configuration::DEFAULT_PATCHES = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/configuration.rb#325 +Sentry::Configuration::HEROKU_DYNO_METADATA_MESSAGE = T.let(T.unsafe(nil), String) + +# Most of these errors generate 4XX responses. In general, Sentry clients +# only automatically report 5xx responses. +# +# source://sentry-ruby//lib/sentry/configuration.rb#312 +Sentry::Configuration::IGNORE_DEFAULT = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/configuration.rb#332 +Sentry::Configuration::INSTRUMENTERS = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/configuration.rb#328 +Sentry::Configuration::LOG_PREFIX = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/configuration.rb#329 +Sentry::Configuration::MODULE_SEPARATOR = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/configuration.rb#334 +Sentry::Configuration::PROPAGATION_TARGETS_MATCH_ALL = T.let(T.unsafe(nil), Regexp) + +# These exceptions could enter Puma's `lowlevel_error_handler` callback and the SDK's Puma integration +# But they are mostly considered as noise and should be ignored by default +# Please see https://github.com/getsentry/sentry-ruby/pull/2026 for more information +# +# source://sentry-ruby//lib/sentry/configuration.rb#304 +Sentry::Configuration::PUMA_IGNORE_DEFAULT = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/configuration.rb#319 +Sentry::Configuration::RACK_ENV_WHITELIST_DEFAULT = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/configuration.rb#330 +Sentry::Configuration::SKIP_INSPECTION_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/cron/configuration.rb#4 +module Sentry::Cron; end + +# source://sentry-ruby//lib/sentry/cron/configuration.rb#5 +class Sentry::Cron::Configuration + # How long (in minutes) after the expected checkin time will we wait + # until we consider the checkin to have been missed. + # + # @return [Integer, nil] + # + # source://sentry-ruby//lib/sentry/cron/configuration.rb#11 + def default_checkin_margin; end + + # How long (in minutes) after the expected checkin time will we wait + # until we consider the checkin to have been missed. + # + # @return [Integer, nil] + # + # source://sentry-ruby//lib/sentry/cron/configuration.rb#11 + def default_checkin_margin=(_arg0); end + + # How long (in minutes) is the checkin allowed to run for in in_progress + # before it is considered failed. + # + # @return [Integer, nil] + # + # source://sentry-ruby//lib/sentry/cron/configuration.rb#16 + def default_max_runtime; end + + # How long (in minutes) is the checkin allowed to run for in in_progress + # before it is considered failed. + # + # @return [Integer, nil] + # + # source://sentry-ruby//lib/sentry/cron/configuration.rb#16 + def default_max_runtime=(_arg0); end + + # tz database style timezone string + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/cron/configuration.rb#20 + def default_timezone; end + + # tz database style timezone string + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/cron/configuration.rb#20 + def default_timezone=(_arg0); end +end + +# source://sentry-ruby//lib/sentry/cron/monitor_check_ins.rb#3 +module Sentry::Cron::MonitorCheckIns + mixes_in_class_methods ::Sentry::Cron::MonitorCheckIns::ClassMethods + + class << self + # @private + # + # source://sentry-ruby//lib/sentry/cron/monitor_check_ins.rb#70 + def included(base); end + end +end + +# source://sentry-ruby//lib/sentry/cron/monitor_check_ins.rb#43 +module Sentry::Cron::MonitorCheckIns::ClassMethods + # source://sentry-ruby//lib/sentry/cron/monitor_check_ins.rb#44 + def sentry_monitor_check_ins(slug: T.unsafe(nil), monitor_config: T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/cron/monitor_check_ins.rb#65 + def sentry_monitor_config; end + + # source://sentry-ruby//lib/sentry/cron/monitor_check_ins.rb#58 + def sentry_monitor_slug(name: T.unsafe(nil)); end +end + +# source://sentry-ruby//lib/sentry/cron/monitor_check_ins.rb#4 +Sentry::Cron::MonitorCheckIns::MAX_SLUG_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry/cron/monitor_check_ins.rb#6 +module Sentry::Cron::MonitorCheckIns::Patch + # source://sentry-ruby//lib/sentry/cron/monitor_check_ins.rb#7 + def perform(*args, **opts); end +end + +# source://sentry-ruby//lib/sentry/cron/monitor_config.rb#7 +class Sentry::Cron::MonitorConfig + # @return [MonitorConfig] a new instance of MonitorConfig + # + # source://sentry-ruby//lib/sentry/cron/monitor_config.rb#26 + def initialize(schedule, checkin_margin: T.unsafe(nil), max_runtime: T.unsafe(nil), timezone: T.unsafe(nil)); end + + # How long (in minutes) after the expected checkin time will we wait + # until we consider the checkin to have been missed. + # + # @return [Integer, nil] + # + # source://sentry-ruby//lib/sentry/cron/monitor_config.rb#15 + def checkin_margin; end + + # How long (in minutes) after the expected checkin time will we wait + # until we consider the checkin to have been missed. + # + # @return [Integer, nil] + # + # source://sentry-ruby//lib/sentry/cron/monitor_config.rb#15 + def checkin_margin=(_arg0); end + + # How long (in minutes) is the checkin allowed to run for in in_progress + # before it is considered failed. + # + # @return [Integer, nil] + # + # source://sentry-ruby//lib/sentry/cron/monitor_config.rb#20 + def max_runtime; end + + # How long (in minutes) is the checkin allowed to run for in in_progress + # before it is considered failed. + # + # @return [Integer, nil] + # + # source://sentry-ruby//lib/sentry/cron/monitor_config.rb#20 + def max_runtime=(_arg0); end + + # The monitor schedule configuration + # + # @return [MonitorSchedule::Crontab, MonitorSchedule::Interval] + # + # source://sentry-ruby//lib/sentry/cron/monitor_config.rb#10 + def schedule; end + + # The monitor schedule configuration + # + # @return [MonitorSchedule::Crontab, MonitorSchedule::Interval] + # + # source://sentry-ruby//lib/sentry/cron/monitor_config.rb#10 + def schedule=(_arg0); end + + # tz database style timezone string + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/cron/monitor_config.rb#24 + def timezone; end + + # tz database style timezone string + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/cron/monitor_config.rb#24 + def timezone=(_arg0); end + + # source://sentry-ruby//lib/sentry/cron/monitor_config.rb#43 + def to_hash; end + + class << self + # source://sentry-ruby//lib/sentry/cron/monitor_config.rb#33 + def from_crontab(crontab, **options); end + + # source://sentry-ruby//lib/sentry/cron/monitor_config.rb#37 + def from_interval(num, unit, **options); end + end +end + +# source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#5 +module Sentry::Cron::MonitorSchedule; end + +# source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#6 +class Sentry::Cron::MonitorSchedule::Crontab + # @return [Crontab] a new instance of Crontab + # + # source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#11 + def initialize(value); end + + # source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#15 + def to_hash; end + + # A crontab formatted string such as "0 * * * *". + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#9 + def value; end + + # A crontab formatted string such as "0 * * * *". + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#9 + def value=(_arg0); end +end + +# source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#20 +class Sentry::Cron::MonitorSchedule::Interval + # @return [Interval] a new instance of Interval + # + # source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#31 + def initialize(value, unit); end + + # source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#36 + def to_hash; end + + # The unit representing duration of the interval. + # + # @return [Symbol] + # + # source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#27 + def unit; end + + # The unit representing duration of the interval. + # + # @return [Symbol] + # + # source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#27 + def unit=(_arg0); end + + # The number representing duration of the interval. + # + # @return [Integer] + # + # source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#23 + def value; end + + # The number representing duration of the interval. + # + # @return [Integer] + # + # source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#23 + def value=(_arg0); end +end + +# source://sentry-ruby//lib/sentry/cron/monitor_schedule.rb#29 +Sentry::Cron::MonitorSchedule::Interval::VALID_UNITS = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/utils/custom_inspection.rb#4 +module Sentry::CustomInspection + # source://sentry-ruby//lib/sentry/utils/custom_inspection.rb#5 + def inspect; end +end + +# source://sentry-ruby//lib/sentry/dsn.rb#6 +class Sentry::DSN + # @return [DSN] a new instance of DSN + # + # source://sentry-ruby//lib/sentry/dsn.rb#12 + def initialize(dsn_string); end + + # source://sentry-ruby//lib/sentry/dsn.rb#45 + def csp_report_uri; end + + # source://sentry-ruby//lib/sentry/dsn.rb#49 + def envelope_endpoint; end + + # source://sentry-ruby//lib/sentry/dsn.rb#10 + def host; end + + # source://sentry-ruby//lib/sentry/dsn.rb#10 + def path; end + + # source://sentry-ruby//lib/sentry/dsn.rb#10 + def port; end + + # source://sentry-ruby//lib/sentry/dsn.rb#10 + def project_id; end + + # source://sentry-ruby//lib/sentry/dsn.rb#10 + def public_key; end + + # source://sentry-ruby//lib/sentry/dsn.rb#10 + def scheme; end + + # source://sentry-ruby//lib/sentry/dsn.rb#10 + def secret_key; end + + # source://sentry-ruby//lib/sentry/dsn.rb#39 + def server; end + + # source://sentry-ruby//lib/sentry/dsn.rb#35 + def to_s; end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/dsn.rb#31 + def valid?; end +end + +# source://sentry-ruby//lib/sentry/dsn.rb#7 +Sentry::DSN::PORT_MAP = T.let(T.unsafe(nil), Hash) + +# source://sentry-ruby//lib/sentry/dsn.rb#8 +Sentry::DSN::REQUIRED_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/transport/dummy_transport.rb#4 +class Sentry::DummyTransport < ::Sentry::Transport + # @return [DummyTransport] a new instance of DummyTransport + # + # source://sentry-ruby//lib/sentry/transport/dummy_transport.rb#7 + def initialize(*_arg0); end + + # Returns the value of attribute envelopes. + # + # source://sentry-ruby//lib/sentry/transport/dummy_transport.rb#5 + def envelopes; end + + # Sets the attribute envelopes + # + # @param value the value to set the attribute envelopes to. + # + # source://sentry-ruby//lib/sentry/transport/dummy_transport.rb#5 + def envelopes=(_arg0); end + + # Returns the value of attribute events. + # + # source://sentry-ruby//lib/sentry/transport/dummy_transport.rb#5 + def events; end + + # Sets the attribute events + # + # @param value the value to set the attribute events to. + # + # source://sentry-ruby//lib/sentry/transport/dummy_transport.rb#5 + def events=(_arg0); end + + # source://sentry-ruby//lib/sentry/transport/dummy_transport.rb#17 + def send_envelope(envelope); end + + # source://sentry-ruby//lib/sentry/transport/dummy_transport.rb#13 + def send_event(event); end +end + +# @api private +# +# source://sentry-ruby//lib/sentry/envelope.rb#5 +class Sentry::Envelope + # @api private + # @return [Envelope] a new instance of Envelope + # + # source://sentry-ruby//lib/sentry/envelope.rb#93 + def initialize(headers = T.unsafe(nil)); end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#98 + def add_item(headers, payload); end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#106 + def event_id; end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#91 + def headers; end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#91 + def headers=(_arg0); end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#102 + def item_types; end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#91 + def items; end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#91 + def items=(_arg0); end +end + +# @api private +# +# source://sentry-ruby//lib/sentry/envelope.rb#6 +class Sentry::Envelope::Item + # @api private + # @return [Item] a new instance of Item + # + # source://sentry-ruby//lib/sentry/envelope.rb#12 + def initialize(headers, payload); end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#34 + def data_category; end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#10 + def headers; end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#10 + def headers=(_arg0); end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#10 + def payload; end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#10 + def payload=(_arg0); end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#42 + def serialize; end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#58 + def size_breakdown; end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#38 + def to_s; end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#17 + def type; end + + private + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#74 + def reduce_stacktrace!; end + + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#66 + def remove_breadcrumbs!; end + + class << self + # rate limits and client reports use the data_category rather than envelope item type + # + # @api private + # + # source://sentry-ruby//lib/sentry/envelope.rb#22 + def data_category(type); end + end +end + +# @api private +# +# source://sentry-ruby//lib/sentry/envelope.rb#8 +Sentry::Envelope::Item::MAX_SERIALIZED_PAYLOAD_SIZE = T.let(T.unsafe(nil), Integer) + +# @api private +# +# source://sentry-ruby//lib/sentry/envelope.rb#7 +Sentry::Envelope::Item::STACKTRACE_FRAME_LIMIT_ON_OVERSIZED_PAYLOAD = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry/exceptions.rb#4 +class Sentry::Error < ::StandardError; end + +# ErrorEvent represents error or normal message events. +# +# source://sentry-ruby//lib/sentry/error_event.rb#5 +class Sentry::ErrorEvent < ::Sentry::Event + # source://sentry-ruby//lib/sentry/error_event.rb#30 + def add_exception_interface(exception, mechanism:); end + + # source://sentry-ruby//lib/sentry/error_event.rb#21 + def add_threads_interface(backtrace: T.unsafe(nil), **options); end + + # @return [ExceptionInterface] + # + # source://sentry-ruby//lib/sentry/error_event.rb#7 + def exception; end + + # @return [ThreadsInterface] + # + # source://sentry-ruby//lib/sentry/error_event.rb#10 + def threads; end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/error_event.rb#13 + def to_hash; end +end + +# This is an abstract class that defines the shared attributes of an event. +# Please don't use it directly. The user-facing classes are its child classes. +# +# source://sentry-ruby//lib/sentry/event.rb#14 +class Sentry::Event + include ::Sentry::CustomInspection + + # @param configuration [Configuration] + # @param integration_meta [Hash, nil] + # @param message [String, nil] + # @return [Event] a new instance of Event + # + # source://sentry-ruby//lib/sentry/event.rb#48 + def initialize(configuration:, integration_meta: T.unsafe(nil), message: T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def breadcrumbs; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def breadcrumbs=(_arg0); end + + # @deprecated This method will be removed in v5.0.0. Please just use Sentry.configuration + # @return [Configuration] + # + # source://sentry-ruby//lib/sentry/event.rb#81 + def configuration; end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def contexts; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def contexts=(_arg0); end + + # Dynamic Sampling Context (DSC) that gets attached + # as the trace envelope header in the transport. + # + # @return [Hash, nil] + # + # source://sentry-ruby//lib/sentry/event.rb#43 + def dynamic_sampling_context; end + + # Dynamic Sampling Context (DSC) that gets attached + # as the trace envelope header in the transport. + # + # @return [Hash, nil] + # + # source://sentry-ruby//lib/sentry/event.rb#43 + def dynamic_sampling_context=(_arg0); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def environment; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def environment=(_arg0); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def event_id; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def event_id=(_arg0); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def extra; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def extra=(_arg0); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def fingerprint; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def fingerprint=(_arg0); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def level; end + + # Sets the event's level. + # + # @param level [String, Symbol] + # @return [void] + # + # source://sentry-ruby//lib/sentry/event.rb#95 + def level=(level); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def message; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def message=(_arg0); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def modules; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def modules=(_arg0); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def platform; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def platform=(_arg0); end + + # Sets the event's request environment data with RequestInterface. + # + # @param env [Hash] + # @return [void] + # @see RequestInterface + # + # source://sentry-ruby//lib/sentry/event.rb#103 + def rack_env=(env); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def release; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def release=(_arg0); end + + # @return [RequestInterface] + # + # source://sentry-ruby//lib/sentry/event.rb#38 + def request; end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def sdk; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def sdk=(_arg0); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def server_name; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def server_name=(_arg0); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def tags; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def tags=(_arg0); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def timestamp; end + + # Sets the event's timestamp. + # + # @param time [Time, Float] + # @return [void] + # + # source://sentry-ruby//lib/sentry/event.rb#88 + def timestamp=(time); end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/event.rb#118 + def to_hash; end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/event.rb#126 + def to_json_compatible; end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def transaction; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def transaction=(_arg0); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def transaction_info; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def transaction_info=(_arg0); end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def type; end + + # source://sentry-ruby//lib/sentry/event.rb#35 + def user; end + + # source://sentry-ruby//lib/sentry/event.rb#34 + def user=(_arg0); end + + private + + # source://sentry-ruby//lib/sentry/event.rb#132 + def add_request_interface(env); end + + # When behind a proxy (or if the user is using a proxy), we can't use + # REMOTE_ADDR to determine the Event IP, and must use other headers instead. + # + # source://sentry-ruby//lib/sentry/event.rb#146 + def calculate_real_ip_from_rack(env); end + + # source://sentry-ruby//lib/sentry/event.rb#136 + def serialize_attributes; end +end + +# source://sentry-ruby//lib/sentry/event.rb#28 +Sentry::Event::MAX_MESSAGE_SIZE_IN_BYTES = T.let(T.unsafe(nil), Integer) + +# These are readable attributes. +# +# source://sentry-ruby//lib/sentry/event.rb#17 +Sentry::Event::SERIALIZEABLE_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/event.rb#30 +Sentry::Event::SKIP_INSPECTION_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/event.rb#15 +Sentry::Event::TYPE = T.let(T.unsafe(nil), String) + +# These are writable attributes. +# +# source://sentry-ruby//lib/sentry/event.rb#26 +Sentry::Event::WRITER_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/interfaces/exception.rb#6 +class Sentry::ExceptionInterface < ::Sentry::Interface + # @param exceptions [Array] + # @return [ExceptionInterface] a new instance of ExceptionInterface + # + # source://sentry-ruby//lib/sentry/interfaces/exception.rb#11 + def initialize(exceptions:); end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/interfaces/exception.rb#16 + def to_hash; end + + # @return [] + # + # source://sentry-ruby//lib/sentry/interfaces/exception.rb#8 + def values; end + + class << self + # Builds ExceptionInterface with given exception and stacktrace_builder. + # + # @param exception [Exception] + # @param stacktrace_builder [StacktraceBuilder] + # @param mechanism [Mechanism] + # @return [ExceptionInterface] + # @see SingleExceptionInterface#build_with_stacktrace + # @see SingleExceptionInterface#initialize + # + # source://sentry-ruby//lib/sentry/interfaces/exception.rb#29 + def build(exception:, stacktrace_builder:, mechanism:); end + end +end + +# source://sentry-ruby//lib/sentry/exceptions.rb#7 +class Sentry::ExternalError < ::Sentry::Error; end + +# source://sentry-ruby//lib/sentry/transport/http_transport.rb#7 +class Sentry::HTTPTransport < ::Sentry::Transport + # @return [HTTPTransport] a new instance of HTTPTransport + # + # source://sentry-ruby//lib/sentry/transport/http_transport.rb#27 + def initialize(*args); end + + # source://sentry-ruby//lib/sentry/transport/http_transport.rb#90 + def conn; end + + # source://sentry-ruby//lib/sentry/transport/http_transport.rb#72 + def endpoint; end + + # source://sentry-ruby//lib/sentry/transport/http_transport.rb#76 + def generate_auth_header; end + + # source://sentry-ruby//lib/sentry/transport/http_transport.rb#32 + def send_data(data); end + + private + + # source://sentry-ruby//lib/sentry/transport/http_transport.rb#121 + def handle_rate_limited_response(headers); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/transport/http_transport.rb#117 + def has_rate_limited_header?(headers); end + + # @param proxy [String, URI, Hash] Proxy config value passed into `config.transport`. + # Accepts either a URI formatted string, URI, or a hash with the `uri`, `user`, and `password` keys. + # @return [Hash] Normalized proxy config that will be passed into `Net::HTTP` + # + # source://sentry-ruby//lib/sentry/transport/http_transport.rb#182 + def normalize_proxy(proxy); end + + # source://sentry-ruby//lib/sentry/transport/http_transport.rb#147 + def parse_rate_limit_header(rate_limit_header); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/transport/http_transport.rb#175 + def should_compress?(data); end + + # source://sentry-ruby//lib/sentry/transport/http_transport.rb#196 + def ssl_configuration; end +end + +# source://sentry-ruby//lib/sentry/transport/http_transport.rb#10 +Sentry::HTTPTransport::CONTENT_TYPE = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/transport/http_transport.rb#12 +Sentry::HTTPTransport::DEFAULT_DELAY = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry/transport/http_transport.rb#8 +Sentry::HTTPTransport::GZIP_ENCODING = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/transport/http_transport.rb#9 +Sentry::HTTPTransport::GZIP_THRESHOLD = T.let(T.unsafe(nil), Integer) + +# The list of errors ::Net::HTTP is known to raise +# See https://github.com/ruby/ruby/blob/b0c639f249165d759596f9579fa985cb30533de6/lib/bundler/fetcher.rb#L281-L286 +# +# source://sentry-ruby//lib/sentry/transport/http_transport.rb#19 +Sentry::HTTPTransport::HTTP_ERRORS = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/transport/http_transport.rb#14 +Sentry::HTTPTransport::RATE_LIMIT_HEADER = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/transport/http_transport.rb#13 +Sentry::HTTPTransport::RETRY_AFTER_HEADER = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/transport/http_transport.rb#15 +Sentry::HTTPTransport::USER_AGENT = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/hub.rb#8 +class Sentry::Hub + include ::Sentry::ArgumentCheckingHelper + + # @return [Hub] a new instance of Hub + # + # source://sentry-ruby//lib/sentry/hub.rb#13 + def initialize(client, scope); end + + # source://sentry-ruby//lib/sentry/hub.rb#209 + def add_breadcrumb(breadcrumb, hint: T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/hub.rb#45 + def bind_client(client); end + + # source://sentry-ruby//lib/sentry/hub.rb#159 + def capture_check_in(slug, status, **options); end + + # source://sentry-ruby//lib/sentry/hub.rb#183 + def capture_event(event, **options, &block); end + + # source://sentry-ruby//lib/sentry/hub.rb#118 + def capture_exception(exception, **options, &block); end + + # source://sentry-ruby//lib/sentry/hub.rb#144 + def capture_message(message, **options, &block); end + + # source://sentry-ruby//lib/sentry/hub.rb#35 + def clone; end + + # source://sentry-ruby//lib/sentry/hub.rb#27 + def configuration; end + + # source://sentry-ruby//lib/sentry/hub.rb#53 + def configure_scope(&block); end + + # source://sentry-ruby//lib/sentry/hub.rb#282 + def continue_trace(env, **options); end + + # source://sentry-ruby//lib/sentry/hub.rb#23 + def current_client; end + + # source://sentry-ruby//lib/sentry/hub.rb#31 + def current_scope; end + + # source://sentry-ruby//lib/sentry/hub.rb#237 + def end_session; end + + # source://sentry-ruby//lib/sentry/hub.rb#263 + def get_baggage; end + + # source://sentry-ruby//lib/sentry/hub.rb#270 + def get_trace_propagation_headers; end + + # source://sentry-ruby//lib/sentry/hub.rb#256 + def get_traceparent; end + + # Returns the value of attribute last_event_id. + # + # source://sentry-ruby//lib/sentry/hub.rb#11 + def last_event_id; end + + # source://sentry-ruby//lib/sentry/hub.rb#19 + def new_from_top; end + + # source://sentry-ruby//lib/sentry/hub.rb#75 + def pop_scope; end + + # source://sentry-ruby//lib/sentry/hub.rb#64 + def push_scope; end + + # source://sentry-ruby//lib/sentry/hub.rb#232 + def start_session; end + + # source://sentry-ruby//lib/sentry/hub.rb#79 + def start_transaction(transaction: T.unsafe(nil), custom_sampling_context: T.unsafe(nil), instrumenter: T.unsafe(nil), **options); end + + # this doesn't do anything to the already initialized background worker + # but it temporarily disables dispatching events to it + # + # source://sentry-ruby//lib/sentry/hub.rb#223 + def with_background_worker_disabled(&block); end + + # source://sentry-ruby//lib/sentry/hub.rb#98 + def with_child_span(instrumenter: T.unsafe(nil), **attributes, &block); end + + # source://sentry-ruby//lib/sentry/hub.rb#57 + def with_scope(&block); end + + # source://sentry-ruby//lib/sentry/hub.rb#247 + def with_session_tracking(&block); end + + private + + # source://sentry-ruby//lib/sentry/hub.rb#302 + def current_layer; end +end + +# source://sentry-ruby//lib/sentry/hub.rb#306 +class Sentry::Hub::Layer + # @return [Layer] a new instance of Layer + # + # source://sentry-ruby//lib/sentry/hub.rb#310 + def initialize(client, scope); end + + # Returns the value of attribute client. + # + # source://sentry-ruby//lib/sentry/hub.rb#307 + def client; end + + # Sets the attribute client + # + # @param value the value to set the attribute client to. + # + # source://sentry-ruby//lib/sentry/hub.rb#307 + def client=(_arg0); end + + # Returns the value of attribute scope. + # + # source://sentry-ruby//lib/sentry/hub.rb#308 + def scope; end +end + +# source://sentry-ruby//lib/sentry/interface.rb#4 +class Sentry::Interface + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/interface.rb#6 + def to_hash; end +end + +# source://sentry-ruby//lib/sentry-ruby.rb#43 +Sentry::LOGGER_PROGNAME = T.let(T.unsafe(nil), String) + +# @api private +# +# source://sentry-ruby//lib/sentry/linecache.rb#5 +class Sentry::LineCache + # @api private + # @return [LineCache] a new instance of LineCache + # + # source://sentry-ruby//lib/sentry/linecache.rb#6 + def initialize; end + + # Any linecache you provide to Sentry must implement this method. + # Returns an Array of Strings representing the lines in the source + # file. The number of lines retrieved is (2 * context) + 1, the middle + # line should be the line requested by lineno. See specs for more information. + # + # @api private + # + # source://sentry-ruby//lib/sentry/linecache.rb#14 + def get_file_context(filename, lineno, context); end + + private + + # @api private + # + # source://sentry-ruby//lib/sentry/linecache.rb#38 + def getline(path, n); end + + # @api private + # + # source://sentry-ruby//lib/sentry/linecache.rb#30 + def getlines(path); end + + # @api private + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/linecache.rb#25 + def valid_path?(path); end +end + +# source://sentry-ruby//lib/sentry/logger.rb#6 +class Sentry::Logger < ::Logger + # @return [Logger] a new instance of Logger + # + # source://sentry-ruby//lib/sentry/logger.rb#10 + def initialize(*_arg0); end +end + +# source://sentry-ruby//lib/sentry/logger.rb#7 +Sentry::Logger::LOG_PREFIX = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/logger.rb#8 +Sentry::Logger::PROGNAME = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/utils/logging_helper.rb#4 +module Sentry::LoggingHelper + # source://sentry-ruby//lib/sentry/utils/logging_helper.rb#18 + def log_debug(message); end + + # source://sentry-ruby//lib/sentry/utils/logging_helper.rb#5 + def log_error(message, exception, debug: T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/utils/logging_helper.rb#14 + def log_info(message); end + + # source://sentry-ruby//lib/sentry/utils/logging_helper.rb#22 + def log_warn(message); end +end + +# source://sentry-ruby//lib/sentry-ruby.rb#39 +Sentry::META = T.let(T.unsafe(nil), Hash) + +# source://sentry-ruby//lib/sentry/interfaces/mechanism.rb#4 +class Sentry::Mechanism < ::Sentry::Interface + # @return [Mechanism] a new instance of Mechanism + # + # source://sentry-ruby//lib/sentry/interfaces/mechanism.rb#15 + def initialize(type: T.unsafe(nil), handled: T.unsafe(nil)); end + + # A manually captured exception has handled set to true, + # false if coming from an integration where we intercept an uncaught exception. + # Defaults to true here and will be set to false explicitly in integrations. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/interfaces/mechanism.rb#13 + def handled; end + + # A manually captured exception has handled set to true, + # false if coming from an integration where we intercept an uncaught exception. + # Defaults to true here and will be set to false explicitly in integrations. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/interfaces/mechanism.rb#13 + def handled=(_arg0); end + + # Generic identifier, mostly the source integration for this exception. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/interfaces/mechanism.rb#7 + def type; end + + # Generic identifier, mostly the source integration for this exception. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/interfaces/mechanism.rb#7 + def type=(_arg0); end +end + +# source://sentry-ruby//lib/sentry/metrics/configuration.rb#4 +module Sentry::Metrics + class << self + # source://sentry-ruby//lib/sentry/metrics.rb#24 + def distribution(key, value, unit: T.unsafe(nil), tags: T.unsafe(nil), timestamp: T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/metrics.rb#32 + def gauge(key, value, unit: T.unsafe(nil), tags: T.unsafe(nil), timestamp: T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/metrics.rb#20 + def increment(key, value = T.unsafe(nil), unit: T.unsafe(nil), tags: T.unsafe(nil), timestamp: T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/metrics.rb#28 + def set(key, value, unit: T.unsafe(nil), tags: T.unsafe(nil), timestamp: T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/metrics.rb#36 + def timing(key, unit: T.unsafe(nil), tags: T.unsafe(nil), timestamp: T.unsafe(nil), &block); end + end +end + +# source://sentry-ruby//lib/sentry/metrics/aggregator.rb#5 +class Sentry::Metrics::Aggregator + include ::Sentry::LoggingHelper + + # @return [Aggregator] a new instance of Aggregator + # + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#38 + def initialize(configuration, client); end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#63 + def add(type, key, value, unit: T.unsafe(nil), tags: T.unsafe(nil), timestamp: T.unsafe(nil), stacklevel: T.unsafe(nil)); end + + # exposed only for testing + # + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#36 + def buckets; end + + # exposed only for testing + # + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#36 + def client; end + + # exposed only for testing + # + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#36 + def code_locations; end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#95 + def flush(force: T.unsafe(nil)); end + + # exposed only for testing + # + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#36 + def flush_shift; end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#123 + def kill; end + + # exposed only for testing + # + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#36 + def thread; end + + private + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#132 + def ensure_thread; end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#179 + def get_code_locations!; end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#162 + def get_flushable_buckets!(force); end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#228 + def get_transaction_name; end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#236 + def get_updated_tags(tags); end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#253 + def process_bucket(timestamp, key, type, value); end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#245 + def process_span_aggregator(key, value); end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#267 + def record_code_location(type, key, unit, timestamp, stacklevel: T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#212 + def sanitize_key(key); end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#220 + def sanitize_tag_key(key); end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#224 + def sanitize_tag_value(value); end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#216 + def sanitize_unit(unit); end + + # serialize buckets to statsd format + # + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#188 + def serialize_buckets(buckets); end + + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#200 + def serialize_locations(timestamp, locations); end + + # important to sort for key consistency + # + # source://sentry-ruby//lib/sentry/metrics/aggregator.rb#152 + def serialize_tags(tags); end +end + +# this is how far removed from user code in the backtrace we are +# when we record code locations +# +# source://sentry-ruby//lib/sentry/metrics/aggregator.rb#13 +Sentry::Metrics::Aggregator::DEFAULT_STACKLEVEL = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry/metrics/aggregator.rb#8 +Sentry::Metrics::Aggregator::FLUSH_INTERVAL = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry/metrics/aggregator.rb#15 +Sentry::Metrics::Aggregator::KEY_SANITIZATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://sentry-ruby//lib/sentry/metrics/aggregator.rb#28 +Sentry::Metrics::Aggregator::METRIC_TYPES = T.let(T.unsafe(nil), Hash) + +# source://sentry-ruby//lib/sentry/metrics/aggregator.rb#9 +Sentry::Metrics::Aggregator::ROLLUP_IN_SECONDS = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry/metrics/aggregator.rb#17 +Sentry::Metrics::Aggregator::TAG_KEY_SANITIZATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://sentry-ruby//lib/sentry/metrics/aggregator.rb#19 +Sentry::Metrics::Aggregator::TAG_VALUE_SANITIZATION_MAP = T.let(T.unsafe(nil), Hash) + +# source://sentry-ruby//lib/sentry/metrics/aggregator.rb#16 +Sentry::Metrics::Aggregator::UNIT_SANITIZATION_REGEX = T.let(T.unsafe(nil), Regexp) + +# source://sentry-ruby//lib/sentry/metrics/configuration.rb#5 +class Sentry::Metrics::Configuration + include ::Sentry::ArgumentCheckingHelper + + # @return [Configuration] a new instance of Configuration + # + # source://sentry-ruby//lib/sentry/metrics/configuration.rb#35 + def initialize; end + + # Optional Proc, called before emitting a metric to the aggregator. + # Use it to filter keys (return false/nil) or update tags. + # Make sure to return true at the end. + # + # @example + # config.metrics.before_emit = lambda do |key, tags| + # return nil if key == 'foo' + # tags[:bar] = 42 + # tags.delete(:baz) + # true + # end + # @return [Proc, nil] + # + # source://sentry-ruby//lib/sentry/metrics/configuration.rb#33 + def before_emit; end + + # source://sentry-ruby//lib/sentry/metrics/configuration.rb#40 + def before_emit=(value); end + + # Enable code location reporting. + # Will be sent once per day. + # True by default. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/metrics/configuration.rb#18 + def enable_code_locations; end + + # Enable code location reporting. + # Will be sent once per day. + # True by default. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/metrics/configuration.rb#18 + def enable_code_locations=(_arg0); end + + # Enable metrics usage. + # Starts a new {Sentry::Metrics::Aggregator} instance to aggregate metrics + # and a thread to aggregate flush every 5 seconds. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/metrics/configuration.rb#12 + def enabled; end + + # Enable metrics usage. + # Starts a new {Sentry::Metrics::Aggregator} instance to aggregate metrics + # and a thread to aggregate flush every 5 seconds. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/metrics/configuration.rb#12 + def enabled=(_arg0); end +end + +# source://sentry-ruby//lib/sentry/metrics/counter_metric.rb#5 +class Sentry::Metrics::CounterMetric < ::Sentry::Metrics::Metric + # @return [CounterMetric] a new instance of CounterMetric + # + # source://sentry-ruby//lib/sentry/metrics/counter_metric.rb#8 + def initialize(value); end + + # source://sentry-ruby//lib/sentry/metrics/counter_metric.rb#12 + def add(value); end + + # source://sentry-ruby//lib/sentry/metrics/counter_metric.rb#16 + def serialize; end + + # Returns the value of attribute value. + # + # source://sentry-ruby//lib/sentry/metrics/counter_metric.rb#6 + def value; end + + # source://sentry-ruby//lib/sentry/metrics/counter_metric.rb#20 + def weight; end +end + +# source://sentry-ruby//lib/sentry/metrics.rb#13 +Sentry::Metrics::DURATION_UNITS = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/metrics/distribution_metric.rb#5 +class Sentry::Metrics::DistributionMetric < ::Sentry::Metrics::Metric + # @return [DistributionMetric] a new instance of DistributionMetric + # + # source://sentry-ruby//lib/sentry/metrics/distribution_metric.rb#8 + def initialize(value); end + + # source://sentry-ruby//lib/sentry/metrics/distribution_metric.rb#12 + def add(value); end + + # source://sentry-ruby//lib/sentry/metrics/distribution_metric.rb#16 + def serialize; end + + # Returns the value of attribute value. + # + # source://sentry-ruby//lib/sentry/metrics/distribution_metric.rb#6 + def value; end + + # source://sentry-ruby//lib/sentry/metrics/distribution_metric.rb#20 + def weight; end +end + +# source://sentry-ruby//lib/sentry/metrics.rb#15 +Sentry::Metrics::FRACTIONAL_UNITS = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/metrics/gauge_metric.rb#5 +class Sentry::Metrics::GaugeMetric < ::Sentry::Metrics::Metric + # @return [GaugeMetric] a new instance of GaugeMetric + # + # source://sentry-ruby//lib/sentry/metrics/gauge_metric.rb#8 + def initialize(value); end + + # source://sentry-ruby//lib/sentry/metrics/gauge_metric.rb#17 + def add(value); end + + # Returns the value of attribute count. + # + # source://sentry-ruby//lib/sentry/metrics/gauge_metric.rb#6 + def count; end + + # Returns the value of attribute last. + # + # source://sentry-ruby//lib/sentry/metrics/gauge_metric.rb#6 + def last; end + + # Returns the value of attribute max. + # + # source://sentry-ruby//lib/sentry/metrics/gauge_metric.rb#6 + def max; end + + # Returns the value of attribute min. + # + # source://sentry-ruby//lib/sentry/metrics/gauge_metric.rb#6 + def min; end + + # source://sentry-ruby//lib/sentry/metrics/gauge_metric.rb#26 + def serialize; end + + # Returns the value of attribute sum. + # + # source://sentry-ruby//lib/sentry/metrics/gauge_metric.rb#6 + def sum; end + + # source://sentry-ruby//lib/sentry/metrics/gauge_metric.rb#30 + def weight; end +end + +# source://sentry-ruby//lib/sentry/metrics.rb#14 +Sentry::Metrics::INFORMATION_UNITS = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/metrics/local_aggregator.rb#5 +class Sentry::Metrics::LocalAggregator + # @return [LocalAggregator] a new instance of LocalAggregator + # + # source://sentry-ruby//lib/sentry/metrics/local_aggregator.rb#9 + def initialize; end + + # source://sentry-ruby//lib/sentry/metrics/local_aggregator.rb#13 + def add(key, value); end + + # exposed only for testing + # + # source://sentry-ruby//lib/sentry/metrics/local_aggregator.rb#7 + def buckets; end + + # source://sentry-ruby//lib/sentry/metrics/local_aggregator.rb#21 + def to_hash; end + + private + + # source://sentry-ruby//lib/sentry/metrics/local_aggregator.rb#42 + def deserialize_tags(tags); end +end + +# source://sentry-ruby//lib/sentry/metrics/metric.rb#5 +class Sentry::Metrics::Metric + # @raise [NotImplementedError] + # + # source://sentry-ruby//lib/sentry/metrics/metric.rb#6 + def add(value); end + + # @raise [NotImplementedError] + # + # source://sentry-ruby//lib/sentry/metrics/metric.rb#10 + def serialize; end + + # @raise [NotImplementedError] + # + # source://sentry-ruby//lib/sentry/metrics/metric.rb#14 + def weight; end +end + +# source://sentry-ruby//lib/sentry/metrics.rb#17 +Sentry::Metrics::OP_NAME = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/metrics/set_metric.rb#8 +class Sentry::Metrics::SetMetric < ::Sentry::Metrics::Metric + # @return [SetMetric] a new instance of SetMetric + # + # source://sentry-ruby//lib/sentry/metrics/set_metric.rb#11 + def initialize(value); end + + # source://sentry-ruby//lib/sentry/metrics/set_metric.rb#15 + def add(value); end + + # source://sentry-ruby//lib/sentry/metrics/set_metric.rb#19 + def serialize; end + + # Returns the value of attribute value. + # + # source://sentry-ruby//lib/sentry/metrics/set_metric.rb#9 + def value; end + + # source://sentry-ruby//lib/sentry/metrics/set_metric.rb#23 + def weight; end +end + +# source://sentry-ruby//lib/sentry/metrics/timing.rb#5 +module Sentry::Metrics::Timing + class << self + # source://sentry-ruby//lib/sentry/metrics/timing.rb#33 + def day; end + + # source://sentry-ruby//lib/sentry/metrics/timing.rb#29 + def hour; end + + # source://sentry-ruby//lib/sentry/metrics/timing.rb#12 + def microsecond; end + + # source://sentry-ruby//lib/sentry/metrics/timing.rb#17 + def millisecond; end + + # source://sentry-ruby//lib/sentry/metrics/timing.rb#25 + def minute; end + + # source://sentry-ruby//lib/sentry/metrics/timing.rb#7 + def nanosecond; end + + # source://sentry-ruby//lib/sentry/metrics/timing.rb#21 + def second; end + + # source://sentry-ruby//lib/sentry/metrics/timing.rb#37 + def week; end + end +end + +# @api private +# +# source://sentry-ruby//lib/sentry/net/http.rb#8 +module Sentry::Net; end + +# @api private +# +# source://sentry-ruby//lib/sentry/net/http.rb#9 +module Sentry::Net::HTTP + # To explain how the entire thing works, we need to know how the original Net::HTTP#request works + # Here's part of its definition. As you can see, it usually calls itself inside a #start block + # + # ``` + # def request(req, body = nil, &block) + # unless started? + # start { + # req['connection'] ||= 'close' + # return request(req, body, &block) # <- request will be called for the second time from the first call + # } + # end + # # ..... + # end + # ``` + # + # So we're only instrumenting request when `Net::HTTP` is already started + # + # @api private + # + # source://sentry-ruby//lib/sentry/net/http.rb#29 + def request(req, body = T.unsafe(nil), &block); end + + private + + # @api private + # + # source://sentry-ruby//lib/sentry/net/http.rb#80 + def extract_request_info(req); end + + # @api private + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/net/http.rb#75 + def from_sentry_sdk?; end + + # @api private + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/net/http.rb#97 + def propagate_trace?(url, configuration); end + + # @api private + # + # source://sentry-ruby//lib/sentry/net/http.rb#60 + def record_sentry_breadcrumb(request_info, res); end + + # @api private + # + # source://sentry-ruby//lib/sentry/net/http.rb#56 + def set_propagation_headers(req); end +end + +# @api private +# +# source://sentry-ruby//lib/sentry/net/http.rb#11 +Sentry::Net::HTTP::BREADCRUMB_CATEGORY = T.let(T.unsafe(nil), String) + +# @api private +# +# source://sentry-ruby//lib/sentry/net/http.rb#10 +Sentry::Net::HTTP::OP_NAME = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/profiler.rb#6 +class Sentry::Profiler + # @return [Profiler] a new instance of Profiler + # + # source://sentry-ruby//lib/sentry/profiler.rb#16 + def initialize(configuration); end + + # Returns the value of attribute event_id. + # + # source://sentry-ruby//lib/sentry/profiler.rb#14 + def event_id; end + + # Returns the value of attribute sampled. + # + # source://sentry-ruby//lib/sentry/profiler.rb#14 + def sampled; end + + # Sets initial sampling decision of the profile. + # + # @return [void] + # + # source://sentry-ruby//lib/sentry/profiler.rb#49 + def set_initial_sample_decision(transaction_sampled); end + + # source://sentry-ruby//lib/sentry/profiler.rb#28 + def start; end + + # Returns the value of attribute started. + # + # source://sentry-ruby//lib/sentry/profiler.rb#14 + def started; end + + # source://sentry-ruby//lib/sentry/profiler.rb#39 + def stop; end + + # source://sentry-ruby//lib/sentry/profiler.rb#76 + def to_hash; end + + private + + # copied from stacktrace.rb since I don't want to touch existing code + # TODO-neel-profiler try to fetch this from stackprof once we patch + # the native extension + # + # source://sentry-ruby//lib/sentry/profiler.rb#199 + def compute_filename(abs_path, in_app); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/profiler.rb#192 + def in_app?(abs_path); end + + # source://sentry-ruby//lib/sentry/profiler.rb#188 + def log(message); end + + # source://sentry-ruby//lib/sentry/profiler.rb#229 + def record_lost_event(reason); end + + # source://sentry-ruby//lib/sentry/profiler.rb#220 + def split_module(name); end +end + +# 101 Hz in microseconds +# +# source://sentry-ruby//lib/sentry/profiler.rb#10 +Sentry::Profiler::DEFAULT_INTERVAL = T.let(T.unsafe(nil), Float) + +# source://sentry-ruby//lib/sentry/profiler.rb#11 +Sentry::Profiler::MICRO_TO_NANO_SECONDS = T.let(T.unsafe(nil), Float) + +# source://sentry-ruby//lib/sentry/profiler.rb#12 +Sentry::Profiler::MIN_SAMPLES_REQUIRED = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry/profiler.rb#8 +Sentry::Profiler::PLATFORM = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/profiler.rb#7 +Sentry::Profiler::VERSION = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/propagation_context.rb#7 +class Sentry::PropagationContext + # @return [PropagationContext] a new instance of PropagationContext + # + # source://sentry-ruby//lib/sentry/propagation_context.rb#36 + def initialize(scope, env = T.unsafe(nil)); end + + # This is only for accessing the current baggage variable. + # Please use the #get_baggage method for interfacing outside this class. + # + # @return [Baggage, nil] + # + # source://sentry-ruby//lib/sentry/propagation_context.rb#34 + def baggage; end + + # Returns the Baggage from the propagation context or populates as head SDK if empty. + # + # @return [Baggage, nil] + # + # source://sentry-ruby//lib/sentry/propagation_context.rb#105 + def get_baggage; end + + # Returns the Dynamic Sampling Context from the baggage. + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/propagation_context.rb#112 + def get_dynamic_sampling_context; end + + # Returns the trace context that can be used to embed in an Event. + # + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/propagation_context.rb#89 + def get_trace_context; end + + # Returns the sentry-trace header from the propagation context. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/propagation_context.rb#99 + def get_traceparent; end + + # Is there an incoming trace or not? + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/propagation_context.rb#30 + def incoming_trace; end + + # The sampling decision of the parent transaction. + # + # @return [Boolean, nil] + # + # source://sentry-ruby//lib/sentry/propagation_context.rb#27 + def parent_sampled; end + + # Span parent's span_id. + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/propagation_context.rb#24 + def parent_span_id; end + + # An uuid that can be used to identify the span. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/propagation_context.rb#21 + def span_id; end + + # An uuid that can be used to identify a trace. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/propagation_context.rb#18 + def trace_id; end + + private + + # source://sentry-ruby//lib/sentry/propagation_context.rb#118 + def populate_head_baggage; end + + class << self + # Extract the trace_id, parent_span_id and parent_sampled values from a sentry-trace header. + # + # @param sentry_trace [String] the sentry-trace header value from the previous transaction. + # @return [Array, nil] + # + # source://sentry-ruby//lib/sentry/propagation_context.rb#77 + def extract_sentry_trace(sentry_trace); end + end +end + +# source://sentry-ruby//lib/sentry/propagation_context.rb#8 +Sentry::PropagationContext::SENTRY_TRACE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# source://sentry-ruby//lib/sentry/rack/capture_exceptions.rb#4 +module Sentry::Rack; end + +# source://sentry-ruby//lib/sentry/rack/capture_exceptions.rb#5 +class Sentry::Rack::CaptureExceptions + # @return [CaptureExceptions] a new instance of CaptureExceptions + # + # source://sentry-ruby//lib/sentry/rack/capture_exceptions.rb#9 + def initialize(app); end + + # source://sentry-ruby//lib/sentry/rack/capture_exceptions.rb#13 + def call(env); end + + private + + # source://sentry-ruby//lib/sentry/rack/capture_exceptions.rb#59 + def capture_exception(exception, env); end + + # source://sentry-ruby//lib/sentry/rack/capture_exceptions.rb#51 + def collect_exception(env); end + + # source://sentry-ruby//lib/sentry/rack/capture_exceptions.rb#72 + def finish_transaction(transaction, status_code); end + + # source://sentry-ruby//lib/sentry/rack/capture_exceptions.rb#79 + def mechanism; end + + # source://sentry-ruby//lib/sentry/rack/capture_exceptions.rb#65 + def start_transaction(env, scope); end + + # source://sentry-ruby//lib/sentry/rack/capture_exceptions.rb#55 + def transaction_op; end +end + +# source://sentry-ruby//lib/sentry/rack/capture_exceptions.rb#6 +Sentry::Rack::CaptureExceptions::ERROR_EVENT_ID_KEY = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/rack/capture_exceptions.rb#7 +Sentry::Rack::CaptureExceptions::MECHANISM_TYPE = T.let(T.unsafe(nil), String) + +# @api private +# +# source://sentry-ruby//lib/sentry/redis.rb#5 +class Sentry::Redis + # @api private + # @return [Redis] a new instance of Redis + # + # source://sentry-ruby//lib/sentry/redis.rb#9 + def initialize(commands, host, port, db); end + + # @api private + # + # source://sentry-ruby//lib/sentry/redis.rb#13 + def instrument; end + + private + + # @api private + # + # source://sentry-ruby//lib/sentry/redis.rb#33 + def commands; end + + # @api private + # + # source://sentry-ruby//lib/sentry/redis.rb#52 + def commands_description; end + + # @api private + # + # source://sentry-ruby//lib/sentry/redis.rb#33 + def db; end + + # @api private + # + # source://sentry-ruby//lib/sentry/redis.rb#33 + def host; end + + # @api private + # + # source://sentry-ruby//lib/sentry/redis.rb#58 + def parsed_commands; end + + # @api private + # + # source://sentry-ruby//lib/sentry/redis.rb#33 + def port; end + + # @api private + # + # source://sentry-ruby//lib/sentry/redis.rb#35 + def record_breadcrumb; end + + # @api private + # + # source://sentry-ruby//lib/sentry/redis.rb#74 + def server_description; end +end + +# @api private +# +# source://sentry-ruby//lib/sentry/redis.rb#84 +module Sentry::Redis::GlobalRedisInstrumentation + # @api private + # + # source://sentry-ruby//lib/sentry/redis.rb#85 + def call(command, redis_config); end + + # @api private + # + # source://sentry-ruby//lib/sentry/redis.rb#91 + def call_pipelined(commands, redis_config); end +end + +# @api private +# +# source://sentry-ruby//lib/sentry/redis.rb#7 +Sentry::Redis::LOGGER_NAME = T.let(T.unsafe(nil), Symbol) + +# @api private +# +# source://sentry-ruby//lib/sentry/redis.rb#6 +Sentry::Redis::OP_NAME = T.let(T.unsafe(nil), String) + +# @api private +# +# source://sentry-ruby//lib/sentry/redis.rb#78 +module Sentry::Redis::OldClientPatch + # @api private + # + # source://sentry-ruby//lib/sentry/redis.rb#79 + def logging(commands, &block); end +end + +# @api private +# +# source://sentry-ruby//lib/sentry/release_detector.rb#5 +class Sentry::ReleaseDetector + class << self + # @api private + # + # source://sentry-ruby//lib/sentry/release_detector.rb#7 + def detect_release(project_root:, running_on_heroku:); end + + # @api private + # + # source://sentry-ruby//lib/sentry/release_detector.rb#19 + def detect_release_from_capistrano(project_root); end + + # @api private + # + # source://sentry-ruby//lib/sentry/release_detector.rb#34 + def detect_release_from_env; end + + # @api private + # + # source://sentry-ruby//lib/sentry/release_detector.rb#30 + def detect_release_from_git; end + + # @api private + # + # source://sentry-ruby//lib/sentry/release_detector.rb#14 + def detect_release_from_heroku(running_on_heroku); end + end +end + +# source://sentry-ruby//lib/sentry/interfaces/request.rb#4 +class Sentry::RequestInterface < ::Sentry::Interface + # @param env [Hash] + # @param send_default_pii [Boolean] + # @param rack_env_whitelist [Array] + # @return [RequestInterface] a new instance of RequestInterface + # @see Configuration#send_default_pii + # @see Configuration#rack_env_whitelist + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#44 + def initialize(env:, send_default_pii:, rack_env_whitelist:); end + + # @return [String] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#31 + def cookies; end + + # @return [String] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#31 + def cookies=(_arg0); end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#25 + def data; end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#25 + def data=(_arg0); end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#37 + def env; end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#37 + def env=(_arg0); end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#34 + def headers; end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#34 + def headers=(_arg0); end + + # @return [String] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#22 + def method; end + + # @return [String] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#22 + def method=(_arg0); end + + # @return [String] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#28 + def query_string; end + + # @return [String] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#28 + def query_string=(_arg0); end + + # @return [String] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#19 + def url; end + + # @return [String] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#19 + def url=(_arg0); end + + private + + # source://sentry-ruby//lib/sentry/interfaces/request.rb#126 + def filter_and_format_env(env, rack_env_whitelist); end + + # source://sentry-ruby//lib/sentry/interfaces/request.rb#84 + def filter_and_format_headers(env, send_default_pii); end + + # In versions < 3, Rack adds in an incorrect HTTP_VERSION key, which causes downstream + # to think this is a Version header. Instead, this is mapped to + # env['SERVER_PROTOCOL']. But we don't want to ignore a valid header + # if the request has legitimately sent a Version header themselves. + # See: https://github.com/rack/rack/blob/028438f/lib/rack/handler/cgi.rb#L29 + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#119 + def is_server_protocol?(key, value, protocol_version); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/interfaces/request.rb#108 + def is_skippable_header?(key); end + + # source://sentry-ruby//lib/sentry/interfaces/request.rb#71 + def read_data_from(request); end +end + +# source://sentry-ruby//lib/sentry/interfaces/request.rb#6 +Sentry::RequestInterface::CONTENT_HEADERS = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/interfaces/request.rb#7 +Sentry::RequestInterface::IP_HEADERS = T.let(T.unsafe(nil), Array) + +# See Sentry server default limits at +# https://github.com/getsentry/sentry/blob/master/src/sentry/conf/server.py +# +# source://sentry-ruby//lib/sentry/interfaces/request.rb#16 +Sentry::RequestInterface::MAX_BODY_LIMIT = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry/interfaces/request.rb#5 +Sentry::RequestInterface::REQUEST_ID_HEADERS = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry-ruby.rb#45 +Sentry::SENTRY_TRACE_HEADER_NAME = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/scope.rb#8 +class Sentry::Scope + include ::Sentry::ArgumentCheckingHelper + + # @param max_breadcrumbs [Integer] the maximum number of breadcrumbs to be stored in the scope. + # @return [Scope] a new instance of Scope + # + # source://sentry-ruby//lib/sentry/scope.rb#31 + def initialize(max_breadcrumbs: T.unsafe(nil)); end + + # Adds the breadcrumb to the scope's breadcrumbs buffer. + # + # @param breadcrumb [Breadcrumb] + # @return [void] + # + # source://sentry-ruby//lib/sentry/scope.rb#81 + def add_breadcrumb(breadcrumb); end + + # Adds a new event processor [Proc] to the scope. + # + # @param block [Proc] + # @return [void] + # + # source://sentry-ruby//lib/sentry/scope.rb#285 + def add_event_processor(&block); end + + # Applies stored attributes and event processors to the given event. + # + # @param event [Event] + # @param hint [Hash] the hint data that'll be passed to event processors. + # @return [Event] + # + # source://sentry-ruby//lib/sentry/scope.rb#46 + def apply_to_event(event, hint = T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def breadcrumbs; end + + # Resets the scope's attributes to defaults. + # + # @return [void] + # + # source://sentry-ruby//lib/sentry/scope.rb#38 + def clear; end + + # Clears the scope's breadcrumbs buffer + # + # @return [void] + # + # source://sentry-ruby//lib/sentry/scope.rb#87 + def clear_breadcrumbs; end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def contexts; end + + # @return [Scope] + # + # source://sentry-ruby//lib/sentry/scope.rb#92 + def dup; end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def event_processors; end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def extra; end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def fingerprint; end + + # Generate a new propagation context either from the incoming env headers or from scratch. + # + # @param env [Hash, nil] + # @return [void] + # + # source://sentry-ruby//lib/sentry/scope.rb#292 + def generate_propagation_context(env = T.unsafe(nil)); end + + # Returns the associated Span object. + # + # @return [Span, nil] + # + # source://sentry-ruby//lib/sentry/scope.rb#269 + def get_span; end + + # Returns the associated Transaction object. + # + # @return [Transaction, nil] + # + # source://sentry-ruby//lib/sentry/scope.rb#263 + def get_transaction; end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def level; end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def propagation_context; end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def rack_env; end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def session; end + + # source://sentry-ruby//lib/sentry/scope.rb#213 + def set_context(key, value); end + + # Updates the scope's contexts attribute by merging with the old value. + # + # @param contexts [Hash] + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/scope.rb#201 + def set_contexts(contexts_hash); end + + # Adds a new key-value pair to current extras. + # + # @param key [String, Symbol] + # @param value [Object] + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/scope.rb#180 + def set_extra(key, value); end + + # source://sentry-ruby//lib/sentry/scope.rb#171 + def set_extras(extras_hash); end + + # Sets the scope's fingerprint attribute. + # + # @param fingerprint [Array] + # @return [Array] + # + # source://sentry-ruby//lib/sentry/scope.rb#276 + def set_fingerprint(fingerprint); end + + # Sets the scope's level attribute. + # + # @param level [String, Symbol] + # @return [void] + # + # source://sentry-ruby//lib/sentry/scope.rb#221 + def set_level(level); end + + # Sets the scope's rack_env attribute. + # + # @param env [Hash] + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/scope.rb#151 + def set_rack_env(env); end + + # Sets the currently active session on the scope. + # + # @param session [Session, nil] + # @return [void] + # + # source://sentry-ruby//lib/sentry/scope.rb#237 + def set_session(session); end + + # Sets the scope's span attribute. + # + # @param span [Span] + # @return [Span] + # + # source://sentry-ruby//lib/sentry/scope.rb#159 + def set_span(span); end + + # Adds a new key-value pair to current tags. + # + # @param key [String, Symbol] + # @param value [Object] + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/scope.rb#194 + def set_tag(key, value); end + + # source://sentry-ruby//lib/sentry/scope.rb#185 + def set_tags(tags_hash); end + + # Appends a new transaction name to the scope. + # The "transaction" here does not refer to `Transaction` objects. + # + # @param transaction_name [String] + # @return [void] + # + # source://sentry-ruby//lib/sentry/scope.rb#229 + def set_transaction_name(transaction_name, source: T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/scope.rb#165 + def set_user(user_hash); end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def span; end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def tags; end + + # Returns current transaction name. + # The "transaction" here does not refer to `Transaction` objects. + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/scope.rb#244 + def transaction_name; end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def transaction_names; end + + # Returns current transaction source. + # The "transaction" here does not refer to `Transaction` objects. + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/scope.rb#251 + def transaction_source; end + + # These are high cardinality and thus bad. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/scope.rb#257 + def transaction_source_low_quality?; end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def transaction_sources; end + + # Updates the scope's data from the given options. + # + # @param contexts [Hash] + # @param extras [Hash] + # @param tags [Hash] + # @param user [Hash] + # @param level [String, Symbol] + # @param fingerprint [Array] + # @return [void] + # + # source://sentry-ruby//lib/sentry/scope.rb#132 + def update_from_options(contexts: T.unsafe(nil), extra: T.unsafe(nil), tags: T.unsafe(nil), user: T.unsafe(nil), level: T.unsafe(nil), fingerprint: T.unsafe(nil)); end + + # Updates the scope's data from a given scope. + # + # @param scope [Scope] + # @return [void] + # + # source://sentry-ruby//lib/sentry/scope.rb#111 + def update_from_scope(scope); end + + # source://sentry-ruby//lib/sentry/scope.rb#28 + def user; end + + protected + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def breadcrumbs=(_arg0); end + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def contexts=(_arg0); end + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def event_processors=(_arg0); end + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def extra=(_arg0); end + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def fingerprint=(_arg0); end + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def level=(_arg0); end + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def propagation_context=(_arg0); end + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def rack_env=(_arg0); end + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def session=(_arg0); end + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def span=(_arg0); end + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def tags=(_arg0); end + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def transaction_names=(_arg0); end + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def transaction_sources=(_arg0); end + + # source://sentry-ruby//lib/sentry/scope.rb#299 + def user=(_arg0); end + + private + + # source://sentry-ruby//lib/sentry/scope.rb#303 + def set_default_value; end + + # source://sentry-ruby//lib/sentry/scope.rb#320 + def set_new_breadcrumb_buffer; end + + class << self + # Adds a new global event processor [Proc]. + # Sometimes we need a global event processor without needing to configure scope. + # These run before scope event processors. + # + # @param block [Proc] + # @return [void] + # + # source://sentry-ruby//lib/sentry/scope.rb#360 + def add_global_event_processor(&block); end + + # Returns the global event processors array. + # + # @return [Array] + # + # source://sentry-ruby//lib/sentry/scope.rb#350 + def global_event_processors; end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/scope.rb#326 + def os_context; end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/scope.rb#341 + def runtime_context; end + end +end + +# source://sentry-ruby//lib/sentry/scope.rb#11 +Sentry::Scope::ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/session.rb#4 +class Sentry::Session + # @return [Session] a new instance of Session + # + # source://sentry-ruby//lib/sentry/session.rb#11 + def initialize; end + + # Returns the value of attribute aggregation_key. + # + # source://sentry-ruby//lib/sentry/session.rb#5 + def aggregation_key; end + + # source://sentry-ruby//lib/sentry/session.rb#25 + def close; end + + # source://sentry-ruby//lib/sentry/session.rb#29 + def deep_dup; end + + # Returns the value of attribute started. + # + # source://sentry-ruby//lib/sentry/session.rb#5 + def started; end + + # Returns the value of attribute status. + # + # source://sentry-ruby//lib/sentry/session.rb#5 + def status; end + + # TODO-neel add :crashed after adding handled mechanism + # + # source://sentry-ruby//lib/sentry/session.rb#21 + def update_from_exception(_exception = T.unsafe(nil)); end +end + +# source://sentry-ruby//lib/sentry/session.rb#9 +Sentry::Session::AGGREGATE_STATUSES = T.let(T.unsafe(nil), Array) + +# TODO-neel add :crashed after adding handled mechanism +# +# source://sentry-ruby//lib/sentry/session.rb#8 +Sentry::Session::STATUSES = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/session_flusher.rb#4 +class Sentry::SessionFlusher + include ::Sentry::LoggingHelper + + # @return [SessionFlusher] a new instance of SessionFlusher + # + # source://sentry-ruby//lib/sentry/session_flusher.rb#9 + def initialize(configuration, client); end + + # source://sentry-ruby//lib/sentry/session_flusher.rb#28 + def add_session(session); end + + # source://sentry-ruby//lib/sentry/session_flusher.rb#21 + def flush; end + + # source://sentry-ruby//lib/sentry/session_flusher.rb#45 + def kill; end + + private + + # source://sentry-ruby//lib/sentry/session_flusher.rb#70 + def attrs; end + + # source://sentry-ruby//lib/sentry/session_flusher.rb#74 + def ensure_thread; end + + # source://sentry-ruby//lib/sentry/session_flusher.rb#54 + def init_aggregates(aggregation_key); end + + # source://sentry-ruby//lib/sentry/session_flusher.rb#60 + def pending_envelope; end +end + +# source://sentry-ruby//lib/sentry/session_flusher.rb#7 +Sentry::SessionFlusher::FLUSH_INTERVAL = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#6 +class Sentry::SingleExceptionInterface < ::Sentry::Interface + include ::Sentry::CustomInspection + + # @return [SingleExceptionInterface] a new instance of SingleExceptionInterface + # + # source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#17 + def initialize(exception:, mechanism:, stacktrace: T.unsafe(nil)); end + + # Returns the value of attribute mechanism. + # + # source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#14 + def mechanism; end + + # Returns the value of attribute module. + # + # source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#14 + def module; end + + # Returns the value of attribute stacktrace. + # + # source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#14 + def stacktrace; end + + # Returns the value of attribute thread_id. + # + # source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#14 + def thread_id; end + + # source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#35 + def to_hash; end + + # Returns the value of attribute type. + # + # source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#14 + def type; end + + # Returns the value of attribute value. + # + # source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#15 + def value; end + + # Sets the attribute value + # + # @param value the value to set the attribute value to. + # + # source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#15 + def value=(_arg0); end + + class << self + # patch this method if you want to change an exception's stacktrace frames + # also see `StacktraceBuilder.build`. + # + # source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#44 + def build_with_stacktrace(exception:, stacktrace_builder:, mechanism:); end + end +end + +# source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#12 +Sentry::SingleExceptionInterface::MAX_LOCAL_BYTES = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#11 +Sentry::SingleExceptionInterface::OMISSION_MARK = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#10 +Sentry::SingleExceptionInterface::PROBLEMATIC_LOCAL_VALUE_REPLACEMENT = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/interfaces/single_exception.rb#9 +Sentry::SingleExceptionInterface::SKIP_INSPECTION_ATTRIBUTES = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/span.rb#7 +class Sentry::Span + # @return [Span] a new instance of Span + # + # source://sentry-ruby//lib/sentry/span.rb#102 + def initialize(transaction:, description: T.unsafe(nil), op: T.unsafe(nil), status: T.unsafe(nil), trace_id: T.unsafe(nil), span_id: T.unsafe(nil), parent_span_id: T.unsafe(nil), sampled: T.unsafe(nil), start_timestamp: T.unsafe(nil), timestamp: T.unsafe(nil)); end + + # Span data + # + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/span.rb#90 + def data; end + + # source://sentry-ruby//lib/sentry/span.rb#220 + def deep_dup; end + + # Span description + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/span.rb#78 + def description; end + + # Finishes the span by adding a timestamp. + # + # @return [self] + # + # source://sentry-ruby//lib/sentry/span.rb#130 + def finish(end_timestamp: T.unsafe(nil)); end + + # Returns the span's context that can be used to embed in an Event. + # + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/span.rb#174 + def get_trace_context; end + + # Collects gauge metrics on the span for metric summaries. + # + # source://sentry-ruby//lib/sentry/span.rb#279 + def metrics_local_aggregator; end + + # source://sentry-ruby//lib/sentry/span.rb#283 + def metrics_summary; end + + # Span operation + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/span.rb#81 + def op; end + + # Span parent's span_id. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/span.rb#66 + def parent_span_id; end + + # Sampling result of the span. + # + # @return [Boolean, nil] + # + # source://sentry-ruby//lib/sentry/span.rb#69 + def sampled; end + + # Inserts a key-value pair to the span's data payload. + # + # @param key [String, Symbol] + # @param value [Object] + # + # source://sentry-ruby//lib/sentry/span.rb#267 + def set_data(key, value); end + + # Sets the span's description. + # + # @param description [String] description of the span. + # + # source://sentry-ruby//lib/sentry/span.rb#232 + def set_description(description); end + + # Sets the span's status with given http status code. + # + # @param status_code [String] example: "500". + # + # source://sentry-ruby//lib/sentry/span.rb#251 + def set_http_status(status_code); end + + # Sets the span's operation. + # + # @param op [String] operation of the span. + # + # source://sentry-ruby//lib/sentry/span.rb#226 + def set_op(op); end + + # Sets the span's status. + # + # @param satus [String] status of the span. + # + # source://sentry-ruby//lib/sentry/span.rb#239 + def set_status(status); end + + # Sets a tag to the span. + # + # @param key [String, Symbol] + # @param value [String] + # + # source://sentry-ruby//lib/sentry/span.rb#274 + def set_tag(key, value); end + + # Sets the span's finish timestamp. + # + # @param timestamp [Float] finished time in float format (most precise). + # + # source://sentry-ruby//lib/sentry/span.rb#245 + def set_timestamp(timestamp); end + + # An uuid that can be used to identify the span. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/span.rb#63 + def span_id; end + + # The SpanRecorder the current span belongs to. + # SpanRecorder holds all spans under the same Transaction object (including the Transaction itself). + # + # @return [SpanRecorder] + # + # source://sentry-ruby//lib/sentry/span.rb#95 + def span_recorder; end + + # The SpanRecorder the current span belongs to. + # SpanRecorder holds all spans under the same Transaction object (including the Transaction itself). + # + # @return [SpanRecorder] + # + # source://sentry-ruby//lib/sentry/span.rb#95 + def span_recorder=(_arg0); end + + # Starts a child span with given attributes. + # + # @param attributes [Hash] the attributes for the child span. + # + # source://sentry-ruby//lib/sentry/span.rb#187 + def start_child(**attributes); end + + # Starting timestamp of the span. + # + # @return [Float] + # + # source://sentry-ruby//lib/sentry/span.rb#72 + def start_timestamp; end + + # Span status + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/span.rb#84 + def status; end + + # Span tags + # + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/span.rb#87 + def tags; end + + # Finishing timestamp of the span. + # + # @return [Float] + # + # source://sentry-ruby//lib/sentry/span.rb#75 + def timestamp; end + + # Generates a W3C Baggage header string for distributed tracing + # from the incoming baggage stored on the transaction. + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/span.rb#147 + def to_baggage; end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/span.rb#152 + def to_hash; end + + # Generates a trace string that can be used to connect other transactions. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/span.rb#137 + def to_sentry_trace; end + + # An uuid that can be used to identify a trace. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/span.rb#60 + def trace_id; end + + # The Transaction object the Span belongs to. + # Every span needs to be attached to a Transaction and their child spans will also inherit the same transaction. + # + # @return [Transaction] + # + # source://sentry-ruby//lib/sentry/span.rb#100 + def transaction; end + + # Starts a child span, yield it to the given block, and then finish the span after the block is executed. + # + # @example + # span.with_child_span do |child_span| + # # things happen here will be recorded in a child span + # end + # @param attributes [Hash] the attributes for the child span. + # @param block [Proc] the action to be recorded in the child span. + # @yieldparam child_span [Span] + # + # source://sentry-ruby//lib/sentry/span.rb#208 + def with_child_span(**attributes, &block); end +end + +# We will try to be consistent with OpenTelemetry on this front going forward. +# https://develop.sentry.dev/sdk/performance/span-data-conventions/ +# +# source://sentry-ruby//lib/sentry/span.rb#10 +module Sentry::Span::DataConventions; end + +# The name of the database being accessed. +# For commands that switch the database, this should be set to the target database +# (even if the command fails). +# Example: myDatabase +# +# source://sentry-ruby//lib/sentry/span.rb#24 +Sentry::Span::DataConventions::DB_NAME = T.let(T.unsafe(nil), String) + +# An identifier for the database management system (DBMS) product being used. +# Example: postgresql +# +# source://sentry-ruby//lib/sentry/span.rb#18 +Sentry::Span::DataConventions::DB_SYSTEM = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/span.rb#14 +Sentry::Span::DataConventions::HTTP_METHOD = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/span.rb#13 +Sentry::Span::DataConventions::HTTP_QUERY = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/span.rb#12 +Sentry::Span::DataConventions::HTTP_STATUS_CODE = T.let(T.unsafe(nil), String) + +# Name of the database host. +# Example: example.com +# +# source://sentry-ruby//lib/sentry/span.rb#28 +Sentry::Span::DataConventions::SERVER_ADDRESS = T.let(T.unsafe(nil), String) + +# Logical server port number +# Example: 80; 8080; 443 +# +# source://sentry-ruby//lib/sentry/span.rb#32 +Sentry::Span::DataConventions::SERVER_PORT = T.let(T.unsafe(nil), String) + +# Physical server IP address or Unix socket address. +# Example: 10.5.3.2 +# +# source://sentry-ruby//lib/sentry/span.rb#36 +Sentry::Span::DataConventions::SERVER_SOCKET_ADDRESS = T.let(T.unsafe(nil), String) + +# Physical server port. +# Recommended: If different than server.port. +# Example: 16456 +# +# source://sentry-ruby//lib/sentry/span.rb#41 +Sentry::Span::DataConventions::SERVER_SOCKET_PORT = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/span.rb#11 +Sentry::Span::DataConventions::URL = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/span.rb#44 +Sentry::Span::STATUS_MAP = T.let(T.unsafe(nil), Hash) + +# Designed to just report events to Spotlight in development. +# +# source://sentry-ruby//lib/sentry/transport/spotlight_transport.rb#8 +class Sentry::SpotlightTransport < ::Sentry::HTTPTransport + # @return [SpotlightTransport] a new instance of SpotlightTransport + # + # source://sentry-ruby//lib/sentry/transport/spotlight_transport.rb#12 + def initialize(configuration); end + + # Similar to HTTPTransport connection, but does not support Proxy and SSL + # + # source://sentry-ruby//lib/sentry/transport/spotlight_transport.rb#43 + def conn; end + + # source://sentry-ruby//lib/sentry/transport/spotlight_transport.rb#21 + def endpoint; end + + # source://sentry-ruby//lib/sentry/transport/spotlight_transport.rb#38 + def on_error; end + + # source://sentry-ruby//lib/sentry/transport/spotlight_transport.rb#25 + def send_data(data); end +end + +# source://sentry-ruby//lib/sentry/transport/spotlight_transport.rb#9 +Sentry::SpotlightTransport::DEFAULT_SIDECAR_URL = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/transport/spotlight_transport.rb#10 +Sentry::SpotlightTransport::MAX_FAILED_REQUESTS = T.let(T.unsafe(nil), Integer) + +# source://sentry-ruby//lib/sentry/interfaces/stacktrace_builder.rb#4 +class Sentry::StacktraceBuilder + # @param project_root [String] + # @param app_dirs_pattern [Regexp, nil] + # @param linecache [LineCache] + # @param context_lines [Integer, nil] + # @param backtrace_cleanup_callback [Proc, nil] + # @return [StacktraceBuilder] a new instance of StacktraceBuilder + # @see Configuration#project_root + # @see Configuration#app_dirs_pattern + # @see Configuration#linecache + # @see Configuration#context_lines + # @see Configuration#backtrace_cleanup_callback + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace_builder.rb#30 + def initialize(project_root:, app_dirs_pattern:, linecache:, context_lines:, backtrace_cleanup_callback: T.unsafe(nil)); end + + # @return [Regexp, nil] + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace_builder.rb#9 + def app_dirs_pattern; end + + # @return [Proc, nil] + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace_builder.rb#18 + def backtrace_cleanup_callback; end + + # Generates a StacktraceInterface with the given backtrace. + # You can pass a block to customize/exclude frames: + # + # @example + # builder.build(backtrace) do |frame| + # if frame.module.match?(/a_gem/) + # nil + # else + # frame + # end + # end + # @param backtrace [Array] + # @param frame_callback [Proc] + # @return [StacktraceInterface] + # @yieldparam frame [StacktraceInterface::Frame] + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace_builder.rb#53 + def build(backtrace:, &frame_callback); end + + # @return [Integer, nil] + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace_builder.rb#15 + def context_lines; end + + # @return [LineCache] + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace_builder.rb#12 + def linecache; end + + # Get the code location hash for a single line for where metrics where added. + # + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace_builder.rb#67 + def metrics_code_location(unparsed_line); end + + # @return [String] + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace_builder.rb#6 + def project_root; end + + private + + # source://sentry-ruby//lib/sentry/interfaces/stacktrace_builder.rb#75 + def convert_parsed_line_into_frame(line); end + + # source://sentry-ruby//lib/sentry/interfaces/stacktrace_builder.rb#81 + def parse_backtrace_lines(backtrace); end +end + +# source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#4 +class Sentry::StacktraceInterface + # @param frames [] + # @return [StacktraceInterface] a new instance of StacktraceInterface + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#9 + def initialize(frames:); end + + # @return [] + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#6 + def frames; end + + # @return [String] + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#19 + def inspect; end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#14 + def to_hash; end +end + +# Not actually an interface, but I want to use the same style +# +# source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#26 +class Sentry::StacktraceInterface::Frame < ::Sentry::Interface + # @return [Frame] a new instance of Frame + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#30 + def initialize(project_root, line); end + + # Returns the value of attribute abs_path. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def abs_path; end + + # Sets the attribute abs_path + # + # @param value the value to set the attribute abs_path to. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def abs_path=(_arg0); end + + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#45 + def compute_filename; end + + # Returns the value of attribute context_line. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def context_line; end + + # Sets the attribute context_line + # + # @param value the value to set the attribute context_line to. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def context_line=(_arg0); end + + # Returns the value of attribute filename. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def filename; end + + # Sets the attribute filename + # + # @param value the value to set the attribute filename to. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def filename=(_arg0); end + + # Returns the value of attribute function. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def function; end + + # Sets the attribute function + # + # @param value the value to set the attribute function to. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def function=(_arg0); end + + # Returns the value of attribute in_app. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def in_app; end + + # Sets the attribute in_app + # + # @param value the value to set the attribute in_app to. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def in_app=(_arg0); end + + # Returns the value of attribute lineno. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def lineno; end + + # Sets the attribute lineno + # + # @param value the value to set the attribute lineno to. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def lineno=(_arg0); end + + # Returns the value of attribute module. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def module; end + + # Sets the attribute module + # + # @param value the value to set the attribute module to. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def module=(_arg0); end + + # Returns the value of attribute post_context. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def post_context; end + + # Sets the attribute post_context + # + # @param value the value to set the attribute post_context to. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def post_context=(_arg0); end + + # Returns the value of attribute pre_context. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def pre_context; end + + # Sets the attribute pre_context + # + # @param value the value to set the attribute pre_context to. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def pre_context=(_arg0); end + + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#60 + def set_context(linecache, context_lines); end + + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#67 + def to_hash(*args); end + + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#41 + def to_s; end + + # Returns the value of attribute vars. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def vars; end + + # Sets the attribute vars + # + # @param value the value to set the attribute vars to. + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#27 + def vars=(_arg0); end + + private + + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#82 + def longest_load_path; end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/interfaces/stacktrace.rb#78 + def under_project_root?; end +end + +# source://sentry-ruby//lib/sentry-ruby.rb#49 +Sentry::THREAD_LOCAL = T.let(T.unsafe(nil), Symbol) + +# source://sentry-ruby//lib/sentry/interfaces/threads.rb#4 +class Sentry::ThreadsInterface + # @param crashed [Boolean] + # @param stacktrace [Array] + # @return [ThreadsInterface] a new instance of ThreadsInterface + # + # source://sentry-ruby//lib/sentry/interfaces/threads.rb#7 + def initialize(crashed: T.unsafe(nil), stacktrace: T.unsafe(nil)); end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/interfaces/threads.rb#16 + def to_hash; end + + class << self + # Builds the ThreadsInterface with given backtrace and stacktrace_builder. + # Patch this method if you want to change a threads interface's stacktrace frames. + # + # @param backtrace [Array] + # @param stacktrace_builder [StacktraceBuilder] + # @param crashed [Hash] + # @return [ThreadsInterface] + # @see StacktraceBuilder.build + # + # source://sentry-ruby//lib/sentry/interfaces/threads.rb#37 + def build(backtrace:, stacktrace_builder:, **options); end + end +end + +# source://sentry-ruby//lib/sentry/transaction.rb#8 +class Sentry::Transaction < ::Sentry::Span + include ::Sentry::LoggingHelper + + # @return [Transaction] a new instance of Transaction + # + # source://sentry-ruby//lib/sentry/transaction.rb#63 + def initialize(hub:, name: T.unsafe(nil), source: T.unsafe(nil), parent_sampled: T.unsafe(nil), baggage: T.unsafe(nil), **options); end + + # The parsed incoming W3C baggage header. + # This is only for accessing the current baggage variable. + # Please use the #get_baggage method for interfacing outside this class. + # + # @return [Baggage, nil] + # + # source://sentry-ruby//lib/sentry/transaction.rb#36 + def baggage; end + + # @deprecated Use Sentry.configuration instead. + # + # source://sentry-ruby//lib/sentry/transaction.rb#46 + def configuration; end + + # Additional contexts stored directly on the transaction object. + # + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/transaction.rb#57 + def contexts; end + + # @return [Transaction] + # + # source://sentry-ruby//lib/sentry/transaction.rb#156 + def deep_dup; end + + # The effective sample rate at which this transaction was sampled. + # + # @return [Float, nil] + # + # source://sentry-ruby//lib/sentry/transaction.rb#53 + def effective_sample_rate; end + + # Finishes the transaction's recording and send it to Sentry. + # + # @param hub [Hub] the hub that'll send this transaction. (Deprecated) + # @return [TransactionEvent] + # + # source://sentry-ruby//lib/sentry/transaction.rb#242 + def finish(hub: T.unsafe(nil), end_timestamp: T.unsafe(nil)); end + + # Get the existing frozen incoming baggage + # or populate one with sentry- items as the head SDK. + # + # @return [Baggage] + # + # source://sentry-ruby//lib/sentry/transaction.rb#275 + def get_baggage; end + + # @deprecated Use Sentry.get_current_hub instead. + # + # source://sentry-ruby//lib/sentry/transaction.rb#43 + def hub; end + + # @deprecated Use Sentry.logger instead. + # + # source://sentry-ruby//lib/sentry/transaction.rb#49 + def logger; end + + # The measurements added to the transaction. + # + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/transaction.rb#40 + def measurements; end + + # The name of the transaction. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/transaction.rb#22 + def name; end + + # The sampling decision of the parent transaction, which will be considered when making the current transaction's sampling decision. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/transaction.rb#30 + def parent_sampled; end + + # The Profiler instance for this transaction. + # + # @return [Profiler] + # + # source://sentry-ruby//lib/sentry/transaction.rb#61 + def profiler; end + + # Set contexts directly on the transaction. + # + # @param key [String, Symbol] + # @param value [Object] + # @return [void] + # + # source://sentry-ruby//lib/sentry/transaction.rb#294 + def set_context(key, value); end + + # Sets initial sampling decision of the transaction. + # + # @param sampling_context [Hash] a context Hash that'll be passed to `traces_sampler` (if provided). + # @return [void] + # + # source://sentry-ruby//lib/sentry/transaction.rb#181 + def set_initial_sample_decision(sampling_context:); end + + # Sets a custom measurement on the transaction. + # + # @param name [String] name of the measurement + # @param value [Float] value of the measurement + # @param unit [String] unit of the measurement + # @return [void] + # + # source://sentry-ruby//lib/sentry/transaction.rb#174 + def set_measurement(name, value, unit = T.unsafe(nil)); end + + # Set the transaction name directly. + # Considered internal api since it bypasses the usual scope logic. + # + # @param name [String] + # @param source [Symbol] + # @return [void] + # + # source://sentry-ruby//lib/sentry/transaction.rb#285 + def set_name(name, source: T.unsafe(nil)); end + + # The source of the transaction name. + # + # @return [Symbol] + # + # source://sentry-ruby//lib/sentry/transaction.rb#26 + def source; end + + # These are high cardinality and thus bad + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/transaction.rb#306 + def source_low_quality?; end + + # Start the profiler. + # + # @return [void] + # + # source://sentry-ruby//lib/sentry/transaction.rb#300 + def start_profiler!; end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/transaction.rb#142 + def to_hash; end + + protected + + # source://sentry-ruby//lib/sentry/transaction.rb#312 + def init_span_recorder(limit = T.unsafe(nil)); end + + private + + # source://sentry-ruby//lib/sentry/transaction.rb#319 + def generate_transaction_description; end + + # source://sentry-ruby//lib/sentry/transaction.rb#326 + def populate_head_baggage; end + + class << self + # @deprecated Use Sentry::PropagationContext.extract_sentry_trace instead. + # @return [Array, nil] + # + # source://sentry-ruby//lib/sentry/transaction.rb#137 + def extract_sentry_trace(sentry_trace); end + + # Initalizes a Transaction instance with a Sentry trace string from another transaction (usually from an external request). + # + # The original transaction will become the parent of the new Transaction instance. And they will share the same `trace_id`. + # + # The child transaction will also store the parent's sampling decision in its `parent_sampled` attribute. + # + # @deprecated use Sentry.continue_trace instead. + # @param sentry_trace [String] the trace string from the previous transaction. + # @param baggage [String, nil] the incoming baggage header string. + # @param hub [Hub] the hub that'll be responsible for sending this transaction when it's finished. + # @param options [Hash] the options you want to use to initialize a Transaction instance. + # @return [Transaction, nil] + # + # source://sentry-ruby//lib/sentry/transaction.rb#104 + def from_sentry_trace(sentry_trace, baggage: T.unsafe(nil), hub: T.unsafe(nil), **options); end + end +end + +# source://sentry-ruby//lib/sentry/transaction.rb#13 +Sentry::Transaction::MESSAGE_PREFIX = T.let(T.unsafe(nil), String) + +# @deprecated Use Sentry::PropagationContext::SENTRY_TRACE_REGEXP instead. +# +# source://sentry-ruby//lib/sentry/transaction.rb#10 +Sentry::Transaction::SENTRY_TRACE_REGEXP = T.let(T.unsafe(nil), Regexp) + +# https://develop.sentry.dev/sdk/event-payloads/transaction/#transaction-annotations +# +# source://sentry-ruby//lib/sentry/transaction.rb#16 +Sentry::Transaction::SOURCES = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/transaction.rb#345 +class Sentry::Transaction::SpanRecorder + # @return [SpanRecorder] a new instance of SpanRecorder + # + # source://sentry-ruby//lib/sentry/transaction.rb#348 + def initialize(max_length); end + + # source://sentry-ruby//lib/sentry/transaction.rb#353 + def add(span); end + + # Returns the value of attribute max_length. + # + # source://sentry-ruby//lib/sentry/transaction.rb#346 + def max_length; end + + # Returns the value of attribute spans. + # + # source://sentry-ruby//lib/sentry/transaction.rb#346 + def spans; end +end + +# source://sentry-ruby//lib/sentry/transaction.rb#12 +Sentry::Transaction::UNLABELD_NAME = T.let(T.unsafe(nil), String) + +# TransactionEvent represents events that carry transaction data (type: "transaction"). +# +# source://sentry-ruby//lib/sentry/transaction_event.rb#5 +class Sentry::TransactionEvent < ::Sentry::Event + # @return [TransactionEvent] a new instance of TransactionEvent + # + # source://sentry-ruby//lib/sentry/transaction_event.rb#23 + def initialize(transaction:, **options); end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/transaction_event.rb#12 + def measurements; end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/transaction_event.rb#12 + def measurements=(_arg0); end + + # @return [Hash, nil] + # + # source://sentry-ruby//lib/sentry/transaction_event.rb#21 + def metrics_summary; end + + # @return [Hash, nil] + # + # source://sentry-ruby//lib/sentry/transaction_event.rb#21 + def metrics_summary=(_arg0); end + + # @return [Hash, nil] + # + # source://sentry-ruby//lib/sentry/transaction_event.rb#18 + def profile; end + + # @return [Hash, nil] + # + # source://sentry-ruby//lib/sentry/transaction_event.rb#18 + def profile=(_arg0); end + + # @return [] + # + # source://sentry-ruby//lib/sentry/transaction_event.rb#9 + def spans; end + + # @return [] + # + # source://sentry-ruby//lib/sentry/transaction_event.rb#9 + def spans=(_arg0); end + + # @return [Float, nil] + # + # source://sentry-ruby//lib/sentry/transaction_event.rb#15 + def start_timestamp; end + + # Sets the event's start_timestamp. + # + # @param time [Time, Float] + # @return [void] + # + # source://sentry-ruby//lib/sentry/transaction_event.rb#46 + def start_timestamp=(time); end + + # @return [Hash] + # + # source://sentry-ruby//lib/sentry/transaction_event.rb#51 + def to_hash; end + + private + + # source://sentry-ruby//lib/sentry/transaction_event.rb#62 + def populate_profile(transaction); end +end + +# source://sentry-ruby//lib/sentry/transaction_event.rb#6 +Sentry::TransactionEvent::TYPE = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/transport/configuration.rb#4 +class Sentry::Transport + include ::Sentry::LoggingHelper + + # @return [Transport] a new instance of Transport + # + # source://sentry-ruby//lib/sentry/transport.rb#32 + def initialize(configuration); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/transport.rb#113 + def any_rate_limited?; end + + # Returns the value of attribute discarded_events. + # + # source://sentry-ruby//lib/sentry/transport.rb#27 + def discarded_events; end + + # source://sentry-ruby//lib/sentry/transport.rb#117 + def envelope_from_event(event); end + + # source://sentry-ruby//lib/sentry/transport.rb#161 + def flush; end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/transport.rb#91 + def is_rate_limited?(data_category); end + + # Returns the value of attribute last_client_report_sent. + # + # source://sentry-ruby//lib/sentry/transport.rb#27 + def last_client_report_sent; end + + # @deprecated Use Sentry.logger to retrieve the current logger instead. + # + # source://sentry-ruby//lib/sentry/transport.rb#30 + def logger; end + + # Returns the value of attribute rate_limits. + # + # source://sentry-ruby//lib/sentry/transport.rb#27 + def rate_limits; end + + # source://sentry-ruby//lib/sentry/transport.rb#154 + def record_lost_event(reason, data_category); end + + # @raise [NotImplementedError] + # + # source://sentry-ruby//lib/sentry/transport.rb#45 + def send_data(data, options = T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/transport.rb#56 + def send_envelope(envelope); end + + # source://sentry-ruby//lib/sentry/transport.rb#49 + def send_event(event); end + + # source://sentry-ruby//lib/sentry/transport.rb#69 + def serialize_envelope(envelope); end + + private + + # source://sentry-ruby//lib/sentry/transport.rb#172 + def fetch_pending_client_report(force: T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/transport.rb#194 + def reject_rate_limited_items(envelope); end +end + +# source://sentry-ruby//lib/sentry/transport.rb#10 +Sentry::Transport::CLIENT_REPORT_INTERVAL = T.let(T.unsafe(nil), Integer) + +# https://develop.sentry.dev/sdk/client-reports/#envelope-item-payload +# +# source://sentry-ruby//lib/sentry/transport.rb#13 +Sentry::Transport::CLIENT_REPORT_REASONS = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/transport/configuration.rb#5 +class Sentry::Transport::Configuration + # @return [Configuration] a new instance of Configuration + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#81 + def initialize; end + + # The encoding to use to compress the request body. + # Default value is `Sentry::HTTPTransport::GZIP_ENCODING`. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#72 + def encoding; end + + # The encoding to use to compress the request body. + # Default value is `Sentry::HTTPTransport::GZIP_ENCODING`. + # + # @return [String] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#72 + def encoding=(_arg0); end + + # The timeout in seconds to read data from Sentry, in seconds. + # Default value is 1. + # + # @return [Integer] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#16 + def open_timeout; end + + # The timeout in seconds to read data from Sentry, in seconds. + # Default value is 1. + # + # @return [Integer] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#16 + def open_timeout=(_arg0); end + + # The proxy configuration to use to connect to Sentry. + # Accepts either a URI formatted string, URI, or a hash with the `uri`, + # `user`, and `password` keys. + # + # If you're using the default transport (`Sentry::HTTPTransport`), + # proxy settings will also automatically be read from tne environment + # variables (`HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY`). + # + # @example + # # setup proxy using a string: + # config.transport.proxy = "https://user:password@proxyhost:8080" + # + # # setup proxy using a URI: + # config.transport.proxy = URI("https://user:password@proxyhost:8080") + # + # # setup proxy using a hash: + # config.transport.proxy = { + # uri: URI("https://proxyhost:8080"), + # user: "user", + # password: "password" + # } + # @return [String, URI, Hash, nil] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#41 + def proxy; end + + # The proxy configuration to use to connect to Sentry. + # Accepts either a URI formatted string, URI, or a hash with the `uri`, + # `user`, and `password` keys. + # + # If you're using the default transport (`Sentry::HTTPTransport`), + # proxy settings will also automatically be read from tne environment + # variables (`HTTP_PROXY`, `HTTPS_PROXY`, `NO_PROXY`). + # + # @example + # # setup proxy using a string: + # config.transport.proxy = "https://user:password@proxyhost:8080" + # + # # setup proxy using a URI: + # config.transport.proxy = URI("https://user:password@proxyhost:8080") + # + # # setup proxy using a hash: + # config.transport.proxy = { + # uri: URI("https://proxyhost:8080"), + # user: "user", + # password: "password" + # } + # @return [String, URI, Hash, nil] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#41 + def proxy=(_arg0); end + + # The SSL configuration to use to connect to Sentry. + # You can either pass a `Hash` containing `ca_file` and `verification` keys, + # or you can set those options directly on the `Sentry::HTTPTransport::Configuration` object: + # + # @example + # config.transport.ssl = { + # ca_file: "/path/to/ca_file", + # verification: true + # end + # @return [Hash, nil] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#54 + def ssl; end + + # The SSL configuration to use to connect to Sentry. + # You can either pass a `Hash` containing `ca_file` and `verification` keys, + # or you can set those options directly on the `Sentry::HTTPTransport::Configuration` object: + # + # @example + # config.transport.ssl = { + # ca_file: "/path/to/ca_file", + # verification: true + # end + # @return [Hash, nil] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#54 + def ssl=(_arg0); end + + # The path to the CA file to use to verify the SSL connection. + # Default value is `nil`. + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#60 + def ssl_ca_file; end + + # The path to the CA file to use to verify the SSL connection. + # Default value is `nil`. + # + # @return [String, nil] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#60 + def ssl_ca_file=(_arg0); end + + # Whether to verify that the peer certificate is valid in SSL connections. + # Default value is `true`. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#66 + def ssl_verification; end + + # Whether to verify that the peer certificate is valid in SSL connections. + # Default value is `true`. + # + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#66 + def ssl_verification=(_arg0); end + + # The timeout in seconds to open a connection to Sentry, in seconds. + # Default value is 2. + # + # @return [Integer] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#10 + def timeout; end + + # The timeout in seconds to open a connection to Sentry, in seconds. + # Default value is 2. + # + # @return [Integer] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#10 + def timeout=(_arg0); end + + # The class to use as a transport to connect to Sentry. + # If this option not set, it will return `nil`, and Sentry will use + # `Sentry::HTTPTransport` by default. + # + # @return [Class, nil] + # + # source://sentry-ruby//lib/sentry/transport/configuration.rb#79 + def transport_class; end + + # source://sentry-ruby//lib/sentry/transport/configuration.rb#88 + def transport_class=(klass); end +end + +# source://sentry-ruby//lib/sentry/transport.rb#8 +Sentry::Transport::PROTOCOL_VERSION = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/transport.rb#9 +Sentry::Transport::USER_AGENT = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/utils/encoding_helper.rb#4 +module Sentry::Utils; end + +# source://sentry-ruby//lib/sentry/utils/encoding_helper.rb#5 +module Sentry::Utils::EncodingHelper + class << self + # source://sentry-ruby//lib/sentry/utils/encoding_helper.rb#6 + def encode_to_utf_8(value); end + + # @return [Boolean] + # + # source://sentry-ruby//lib/sentry/utils/encoding_helper.rb#15 + def valid_utf_8?(value); end + end +end + +# source://sentry-ruby//lib/sentry/utils/exception_cause_chain.rb#5 +module Sentry::Utils::ExceptionCauseChain + class << self + # source://sentry-ruby//lib/sentry/utils/exception_cause_chain.rb#6 + def exception_to_array(exception); end + end +end + +# source://sentry-ruby//lib/sentry/utils/real_ip.rb#11 +class Sentry::Utils::RealIp + # @return [RealIp] a new instance of RealIp + # + # source://sentry-ruby//lib/sentry/utils/real_ip.rb#23 + def initialize(remote_addr: T.unsafe(nil), client_ip: T.unsafe(nil), real_ip: T.unsafe(nil), forwarded_for: T.unsafe(nil), trusted_proxies: T.unsafe(nil)); end + + # source://sentry-ruby//lib/sentry/utils/real_ip.rb#43 + def calculate_ip; end + + # Returns the value of attribute ip. + # + # source://sentry-ruby//lib/sentry/utils/real_ip.rb#21 + def ip; end + + protected + + # source://sentry-ruby//lib/sentry/utils/real_ip.rb#79 + def filter_trusted_proxy_addresses(ips); end + + # source://sentry-ruby//lib/sentry/utils/real_ip.rb#64 + def ips_from(header); end +end + +# source://sentry-ruby//lib/sentry/utils/real_ip.rb#12 +Sentry::Utils::RealIp::LOCAL_ADDRESSES = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/utils/request_id.rb#5 +module Sentry::Utils::RequestId + class << self + # Request ID based on ActionDispatch::RequestId + # + # source://sentry-ruby//lib/sentry/utils/request_id.rb#9 + def read_from(env); end + end +end + +# source://sentry-ruby//lib/sentry/utils/request_id.rb#6 +Sentry::Utils::RequestId::REQUEST_ID_HEADERS = T.let(T.unsafe(nil), Array) + +# source://sentry-ruby//lib/sentry/version.rb#4 +Sentry::VERSION = T.let(T.unsafe(nil), String) + +# source://sentry-ruby//lib/sentry/core_ext/object/duplicable.rb#79 +class Symbol + include ::Comparable +end diff --git a/sorbet/rbi/gems/spoom@1.2.4.rbi b/sorbet/rbi/gems/spoom@1.3.0.rbi similarity index 72% rename from sorbet/rbi/gems/spoom@1.2.4.rbi rename to sorbet/rbi/gems/spoom@1.3.0.rbi index 19aeb7bf..4b293265 100644 --- a/sorbet/rbi/gems/spoom@1.2.4.rbi +++ b/sorbet/rbi/gems/spoom@1.3.0.rbi @@ -10,124 +10,78 @@ module Spoom; 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 +# 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/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 + # 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/config.rb#15 - def show; end -end - -# source://spoom//lib/spoom/cli/coverage.rb#9 -class Spoom::Cli::Coverage < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # source://spoom//lib/spoom/cli/coverage.rb#198 - def bundle_install(path, sha); 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#150 + 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,136 +99,221 @@ 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.1/lib/thor.rb#334 + def deadcode(*args); end + + # source://spoom//lib/spoom/cli.rb#75 + def lsp(*args); end + + # source://thor/1.3.1/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.1/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.1/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.1/lib/thor.rb#334 def lsp(*args); end - # source://thor/1.3.0/lib/thor.rb#334 + # source://thor/1.3.1/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 @@ -579,7 +618,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 +997,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -1298,7 +1337,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.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -1350,10 +1389,10 @@ class Spoom::Coverage::Template def html; end end -# source://spoom//lib/spoom/deadcode/erb.rb#27 +# source://spoom//lib/spoom/deadcode/visitor.rb#5 module Spoom::Deadcode class << self - # source://spoom//lib/spoom/deadcode.rb#51 + # source://spoom//lib/spoom/deadcode.rb#81 sig do params( index: ::Spoom::Deadcode::Index, @@ -1364,7 +1403,19 @@ module Spoom::Deadcode end def index_erb(index, erb, file:, plugins: T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode.rb#40 + # source://spoom//lib/spoom/deadcode.rb#67 + sig do + params( + index: ::Spoom::Deadcode::Index, + node: ::Prism::Node, + ruby: ::String, + file: ::String, + plugins: T::Array[::Spoom::Deadcode::Plugins::Base] + ).void + end + def index_node(index, node, ruby, file:, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode.rb#75 sig do params( index: ::Spoom::Deadcode::Index, @@ -1375,20 +1426,24 @@ module Spoom::Deadcode end def index_ruby(index, ruby, file:, plugins: T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode/plugins.rb#74 + # source://spoom//lib/spoom/deadcode/plugins.rb#75 sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) } def load_custom_plugins(context); end - # source://spoom//lib/spoom/deadcode/plugins.rb#60 + # source://spoom//lib/spoom/deadcode.rb#43 + sig { params(ruby: ::String, file: ::String).returns(::Prism::Node) } + def parse_ruby(ruby, file:); end + + # source://spoom//lib/spoom/deadcode/plugins.rb#61 sig { params(context: ::Spoom::Context).returns(T::Array[::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 @@ -1449,8 +1504,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.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -1512,13 +1573,9 @@ 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 +# source://spoom//lib/spoom/deadcode.rb#21 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 @@ -1569,7 +1626,7 @@ class Spoom::Deadcode::Index end # source://spoom//lib/spoom/deadcode/indexer.rb#6 -class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor +class Spoom::Deadcode::Indexer < ::Spoom::Deadcode::Visitor # source://spoom//lib/spoom/deadcode/indexer.rb#16 sig do params( @@ -1581,96 +1638,75 @@ class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor end def initialize(path, source, 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 - # Context # - # source://spoom//lib/spoom/deadcode/indexer.rb#367 - sig { returns(::SyntaxTree::Node) } + # source://spoom//lib/spoom/deadcode/indexer.rb#408 + sig { returns(::Prism::Node) } def current_node; end # Definition indexing # - # source://spoom//lib/spoom/deadcode/indexer.rb#281 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + # source://spoom//lib/spoom/deadcode/indexer.rb#322 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } def define_attr_reader(name, full_name, node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#293 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + # source://spoom//lib/spoom/deadcode/indexer.rb#334 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } def define_attr_writer(name, full_name, node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#305 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + # source://spoom//lib/spoom/deadcode/indexer.rb#346 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } def define_class(name, full_name, node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#317 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + # source://spoom//lib/spoom/deadcode/indexer.rb#358 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } def define_constant(name, full_name, node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#329 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + # source://spoom//lib/spoom/deadcode/indexer.rb#370 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } def define_method(name, full_name, node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#341 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } + # source://spoom//lib/spoom/deadcode/indexer.rb#382 + sig { params(name: ::String, full_name: ::String, node: ::Prism::Node).void } def define_module(name, full_name, node); end - # @return [String] - # - # source://spoom//lib/spoom/deadcode/indexer.rb#10 - def file_name; end - # source://spoom//lib/spoom/deadcode/indexer.rb#13 sig { returns(::Spoom::Deadcode::Index) } def index; end - # source://spoom//lib/spoom/deadcode/indexer.rb#426 + # source://spoom//lib/spoom/deadcode/indexer.rb#453 sig { returns(T.nilable(::String)) } def last_sig; end - # source://spoom//lib/spoom/deadcode/indexer.rb#386 - sig { returns(T.nilable(::SyntaxTree::BlockNode)) } + # source://spoom//lib/spoom/deadcode/indexer.rb#427 + sig { returns(T.nilable(::Prism::BlockNode)) } def nesting_block; 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/indexer.rb#396 - sig { returns(T.nilable(::String)) } - def nesting_block_call_name; end + # source://spoom//lib/spoom/deadcode/indexer.rb#432 + sig { returns(T.nilable(::Prism::CallNode)) } + def nesting_call; end - # source://spoom//lib/spoom/deadcode/indexer.rb#381 - sig { returns(T.nilable(::SyntaxTree::ClassDeclaration)) } + # source://spoom//lib/spoom/deadcode/indexer.rb#422 + sig { returns(T.nilable(::Prism::ClassNode)) } def nesting_class; end - # source://spoom//lib/spoom/deadcode/indexer.rb#410 + # source://spoom//lib/spoom/deadcode/indexer.rb#437 sig { returns(T.nilable(::String)) } def nesting_class_name; end - # source://spoom//lib/spoom/deadcode/indexer.rb#418 + # source://spoom//lib/spoom/deadcode/indexer.rb#445 sig { returns(T.nilable(::String)) } def nesting_class_superclass_name; end - # source://spoom//lib/spoom/deadcode/indexer.rb#372 + # source://spoom//lib/spoom/deadcode/indexer.rb#413 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/indexer.rb#445 - sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) } - def node_location(node); end - # 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/indexer.rb#464 + sig { params(node: ::Prism::Node).returns(::Spoom::Deadcode::Location) } + def node_location(node); end # source://spoom//lib/spoom/deadcode/indexer.rb#10 sig { returns(::String) } @@ -1678,107 +1714,119 @@ class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor # Reference indexing # - # source://spoom//lib/spoom/deadcode/indexer.rb#355 - sig { params(name: ::String, node: ::SyntaxTree::Node).void } + # source://spoom//lib/spoom/deadcode/indexer.rb#396 + sig { params(name: ::String, node: ::Prism::Node).void } def reference_constant(name, node); end - # source://spoom//lib/spoom/deadcode/indexer.rb#360 - sig { params(name: ::String, node: ::SyntaxTree::Node).void } + # source://spoom//lib/spoom/deadcode/indexer.rb#401 + sig { params(name: ::String, node: ::Prism::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 } + sig { override.params(node: T.nilable(::Prism::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 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end # source://spoom//lib/spoom/deadcode/indexer.rb#50 - sig { override.params(node: ::SyntaxTree::ARef).void } - def visit_aref(node); end + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(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#56 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(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#67 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(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#91 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(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#75 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(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#83 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(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#104 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(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#137 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(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#143 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end # source://spoom//lib/spoom/deadcode/indexer.rb#149 - sig { override.params(node: ::SyntaxTree::ConstPathField).void } - def visit_const_path_field(node); end + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(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#155 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(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#173 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(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#178 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(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#186 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(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#194 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#202 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#210 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); 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#218 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(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#224 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(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#254 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # source://spoom//lib/spoom/deadcode/indexer.rb#268 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end # source://spoom//lib/spoom/deadcode/indexer.rb#274 - sig { override.params(node: ::SyntaxTree::VCall).void } - def visit_vcall(node); end + sig { params(send: ::Spoom::Deadcode::Send).void } + def visit_send(send); end end -# source://spoom//lib/spoom/deadcode.rb#34 -class Spoom::Deadcode::IndexerError < ::Spoom::Deadcode::Error; end +# source://spoom//lib/spoom/deadcode.rb#29 +class Spoom::Deadcode::IndexerError < ::Spoom::Deadcode::Error + # source://spoom//lib/spoom/deadcode.rb#33 + sig { params(message: ::String, parent: ::Exception).void } + def initialize(message, parent:); end +end # source://spoom//lib/spoom/deadcode/location.rb#6 class Spoom::Deadcode::Location @@ -1832,25 +1880,25 @@ class Spoom::Deadcode::Location def to_s; end class << self + # source://spoom//lib/spoom/deadcode/location.rb#34 + sig { params(file: ::String, location: ::Prism::Location).returns(::Spoom::Deadcode::Location) } + def from_prism(file, location); end + # @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 +# source://spoom//lib/spoom/deadcode/plugins.rb#36 Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash) -# source://spoom//lib/spoom/deadcode.rb#33 +# source://spoom//lib/spoom/deadcode.rb#27 class Spoom::Deadcode::ParserError < ::Spoom::Deadcode::Error; end # source://spoom//lib/spoom/deadcode/plugins/base.rb#8 @@ -1863,6 +1911,13 @@ class Spoom::Deadcode::Plugins::ActionMailer < ::Spoom::Deadcode::Plugins::Base def on_send(indexer, send); end 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(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } + def on_define_method(indexer, definition); 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 @@ -1904,7 +1959,14 @@ Spoom::Deadcode::Plugins::ActiveRecord::CALLBACKS = T.let(T.unsafe(nil), Array) 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 +class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#22 + 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_support.rb#19 +Spoom::Deadcode::Plugins::ActiveSupport::SETUP_AND_TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # @@ -2048,7 +2110,7 @@ class Spoom::Deadcode::Plugins::Base # return unless send.name == "dsl_method" # return if send.args.empty? # - # method_name = indexer.node_string(send.args.first).delete_prefix(":") + # method_name = send.args.first.slice.delete_prefix(":") # indexer.reference_method(method_name, send.node) # end # end @@ -2291,8 +2353,8 @@ class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base private - # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#50 - sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send, node: ::SyntaxTree::Node).void } + # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#43 + sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send, node: ::Prism::Node).void } def reference_symbol_as_constant(indexer, send, node); end end @@ -2308,7 +2370,7 @@ class Spoom::Deadcode::Plugins::Sorbet < ::Spoom::Deadcode::Plugins::Base private - # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#40 + # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#34 sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } def sorbet_enum_constant?(indexer, definition); end @@ -2343,7 +2405,7 @@ class Spoom::Deadcode::Reference < ::T::Struct def method?; end class << self - # source://sorbet-runtime/0.5.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -2363,135 +2425,132 @@ 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 do + params( + kind: T.nilable(::Spoom::Deadcode::Definition::Kind), + location: ::Spoom::Deadcode::Location + ).returns(::String) + end 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#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#355 - sig { returns(T::Array[::SyntaxTree::Node]) } + # source://spoom//lib/spoom/deadcode/remover.rb#382 + sig { returns(T::Array[::Prism::Node]) } def nesting; end - # @return [Array] + # @return [Array] # - # 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]) } + # 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 + # 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) } + # 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]) } + # 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 +# source://spoom//lib/spoom/deadcode/remover.rb#549 +class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Deadcode::Visitor + # source://spoom//lib/spoom/deadcode/remover.rb#621 sig { params(location: ::Spoom::Deadcode::Location).void } def initialize(location); 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] - # - # 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#629 + 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 + 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,7 +2561,7 @@ class Spoom::Deadcode::Remover::NodeRemover sig do params( source: ::String, - kind: ::Spoom::Deadcode::Definition::Kind, + kind: T.nilable(::Spoom::Deadcode::Definition::Kind), location: ::Spoom::Deadcode::Location ).void end @@ -2518,67 +2577,62 @@ 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) - # source://spoom//lib/spoom/deadcode/send.rb#22 + # source://spoom//lib/spoom/deadcode/send.rb#21 sig do type_parameters(:T) .params( @@ -2588,16 +2642,615 @@ class Spoom::Deadcode::Send < ::T::Struct end 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 } + # source://spoom//lib/spoom/deadcode/send.rb#28 + 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.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end +# source://spoom//lib/spoom/deadcode/visitor.rb#6 +class Spoom::Deadcode::Visitor < ::Prism::Visitor + # source://spoom//lib/spoom/deadcode/visitor.rb#15 + sig { override.params(node: ::Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#20 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#25 + sig { override.params(node: ::Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#30 + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#35 + sig { override.params(node: ::Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#40 + sig { override.params(node: ::Prism::ArrayNode).void } + def visit_array_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#45 + sig { override.params(node: ::Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#50 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#55 + sig { override.params(node: ::Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#60 + sig { override.params(node: ::Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#65 + sig { override.params(node: ::Prism::BeginNode).void } + def visit_begin_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#70 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#75 + sig { override.params(node: ::Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#80 + sig { override.params(node: ::Prism::BlockNode).void } + def visit_block_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#85 + sig { override.params(node: ::Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#90 + sig { override.params(node: ::Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#95 + sig { override.params(node: ::Prism::BreakNode).void } + def visit_break_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#100 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#105 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#110 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#115 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#120 + sig { override.params(node: ::Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#125 + sig { override.params(node: ::Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#130 + sig { override.params(node: ::Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#135 + sig { override.params(node: ::Prism::CaseNode).void } + def visit_case_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#10 + sig { override.params(node: ::Prism::Node).void } + def visit_child_nodes(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#140 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#145 + sig { override.params(node: ::Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#150 + sig { override.params(node: ::Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#155 + sig { override.params(node: ::Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#160 + sig { override.params(node: ::Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#165 + sig { override.params(node: ::Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#170 + sig { override.params(node: ::Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#175 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#180 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#185 + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#190 + sig { override.params(node: ::Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#195 + sig { override.params(node: ::Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#200 + sig { override.params(node: ::Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#205 + sig { override.params(node: ::Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#210 + sig { override.params(node: ::Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#215 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#220 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#225 + sig { override.params(node: ::Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#230 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#235 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#240 + sig { override.params(node: ::Prism::DefinedNode).void } + def visit_defined_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#245 + sig { override.params(node: ::Prism::ElseNode).void } + def visit_else_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#250 + sig { override.params(node: ::Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#255 + sig { override.params(node: ::Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#260 + sig { override.params(node: ::Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#265 + sig { override.params(node: ::Prism::FalseNode).void } + def visit_false_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#270 + sig { override.params(node: ::Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#275 + sig { override.params(node: ::Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#280 + sig { override.params(node: ::Prism::FloatNode).void } + def visit_float_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#285 + sig { override.params(node: ::Prism::ForNode).void } + def visit_for_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#290 + sig { override.params(node: ::Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#295 + sig { override.params(node: ::Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#300 + sig { override.params(node: ::Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#305 + sig { override.params(node: ::Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#310 + sig { override.params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#315 + sig { override.params(node: ::Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#320 + sig { override.params(node: ::Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#325 + sig { override.params(node: ::Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#330 + sig { override.params(node: ::Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#335 + sig { override.params(node: ::Prism::HashNode).void } + def visit_hash_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#340 + sig { override.params(node: ::Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#345 + sig { override.params(node: ::Prism::IfNode).void } + def visit_if_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#350 + sig { override.params(node: ::Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#355 + sig { override.params(node: ::Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#360 + sig { override.params(node: ::Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#365 + sig { override.params(node: ::Prism::InNode).void } + def visit_in_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#370 + sig { override.params(node: ::Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#375 + sig { override.params(node: ::Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#380 + sig { override.params(node: ::Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#385 + sig { override.params(node: ::Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#390 + sig { override.params(node: ::Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#395 + sig { override.params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#400 + sig { override.params(node: ::Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#405 + sig { override.params(node: ::Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#410 + sig { override.params(node: ::Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#415 + sig { override.params(node: ::Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#420 + sig { override.params(node: ::Prism::IntegerNode).void } + def visit_integer_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#425 + sig { override.params(node: ::Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#430 + sig { override.params(node: ::Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#435 + sig { override.params(node: ::Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#440 + sig { override.params(node: ::Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#445 + sig { override.params(node: ::Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#450 + sig { override.params(node: ::Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#455 + sig { override.params(node: ::Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#460 + sig { override.params(node: ::Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#465 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#470 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#475 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#480 + sig { override.params(node: ::Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#485 + sig { override.params(node: ::Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#490 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#495 + sig { override.params(node: ::Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#500 + sig { override.params(node: ::Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#505 + sig { override.params(node: ::Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#510 + sig { override.params(node: ::Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#515 + sig { override.params(node: ::Prism::MissingNode).void } + def visit_missing_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#520 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#525 + sig { override.params(node: ::Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#530 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#535 + sig { override.params(node: ::Prism::NextNode).void } + def visit_next_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#540 + sig { override.params(node: ::Prism::NilNode).void } + def visit_nil_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#545 + sig { override.params(node: ::Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#550 + sig { override.params(node: ::Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#555 + sig { override.params(node: ::Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#560 + sig { override.params(node: ::Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#565 + sig { override.params(node: ::Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#570 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#575 + sig { override.params(node: ::Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#580 + sig { override.params(node: ::Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#585 + sig { override.params(node: ::Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#590 + sig { override.params(node: ::Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#595 + sig { override.params(node: ::Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#600 + sig { override.params(node: ::Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#605 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#610 + sig { override.params(node: ::Prism::RangeNode).void } + def visit_range_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#615 + sig { override.params(node: ::Prism::RationalNode).void } + def visit_rational_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#620 + sig { override.params(node: ::Prism::RedoNode).void } + def visit_redo_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#625 + sig { override.params(node: ::Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#630 + sig { override.params(node: ::Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#635 + sig { override.params(node: ::Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#640 + sig { override.params(node: ::Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#645 + sig { override.params(node: ::Prism::RescueNode).void } + def visit_rescue_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#650 + sig { override.params(node: ::Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#655 + sig { override.params(node: ::Prism::RetryNode).void } + def visit_retry_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#660 + sig { override.params(node: ::Prism::ReturnNode).void } + def visit_return_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#665 + sig { override.params(node: ::Prism::SelfNode).void } + def visit_self_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#670 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#675 + sig { override.params(node: ::Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#680 + sig { override.params(node: ::Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#685 + sig { override.params(node: ::Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#690 + sig { override.params(node: ::Prism::SplatNode).void } + def visit_splat_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#695 + sig { override.params(node: ::Prism::StatementsNode).void } + def visit_statements_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#700 + sig { override.params(node: ::Prism::StringNode).void } + def visit_string_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#705 + sig { override.params(node: ::Prism::SuperNode).void } + def visit_super_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#710 + sig { override.params(node: ::Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#715 + sig { override.params(node: ::Prism::TrueNode).void } + def visit_true_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#720 + sig { override.params(node: ::Prism::UndefNode).void } + def visit_undef_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#725 + sig { override.params(node: ::Prism::UnlessNode).void } + def visit_unless_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#730 + sig { override.params(node: ::Prism::UntilNode).void } + def visit_until_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#735 + sig { override.params(node: ::Prism::WhenNode).void } + def visit_when_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#740 + sig { override.params(node: ::Prism::WhileNode).void } + def visit_while_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#745 + sig { override.params(node: ::Prism::XStringNode).void } + def visit_x_string_node(node); end + + # source://spoom//lib/spoom/deadcode/visitor.rb#750 + sig { override.params(node: ::Prism::YieldNode).void } + def visit_yield_node(node); end +end + # source://spoom//lib/spoom.rb#12 class Spoom::Error < ::StandardError; end @@ -2613,7 +3266,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -2708,16 +3361,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 +3373,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 +3390,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 +3459,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.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -2830,9 +3473,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 +3485,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 +3500,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 +3530,10 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/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 +3627,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 +3642,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.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -3032,7 +3675,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.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -3090,7 +3733,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.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -3115,7 +3758,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.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -3178,7 +3821,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.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -3216,7 +3859,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.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -3282,7 +3925,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.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end diff --git a/sorbet/rbi/gems/stringio@3.0.8.rbi b/sorbet/rbi/gems/stringio@3.1.0.rbi similarity index 100% rename from sorbet/rbi/gems/stringio@3.0.8.rbi rename to sorbet/rbi/gems/stringio@3.1.0.rbi 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 0ecc1a41..00000000 --- a/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +++ /dev/null @@ -1,23136 +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_BLOCKISEQ = 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}, -# "", -# "", -# "", -# 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.13.3.rbi similarity index 96% rename from sorbet/rbi/gems/tapioca@0.12.0.rbi rename to sorbet/rbi/gems/tapioca@0.13.3.rbi index 7effc53f..6e60287b 100644 --- a/sorbet/rbi/gems/tapioca@0.12.0.rbi +++ b/sorbet/rbi/gems/tapioca@0.13.3.rbi @@ -54,7 +54,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.1.12/lib/rbi/model.rb#119 sig do params( loc: T.nilable(::RBI::Loc), @@ -64,19 +64,19 @@ 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.1.12/lib/rbi/model.rb#126 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi/0.1.9/lib/rbi/printer.rb#226 + # source://rbi/0.1.12/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.1.12/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.1.12/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 @@ -115,6 +115,19 @@ class RBI::Tree < ::RBI::NodeWithComments 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//lib/tapioca/rbi_ext/model.rb#113 + sig do + params( + name: ::String, + sigs: T::Array[::RBI::Sig], + parameters: T::Array[::RBI::Param], + class_method: T::Boolean, + visibility: ::RBI::Visibility, + comments: T::Array[::RBI::Comment] + ).void + end + def create_method_with_sigs(name, sigs:, parameters: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/rbi_ext/model.rb#60 sig { params(name: ::String).void } def create_mixes_in_class_methods(name); end @@ -127,6 +140,10 @@ class RBI::Tree < ::RBI::NodeWithComments 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//lib/tapioca/rbi_ext/model.rb#134 + sig { params(parameters: T::Hash[T.any(::String, ::Symbol), ::String], return_type: ::String).returns(::RBI::Sig) } + def create_sig(parameters:, return_type: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/rbi_ext/model.rb#74 sig do params( @@ -140,27 +157,27 @@ 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.1.12/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.1.12/lib/rbi/model.rb#132 sig { returns(T::Boolean) } def empty?; end - # source://rbi/0.1.9/lib/rbi/rewriters/filter_versions.rb#118 + # source://rbi/0.1.12/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.1.12/lib/rbi/rewriters/group_nodes.rb#38 sig { void } def group_nodes!; end - # source://rbi/0.1.9/lib/rbi/index.rb#68 + # source://rbi/0.1.12/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.1.12/lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -171,44 +188,44 @@ 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.1.12/lib/rbi/rewriters/nest_non_public_methods.rb#46 sig { void } def nest_non_public_methods!; end - # source://rbi/0.1.9/lib/rbi/rewriters/nest_singleton_methods.rb#36 + # source://rbi/0.1.12/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.1.12/lib/rbi/model.rb#110 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi/0.1.9/lib/rbi/printer.rb#233 + # source://rbi/0.1.12/lib/rbi/printer.rb#233 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi/0.1.9/lib/rbi/rewriters/sort_nodes.rb#119 + # source://rbi/0.1.12/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#149 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#144 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#159 class RBI::TypedParam < ::T::Struct const :param, ::RBI::Param const :type, ::String class << self - # source://sorbet-runtime/0.5.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -543,11 +560,11 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke 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#285 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#209 sig do params( constant_name: ::String, @@ -566,7 +583,7 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke 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#345 sig { returns(T::Array[::String]) } def constants_from_requested_paths; end @@ -574,7 +591,7 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke 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#248 sig { params(constant_name: ::String).returns(::Pathname) } def dsl_rbi_filename(constant_name); end @@ -582,7 +599,7 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke 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#340 sig { params(constant: ::String).returns(::String) } def generate_command_for(constant); end @@ -594,7 +611,7 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke sig { void } def load_application; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#226 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#227 sig { params(dir: ::Pathname).void } def perform_dsl_verification(dir); end @@ -602,31 +619,31 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke 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#236 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#335 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#316 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#294 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#189 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#323 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#253 sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } def verify_dsl_rbi(tmp_dir:); end end @@ -665,11 +682,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#223 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#284 sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } def build_error_for_files(cause, files); end @@ -677,19 +694,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#218 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#266 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#230 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#272 sig { returns(T::Hash[::String, ::String]) } def expected_rbis; end @@ -702,11 +719,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#235 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#279 sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } def gem_rbi_filename(gem_name, version); end @@ -714,27 +731,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#289 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#260 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#170 sig { void } def perform_additions; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#141 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#143 sig { void } def perform_removals; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#211 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#213 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#240 sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } def report_diff_and_exit_if_out_of_date(diff, command); end end @@ -863,7 +880,7 @@ class Tapioca::Commands::Command sig { void } def initialize; end - # source://thor/1.3.0/lib/thor/base.rb#155 + # source://thor/1.3.1/lib/thor/base.rb#155 sig { returns(::Thor::Actions) } def file_writer; end @@ -1125,7 +1142,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -1136,7 +1153,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11264/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -2227,15 +2244,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 +2280,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 +2291,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 @@ -2436,7 +2453,7 @@ class Tapioca::Loaders::Loader # @param engine [T.class_of(Rails::Engine)] # @return [Array] # - # source://sorbet-runtime/0.5.11264/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11361/lib/types/private/methods/_methods.rb#257 def eager_load_paths(*args, **_arg1, &blk); end # source://tapioca//lib/tapioca/loaders/loader.rb#198 @@ -3344,7 +3361,7 @@ module Tapioca::Static::SymbolLoader # @return [Array] # - # source://sorbet-runtime/0.5.11264/lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11361/lib/types/private/methods/_methods.rb#257 def engines(*args, **_arg1, &blk); end # source://tapioca//lib/tapioca/static/symbol_loader.rb#82 @@ -3467,14 +3484,14 @@ class URI::Source < ::URI::File sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://uri/0.13.0/lib/uri/generic.rb#243 + # source://uri/0.13.0/uri/generic.rb#243 def gem_name; end # source://tapioca//lib/tapioca/helpers/source_uri.rb#25 sig { returns(T.nilable(::String)) } def gem_version; end - # source://uri/0.13.0/lib/uri/generic.rb#283 + # source://uri/0.13.0/uri/generic.rb#283 def line_number; end # source://tapioca//lib/tapioca/helpers/source_uri.rb#51 diff --git a/sorbet/rbi/gems/thor@1.3.0.rbi b/sorbet/rbi/gems/thor@1.3.1.rbi similarity index 97% rename from sorbet/rbi/gems/thor@1.3.0.rbi rename to sorbet/rbi/gems/thor@1.3.1.rbi index f1a6cbe0..f1fb8512 100644 --- a/sorbet/rbi/gems/thor@1.3.0.rbi +++ b/sorbet/rbi/gems/thor@1.3.1.rbi @@ -662,7 +662,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 +680,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 +721,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 +737,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:: the relative path to the source root. + # destination:: the relative path to the destination root. + # config:: 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 +894,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 +914,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 +939,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 +962,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 +996,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 +1014,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 +1032,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 +1052,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 +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_file(path, config = T.unsafe(nil)); end # Executes a command returning the contents of the command. @@ -1105,7 +1114,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 +1138,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:: path of the file to be changed @@ -1142,7 +1150,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 +1165,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 +1195,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 +1549,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 +1572,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 +1585,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 @@ -3277,14 +3285,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] @@ -3446,15 +3455,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 @@ -3507,7 +3516,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] @@ -3563,7 +3572,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 @@ -3573,7 +3582,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 @@ -3592,7 +3601,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] @@ -3840,7 +3849,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 # @@ -3965,13 +3974,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