From 3cc6f9a2beddf73f58808ccc7bfc91e41e949ad9 Mon Sep 17 00:00:00 2001 From: Alexandre Terrasa Date: Tue, 30 Apr 2024 11:36:27 -0400 Subject: [PATCH] Regenerate RBI files for all gems Signed-off-by: Alexandre Terrasa --- ...console@0.7.1.rbi => io-console@0.7.2.rbi} | 0 .../gems/{json@2.7.1.rbi => json@2.7.2.rbi} | 144 +- sorbet/rbi/gems/minitest-reporters@1.6.1.rbi | 52 +- ...initest@5.22.2.rbi => minitest@5.22.3.rbi} | 37 +- ...{parser@3.3.0.5.rbi => parser@3.3.1.0.rbi} | 418 +- sorbet/rbi/gems/prism@0.19.0.rbi | 29883 ------------- sorbet/rbi/gems/prism@0.27.0.rbi | 36983 ++++++++++++++++ .../gems/{rake@13.1.0.rbi => rake@13.2.1.rbi} | 110 +- .../gems/{rbi@0.1.6.rbi => rbi@0.1.12.rbi} | 448 +- .../gems/{rdoc@6.6.2.rbi => rdoc@6.6.3.1.rbi} | 56 +- .../{reline@0.4.1.rbi => reline@0.5.0.rbi} | 0 ...-ast@1.31.2.rbi => rubocop-ast@1.31.3.rbi} | 24 +- ...bet@0.7.8.rbi => rubocop-sorbet@0.8.3.rbi} | 265 +- ...{rubocop@1.62.1.rbi => rubocop@1.63.4.rbi} | 820 +- ...{tapioca@0.13.0.rbi => tapioca@0.13.3.rbi} | 58 +- sorbet/rbi/gems/yard-sorbet@0.8.1.rbi | 2 +- 16 files changed, 38439 insertions(+), 30861 deletions(-) rename sorbet/rbi/gems/{io-console@0.7.1.rbi => io-console@0.7.2.rbi} (100%) rename sorbet/rbi/gems/{json@2.7.1.rbi => json@2.7.2.rbi} (94%) rename sorbet/rbi/gems/{minitest@5.22.2.rbi => minitest@5.22.3.rbi} (97%) rename sorbet/rbi/gems/{parser@3.3.0.5.rbi => parser@3.3.1.0.rbi} (93%) delete mode 100644 sorbet/rbi/gems/prism@0.19.0.rbi create mode 100644 sorbet/rbi/gems/prism@0.27.0.rbi rename sorbet/rbi/gems/{rake@13.1.0.rbi => rake@13.2.1.rbi} (97%) rename sorbet/rbi/gems/{rbi@0.1.6.rbi => rbi@0.1.12.rbi} (88%) rename sorbet/rbi/gems/{rdoc@6.6.2.rbi => rdoc@6.6.3.1.rbi} (99%) rename sorbet/rbi/gems/{reline@0.4.1.rbi => reline@0.5.0.rbi} (100%) rename sorbet/rbi/gems/{rubocop-ast@1.31.2.rbi => rubocop-ast@1.31.3.rbi} (99%) rename sorbet/rbi/gems/{rubocop-sorbet@0.7.8.rbi => rubocop-sorbet@0.8.3.rbi} (91%) rename sorbet/rbi/gems/{rubocop@1.62.1.rbi => rubocop@1.63.4.rbi} (98%) rename sorbet/rbi/gems/{tapioca@0.13.0.rbi => tapioca@0.13.3.rbi} (98%) diff --git a/sorbet/rbi/gems/io-console@0.7.1.rbi b/sorbet/rbi/gems/io-console@0.7.2.rbi similarity index 100% rename from sorbet/rbi/gems/io-console@0.7.1.rbi rename to sorbet/rbi/gems/io-console@0.7.2.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/minitest-reporters@1.6.1.rbi b/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi index 8579ff77..eb78a488 100644 --- a/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi +++ b/sorbet/rbi/gems/minitest-reporters@1.6.1.rbi @@ -7,82 +7,82 @@ # source://minitest-reporters//lib/minitest/reporters.rb#3 module Minitest class << self - # source://minitest/5.22.2/lib/minitest.rb#197 + # source://minitest/5.22.3/lib/minitest.rb#197 def __run(reporter, options); end - # source://minitest/5.22.2/lib/minitest.rb#97 + # source://minitest/5.22.3/lib/minitest.rb#97 def after_run(&block); end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def allow_fork; end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def allow_fork=(_arg0); end - # source://minitest/5.22.2/lib/minitest.rb#69 + # source://minitest/5.22.3/lib/minitest.rb#69 def autorun; end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def backtrace_filter; end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def backtrace_filter=(_arg0); end - # source://minitest/5.22.2/lib/minitest.rb#18 + # source://minitest/5.22.3/lib/minitest.rb#18 def cattr_accessor(name); end - # source://minitest/5.22.2/lib/minitest.rb#1146 + # source://minitest/5.22.3/lib/minitest.rb#1146 def clock_time; end - # source://minitest/5.22.2/lib/minitest.rb#177 + # source://minitest/5.22.3/lib/minitest.rb#177 def empty_run!(options); end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def extensions; end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def extensions=(_arg0); end - # source://minitest/5.22.2/lib/minitest.rb#292 + # source://minitest/5.22.3/lib/minitest.rb#292 def filter_backtrace(bt); end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def info_signal; end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def info_signal=(_arg0); end - # source://minitest/5.22.2/lib/minitest.rb#101 + # source://minitest/5.22.3/lib/minitest.rb#101 def init_plugins(options); end - # source://minitest/5.22.2/lib/minitest.rb#108 + # source://minitest/5.22.3/lib/minitest.rb#108 def load_plugins; end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def parallel_executor; end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def parallel_executor=(_arg0); end - # source://minitest/5.22.2/lib/minitest.rb#210 + # source://minitest/5.22.3/lib/minitest.rb#210 def process_args(args = T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def reporter; end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def reporter=(_arg0); end - # source://minitest/5.22.2/lib/minitest.rb#143 + # source://minitest/5.22.3/lib/minitest.rb#143 def run(args = T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest.rb#1137 + # source://minitest/5.22.3/lib/minitest.rb#1137 def run_one_method(klass, method_name); end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def seed; end - # source://minitest/5.22.2/lib/minitest.rb#19 + # source://minitest/5.22.3/lib/minitest.rb#19 def seed=(_arg0); end end end diff --git a/sorbet/rbi/gems/minitest@5.22.2.rbi b/sorbet/rbi/gems/minitest@5.22.3.rbi similarity index 97% rename from sorbet/rbi/gems/minitest@5.22.2.rbi rename to sorbet/rbi/gems/minitest@5.22.3.rbi index 1c0eeba4..b8bcbdc0 100644 --- a/sorbet/rbi/gems/minitest@5.22.2.rbi +++ b/sorbet/rbi/gems/minitest@5.22.3.rbi @@ -1445,27 +1445,27 @@ class Minitest::Test < ::Minitest::Runnable # LifecycleHooks # - # source://minitest//lib/minitest/test.rb#190 + # source://minitest//lib/minitest/test.rb#191 def capture_exceptions; end # source://minitest//lib/minitest/test.rb#15 def class_name; end - # source://minitest//lib/minitest/test.rb#207 + # source://minitest//lib/minitest/test.rb#208 def neuter_exception(e); end - # source://minitest//lib/minitest/test.rb#218 + # source://minitest//lib/minitest/test.rb#219 def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end # Runs a single test with setup/teardown hooks. # - # source://minitest//lib/minitest/test.rb#86 + # source://minitest//lib/minitest/test.rb#87 def run; end - # source://minitest//lib/minitest/test.rb#200 + # source://minitest//lib/minitest/test.rb#201 def sanitize_exception(e); end - # source://minitest//lib/minitest/test.rb#232 + # source://minitest//lib/minitest/test.rb#233 def with_info_handler(&block); end class << self @@ -1496,18 +1496,19 @@ class Minitest::Test < ::Minitest::Runnable # source://minitest//lib/minitest/test.rb#48 def make_my_diffs_pretty!; end - # Call this at the top of your tests when you want to run your - # tests in parallel. In doing so, you're admitting that you rule - # and your tests are awesome. + # Call this at the top of your tests (inside the +Minitest::Test+ + # subclass or +describe+ block) when you want to run your tests in + # parallel. In doing so, you're admitting that you rule and your + # tests are awesome. # - # source://minitest//lib/minitest/test.rb#59 + # source://minitest//lib/minitest/test.rb#60 def parallelize_me!; end # Returns all instance methods starting with "test_". Based on # #test_order, the methods are either sorted, randomized # (default), or run in parallel. # - # source://minitest//lib/minitest/test.rb#69 + # source://minitest//lib/minitest/test.rb#70 def runnable_methods; end end end @@ -1516,7 +1517,7 @@ end # meant for library writers, NOT for regular test authors. See # #before_setup for an example. # -# source://minitest//lib/minitest/test.rb#113 +# source://minitest//lib/minitest/test.rb#114 module Minitest::Test::LifecycleHooks # Runs before every test, after setup. This hook is meant for # libraries to extend minitest. It is not meant to be used by @@ -1524,7 +1525,7 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#163 + # source://minitest//lib/minitest/test.rb#164 def after_setup; end # Runs after every test, after teardown. This hook is meant for @@ -1533,7 +1534,7 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#187 + # source://minitest//lib/minitest/test.rb#188 def after_teardown; end # Runs before every test, before setup. This hook is meant for @@ -1568,7 +1569,7 @@ module Minitest::Test::LifecycleHooks # include MyMinitestPlugin # end # - # source://minitest//lib/minitest/test.rb#148 + # source://minitest//lib/minitest/test.rb#149 def before_setup; end # Runs after every test, before teardown. This hook is meant for @@ -1577,19 +1578,19 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#172 + # source://minitest//lib/minitest/test.rb#173 def before_teardown; end # Runs before every test. Use this to set up before each test # run. # - # source://minitest//lib/minitest/test.rb#154 + # source://minitest//lib/minitest/test.rb#155 def setup; end # Runs after every test. Use this to clean up after each test # run. # - # source://minitest//lib/minitest/test.rb#178 + # source://minitest//lib/minitest/test.rb#179 def teardown; end end 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/prism@0.19.0.rbi b/sorbet/rbi/gems/prism@0.19.0.rbi deleted file mode 100644 index 901807f8..00000000 --- a/sorbet/rbi/gems/prism@0.19.0.rbi +++ /dev/null @@ -1,29883 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `prism` gem. -# Please instead update this file by running `bin/tapioca gem prism`. - -# =begin -# This file is generated by the templates/template.rb script and should not be -# modified manually. See templates/rbi/prism.rbi.erb -# if you are looking to modify the template -# =end - -# The Prism Ruby parser. -# -# "Parsing Ruby is suddenly manageable!" -# - You, hopefully -# -# source://prism//lib/prism.rb#8 -module Prism - class << self - # Mirror the Prism.dump API by using the serialization API. - def dump(*_arg0); end - - # Mirror the Prism.dump_file API by using the serialization API. - def dump_file(*_arg0); end - - # Mirror the Prism.lex API by using the serialization API. - def lex(*_arg0); end - - # :call-seq: - # Prism::lex_compat(source, **options) -> ParseResult - # - # Returns a parse result whose value is an array of tokens that closely - # resembles the return value of Ripper::lex. The main difference is that the - # `:on_sp` token is not emitted. - # - # For supported options, see Prism::parse. - # - # source://prism//lib/prism.rb#46 - def lex_compat(source, **options); end - - # Mirror the Prism.lex_file API by using the serialization API. - def lex_file(*_arg0); end - - # :call-seq: - # Prism::lex_ripper(source) -> Array - # - # This lexes with the Ripper lex. It drops any space events but otherwise - # returns the same tokens. Raises SyntaxError if the syntax in source is - # invalid. - # - # source://prism//lib/prism.rb#56 - def lex_ripper(source); end - - # :call-seq: - # Prism::load(source, serialized) -> ParseResult - # - # Load the serialized AST using the source as a reference into a tree. - # - # source://prism//lib/prism.rb#64 - def load(source, serialized); end - - # Mirror the Prism.parse API by using the serialization API. - def parse(*_arg0); end - - # Mirror the Prism.parse_comments API by using the serialization API. - def parse_comments(*_arg0); end - - # :call-seq: - # Prism::parse_failure?(source, **options) -> bool - # - # Returns true if the source parses with errors. - # - # @return [Boolean] - # - # source://prism//lib/prism.rb#72 - def parse_failure?(source, **options); end - - # Mirror the Prism.parse_file API by using the serialization API. This uses - # native strings instead of Ruby strings because it allows us to use mmap when - # it is available. - def parse_file(*_arg0); end - - # Mirror the Prism.parse_file_comments API by using the serialization - # API. This uses native strings instead of Ruby strings because it allows us - # to use mmap when it is available. - def parse_file_comments(*_arg0); end - - # :call-seq: - # Prism::parse_file_failure?(filepath, **options) -> bool - # - # Returns true if the file at filepath parses with errors. - # - # @return [Boolean] - # - # source://prism//lib/prism.rb#80 - def parse_file_failure?(filepath, **options); end - - # Mirror the Prism.parse_file_success? API by using the serialization API. - # - # @return [Boolean] - def parse_file_success?(*_arg0); end - - # Mirror the Prism.parse_lex API by using the serialization API. - def parse_lex(*_arg0); end - - # Mirror the Prism.parse_lex_file API by using the serialization API. - def parse_lex_file(*_arg0); end - - # Mirror the Prism.parse_success? API by using the serialization API. - # - # @return [Boolean] - def parse_success?(*_arg0); end - end -end - -# Represents the use of the `alias` keyword to alias a global variable. -# -# alias $foo $bar -# ^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#52 -class Prism::AliasGlobalVariableNode < ::Prism::Node - # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void - # - # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode - # - # source://prism//lib/prism/node.rb#63 - sig do - params( - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(new_name, old_name, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#71 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#76 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#86 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#81 - def compact_child_nodes; end - - # def copy: (**params) -> AliasGlobalVariableNode - # - # source://prism//lib/prism/node.rb#91 - sig { params(params: T.untyped).returns(Prism::AliasGlobalVariableNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#76 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#104 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#114 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#109 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#60 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader new_name: Node - # - # source://prism//lib/prism/node.rb#54 - sig { returns(Prism::Node) } - def new_name; end - - # attr_reader old_name: Node - # - # source://prism//lib/prism/node.rb#57 - sig { returns(Prism::Node) } - def old_name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#138 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#148 - def type; end - end -end - -# Represents the use of the `alias` keyword to alias a method. -# -# alias foo bar -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#157 -class Prism::AliasMethodNode < ::Prism::Node - # def initialize: (new_name: Node, old_name: Node, keyword_loc: Location, location: Location) -> void - # - # @return [AliasMethodNode] a new instance of AliasMethodNode - # - # source://prism//lib/prism/node.rb#168 - sig do - params( - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(new_name, old_name, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#176 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#181 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#191 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#186 - def compact_child_nodes; end - - # def copy: (**params) -> AliasMethodNode - # - # source://prism//lib/prism/node.rb#196 - sig { params(params: T.untyped).returns(Prism::AliasMethodNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#181 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#209 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#219 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#214 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#165 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader new_name: Node - # - # source://prism//lib/prism/node.rb#159 - sig { returns(Prism::Node) } - def new_name; end - - # attr_reader old_name: Node - # - # source://prism//lib/prism/node.rb#162 - sig { returns(Prism::Node) } - def old_name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#243 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#253 - def type; end - end -end - -# Represents an alternation pattern in pattern matching. -# -# foo => bar | baz -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#262 -class Prism::AlternationPatternNode < ::Prism::Node - # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void - # - # @return [AlternationPatternNode] a new instance of AlternationPatternNode - # - # source://prism//lib/prism/node.rb#273 - sig { params(left: Prism::Node, right: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).void } - def initialize(left, right, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#281 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#286 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#296 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#291 - def compact_child_nodes; end - - # def copy: (**params) -> AlternationPatternNode - # - # source://prism//lib/prism/node.rb#301 - sig { params(params: T.untyped).returns(Prism::AlternationPatternNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#286 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#314 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#324 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node - # - # source://prism//lib/prism/node.rb#264 - sig { returns(Prism::Node) } - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#319 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#270 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader right: Node - # - # source://prism//lib/prism/node.rb#267 - sig { returns(Prism::Node) } - def right; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#348 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#358 - def type; end - end -end - -# Represents the use of the `&&` operator or the `and` keyword. -# -# left and right -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#367 -class Prism::AndNode < ::Prism::Node - # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void - # - # @return [AndNode] a new instance of AndNode - # - # source://prism//lib/prism/node.rb#378 - sig { params(left: Prism::Node, right: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).void } - def initialize(left, right, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#386 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#391 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#401 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#396 - def compact_child_nodes; end - - # def copy: (**params) -> AndNode - # - # source://prism//lib/prism/node.rb#406 - sig { params(params: T.untyped).returns(Prism::AndNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#391 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#419 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#429 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node - # - # source://prism//lib/prism/node.rb#369 - sig { returns(Prism::Node) } - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#424 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#375 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader right: Node - # - # source://prism//lib/prism/node.rb#372 - sig { returns(Prism::Node) } - def right; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#453 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#463 - def type; end - end -end - -# Represents a set of arguments to a method or a keyword. -# -# return foo, bar, baz -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#472 -class Prism::ArgumentsNode < ::Prism::Node - # def initialize: (flags: Integer, arguments: Array[Node], location: Location) -> void - # - # @return [ArgumentsNode] a new instance of ArgumentsNode - # - # source://prism//lib/prism/node.rb#480 - sig { params(flags: Integer, arguments: T::Array[Prism::Node], location: Prism::Location).void } - def initialize(flags, arguments, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#487 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: Array[Node] - # - # source://prism//lib/prism/node.rb#477 - sig { returns(T::Array[Prism::Node]) } - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#492 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#502 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#497 - def compact_child_nodes; end - - # def contains_keyword_splat?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#524 - sig { returns(T::Boolean) } - def contains_keyword_splat?; end - - # def copy: (**params) -> ArgumentsNode - # - # source://prism//lib/prism/node.rb#507 - sig { params(params: T.untyped).returns(Prism::ArgumentsNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#492 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#519 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#529 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#551 - def type; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#474 - 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#561 - def type; end - end -end - -# Flags for arguments nodes. -# -# source://prism//lib/prism/node.rb#17277 -module Prism::ArgumentsNodeFlags; end - -# if arguments contain keyword splat -# -# source://prism//lib/prism/node.rb#17279 -Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) - -# Represents an array literal. This can be a regular array using brackets or -# a special array using % like %w or %i. -# -# [1, 2, 3] -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#571 -class Prism::ArrayNode < ::Prism::Node - # def initialize: (flags: Integer, elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void - # - # @return [ArrayNode] a new instance of ArrayNode - # - # source://prism//lib/prism/node.rb#585 - 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 - ).void - end - def initialize(flags, elements, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#594 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#599 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#643 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#582 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#609 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#604 - def compact_child_nodes; end - - # def contains_splat?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#633 - sig { returns(T::Boolean) } - def contains_splat?; end - - # def copy: (**params) -> ArrayNode - # - # source://prism//lib/prism/node.rb#614 - sig { params(params: T.untyped).returns(Prism::ArrayNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#599 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#628 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader elements: Array[Node] - # - # source://prism//lib/prism/node.rb#576 - sig { returns(T::Array[Prism::Node]) } - def elements; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#648 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#638 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#579 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#672 - def type; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#573 - 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#682 - def type; end - end -end - -# Flags for array nodes. -# -# source://prism//lib/prism/node.rb#17283 -module Prism::ArrayNodeFlags; end - -# if array contains splat nodes -# -# source://prism//lib/prism/node.rb#17285 -Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) - -# Represents an array pattern in pattern matching. -# -# foo in 1, 2 -# ^^^^^^^^^^^ -# -# foo in [1, 2] -# ^^^^^^^^^^^^^ -# -# foo in *1 -# ^^^^^^^^^ -# -# foo in Bar[] -# ^^^^^^^^^^^^ -# -# foo in Bar[1, 2, 3] -# ^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#703 -class Prism::ArrayPatternNode < ::Prism::Node - # def initialize: (constant: Node?, requireds: Array[Node], rest: Node?, posts: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void - # - # @return [ArrayPatternNode] a new instance of ArrayPatternNode - # - # source://prism//lib/prism/node.rb#723 - 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 - ).void - end - def initialize(constant, requireds, rest, posts, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#734 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#739 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#785 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#720 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#754 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#744 - def compact_child_nodes; end - - # attr_reader constant: Node? - # - # source://prism//lib/prism/node.rb#705 - sig { returns(T.nilable(Prism::Node)) } - def constant; end - - # def copy: (**params) -> ArrayPatternNode - # - # source://prism//lib/prism/node.rb#759 - sig { params(params: T.untyped).returns(Prism::ArrayPatternNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#739 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#775 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#790 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#780 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#717 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader posts: Array[Node] - # - # source://prism//lib/prism/node.rb#714 - sig { returns(T::Array[Prism::Node]) } - def posts; end - - # attr_reader requireds: Array[Node] - # - # source://prism//lib/prism/node.rb#708 - sig { returns(T::Array[Prism::Node]) } - def requireds; end - - # attr_reader rest: Node? - # - # source://prism//lib/prism/node.rb#711 - sig { returns(T.nilable(Prism::Node)) } - def rest; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#825 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#835 - def type; end - end -end - -# Represents a hash key/value pair. -# -# { a => b } -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#844 -class Prism::AssocNode < ::Prism::Node - # def initialize: (key: Node, value: Node?, operator_loc: Location?, location: Location) -> void - # - # @return [AssocNode] a new instance of AssocNode - # - # source://prism//lib/prism/node.rb#855 - sig do - params( - key: Prism::Node, - value: T.nilable(Prism::Node), - operator_loc: T.nilable(Prism::Location), - location: Prism::Location - ).void - end - def initialize(key, value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#863 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#868 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#881 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#873 - def compact_child_nodes; end - - # def copy: (**params) -> AssocNode - # - # source://prism//lib/prism/node.rb#886 - sig { params(params: T.untyped).returns(Prism::AssocNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#868 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#899 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#909 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader key: Node - # - # source://prism//lib/prism/node.rb#846 - sig { returns(Prism::Node) } - def key; end - - # def operator: () -> String? - # - # source://prism//lib/prism/node.rb#904 - sig { returns(T.nilable(String)) } - def operator; end - - # attr_reader operator_loc: Location? - # - # source://prism//lib/prism/node.rb#852 - sig { returns(T.nilable(Prism::Location)) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#937 - def type; end - - # attr_reader value: Node? - # - # source://prism//lib/prism/node.rb#849 - sig { returns(T.nilable(Prism::Node)) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#947 - def type; end - end -end - -# Represents a splat in a hash literal. -# -# { **foo } -# ^^^^^ -# -# source://prism//lib/prism/node.rb#956 -class Prism::AssocSplatNode < ::Prism::Node - # def initialize: (value: Node?, operator_loc: Location, location: Location) -> void - # - # @return [AssocSplatNode] a new instance of AssocSplatNode - # - # source://prism//lib/prism/node.rb#964 - sig { params(value: T.nilable(Prism::Node), operator_loc: Prism::Location, location: Prism::Location).void } - def initialize(value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#971 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#976 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#988 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#981 - def compact_child_nodes; end - - # def copy: (**params) -> AssocSplatNode - # - # source://prism//lib/prism/node.rb#993 - sig { params(params: T.untyped).returns(Prism::AssocSplatNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#976 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#1005 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#1015 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#1010 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#961 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1041 - def type; end - - # attr_reader value: Node? - # - # source://prism//lib/prism/node.rb#958 - sig { returns(T.nilable(Prism::Node)) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1051 - def type; end - end -end - -Prism::BACKEND = T.let(T.unsafe(nil), Symbol) - -# Represents reading a reference to a field in the previous match. -# -# $' -# ^^ -# -# source://prism//lib/prism/node.rb#1060 -class Prism::BackReferenceReadNode < ::Prism::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode - # - # source://prism//lib/prism/node.rb#1065 - sig { params(name: Symbol, location: Prism::Location).void } - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#1071 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1076 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1086 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1081 - def compact_child_nodes; end - - # def copy: (**params) -> BackReferenceReadNode - # - # source://prism//lib/prism/node.rb#1091 - sig { params(params: T.untyped).returns(Prism::BackReferenceReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1076 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#1102 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#1107 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#1062 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1127 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1137 - def type; end - end -end - -# A class that knows how to walk down the tree. None of the individual visit -# methods are implemented on this visitor, so it forces the consumer to -# implement each one that they need. For a default implementation that -# continues walking the tree, see the Visitor class. -# -# source://prism//lib/prism/visitor.rb#13 -class Prism::BasicVisitor - # Calls `accept` on the given node if it is not `nil`, which in turn should - # call back into this visitor by calling the appropriate `visit_*` method. - # - # source://prism//lib/prism/visitor.rb#16 - sig { params(node: T.nilable(Prism::Node)).void } - def visit(node); end - - # Visits each node in `nodes` by calling `accept` on each one. - # - # source://prism//lib/prism/visitor.rb#21 - sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } - def visit_all(nodes); end - - # Visits the child nodes of `node` by calling `accept` on each one. - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::Node).void } - def visit_child_nodes(node); end -end - -# Represents a begin statement. -# -# begin -# foo -# end -# ^^^^^ -# -# source://prism//lib/prism/node.rb#1148 -class Prism::BeginNode < ::Prism::Node - # def initialize: (begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location) -> void - # - # @return [BeginNode] a new instance of BeginNode - # - # source://prism//lib/prism/node.rb#1168 - 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 - ).void - end - def initialize(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#1179 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def begin_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#1229 - sig { returns(T.nilable(String)) } - def begin_keyword; end - - # attr_reader begin_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#1150 - sig { returns(T.nilable(Prism::Location)) } - def begin_keyword_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1188 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1203 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1193 - def compact_child_nodes; end - - # def copy: (**params) -> BeginNode - # - # source://prism//lib/prism/node.rb#1208 - sig { params(params: T.untyped).returns(Prism::BeginNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1188 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#1224 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader else_clause: ElseNode? - # - # source://prism//lib/prism/node.rb#1159 - sig { returns(T.nilable(Prism::ElseNode)) } - def else_clause; end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#1234 - sig { returns(T.nilable(String)) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#1165 - sig { returns(T.nilable(Prism::Location)) } - def end_keyword_loc; end - - # attr_reader ensure_clause: EnsureNode? - # - # source://prism//lib/prism/node.rb#1162 - sig { returns(T.nilable(Prism::EnsureNode)) } - def ensure_clause; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#1239 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader rescue_clause: RescueNode? - # - # source://prism//lib/prism/node.rb#1156 - sig { returns(T.nilable(Prism::RescueNode)) } - def rescue_clause; end - - # source://prism//lib/prism/node.rb#1183 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#1153 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1284 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1294 - def type; end - end -end - -# Represents block method arguments. -# -# bar(&args) -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#1303 -class Prism::BlockArgumentNode < ::Prism::Node - # def initialize: (expression: Node?, operator_loc: Location, location: Location) -> void - # - # @return [BlockArgumentNode] a new instance of BlockArgumentNode - # - # source://prism//lib/prism/node.rb#1311 - sig { params(expression: T.nilable(Prism::Node), operator_loc: Prism::Location, location: Prism::Location).void } - def initialize(expression, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#1318 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1323 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1335 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1328 - def compact_child_nodes; end - - # def copy: (**params) -> BlockArgumentNode - # - # source://prism//lib/prism/node.rb#1340 - sig { params(params: T.untyped).returns(Prism::BlockArgumentNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1323 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#1352 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader expression: Node? - # - # source://prism//lib/prism/node.rb#1305 - sig { returns(T.nilable(Prism::Node)) } - def expression; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#1362 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#1357 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#1308 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1388 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1398 - def type; end - end -end - -# Represents a block local variable. -# -# a { |; b| } -# ^ -# -# source://prism//lib/prism/node.rb#1407 -class Prism::BlockLocalVariableNode < ::Prism::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode - # - # source://prism//lib/prism/node.rb#1412 - sig { params(name: Symbol, location: Prism::Location).void } - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#1418 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1423 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1433 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1428 - def compact_child_nodes; end - - # def copy: (**params) -> BlockLocalVariableNode - # - # source://prism//lib/prism/node.rb#1438 - sig { params(params: T.untyped).returns(Prism::BlockLocalVariableNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1423 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#1449 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#1454 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#1409 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1474 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1484 - def type; end - end -end - -# Represents a block of ruby code. -# -# [1, 2, 3].each { |i| puts x } -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#1493 -class Prism::BlockNode < ::Prism::Node - # def initialize: (locals: Array[Symbol], locals_body_index: Integer, parameters: Node?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void - # - # @return [BlockNode] a new instance of BlockNode - # - # source://prism//lib/prism/node.rb#1513 - sig do - params( - locals: T::Array[Symbol], - locals_body_index: Integer, - 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(locals, locals_body_index, parameters, body, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#1524 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#1504 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1529 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#1573 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#1510 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1542 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1534 - def compact_child_nodes; end - - # def copy: (**params) -> BlockNode - # - # source://prism//lib/prism/node.rb#1547 - sig { params(params: T.untyped).returns(Prism::BlockNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1529 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#1563 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#1578 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#1495 - sig { returns(T::Array[Symbol]) } - def locals; end - - # attr_reader locals_body_index: Integer - # - # source://prism//lib/prism/node.rb#1498 - sig { returns(Integer) } - def locals_body_index; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#1568 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#1507 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader parameters: Node? - # - # source://prism//lib/prism/node.rb#1501 - sig { returns(T.nilable(Prism::Node)) } - def parameters; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1613 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1623 - def type; end - end -end - -# Represents a block parameter to a method, block, or lambda definition. -# -# def a(&b) -# ^^ -# end -# -# source://prism//lib/prism/node.rb#1633 -class Prism::BlockParameterNode < ::Prism::Node - # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void - # - # @return [BlockParameterNode] a new instance of BlockParameterNode - # - # source://prism//lib/prism/node.rb#1644 - sig do - params( - name: T.nilable(Symbol), - name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#1652 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1657 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1667 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1662 - def compact_child_nodes; end - - # def copy: (**params) -> BlockParameterNode - # - # source://prism//lib/prism/node.rb#1672 - sig { params(params: T.untyped).returns(Prism::BlockParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1657 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#1685 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#1695 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol? - # - # source://prism//lib/prism/node.rb#1635 - sig { returns(T.nilable(Symbol)) } - def name; end - - # attr_reader name_loc: Location? - # - # source://prism//lib/prism/node.rb#1638 - sig { returns(T.nilable(Prism::Location)) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#1690 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#1641 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1721 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1731 - def type; end - end -end - -# Represents a block's parameters declaration. -# -# -> (a, b = 1; local) { } -# ^^^^^^^^^^^^^^^^^ -# -# foo do |a, b = 1; local| -# ^^^^^^^^^^^^^^^^^ -# end -# -# source://prism//lib/prism/node.rb#1744 -class Prism::BlockParametersNode < ::Prism::Node - # def initialize: (parameters: ParametersNode?, locals: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void - # - # @return [BlockParametersNode] a new instance of BlockParametersNode - # - # source://prism//lib/prism/node.rb#1758 - sig do - params( - parameters: T.nilable(Prism::ParametersNode), - locals: T::Array[Prism::Node], - opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location - ).void - end - def initialize(parameters, locals, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#1767 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1772 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#1814 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#1755 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1785 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1777 - def compact_child_nodes; end - - # def copy: (**params) -> BlockParametersNode - # - # source://prism//lib/prism/node.rb#1790 - sig { params(params: T.untyped).returns(Prism::BlockParametersNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1772 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#1804 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#1819 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Node] - # - # source://prism//lib/prism/node.rb#1749 - sig { returns(T::Array[Prism::Node]) } - def locals; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#1809 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#1752 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader parameters: ParametersNode? - # - # source://prism//lib/prism/node.rb#1746 - sig { returns(T.nilable(Prism::ParametersNode)) } - def parameters; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1847 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1857 - def type; end - end -end - -# Represents the use of the `break` keyword. -# -# break foo -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#1866 -class Prism::BreakNode < ::Prism::Node - # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void - # - # @return [BreakNode] a new instance of BreakNode - # - # source://prism//lib/prism/node.rb#1874 - sig do - params( - arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(arguments, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#1881 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#1868 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1886 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#1898 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#1891 - def compact_child_nodes; end - - # def copy: (**params) -> BreakNode - # - # source://prism//lib/prism/node.rb#1903 - sig { params(params: T.untyped).returns(Prism::BreakNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#1886 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#1915 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#1925 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#1920 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#1871 - sig { returns(Prism::Location) } - def keyword_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1951 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1961 - def type; end - end -end - -# Represents the use of the `&&=` operator on a call. -# -# foo.bar &&= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#1970 -class Prism::CallAndWriteNode < ::Prism::Node - # def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [CallAndWriteNode] a new instance of CallAndWriteNode - # - # source://prism//lib/prism/node.rb#1996 - 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 - ).void - end - def initialize(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#2009 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2065 - sig { returns(T::Boolean) } - def attribute_write?; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#2070 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#1978 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2014 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2027 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2019 - def compact_child_nodes; end - - # def copy: (**params) -> CallAndWriteNode - # - # source://prism//lib/prism/node.rb#2032 - sig { params(params: T.untyped).returns(Prism::CallAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2014 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#2050 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#2085 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String? - # - # source://prism//lib/prism/node.rb#2075 - sig { returns(T.nilable(String)) } - def message; end - - # attr_reader message_loc: Location? - # - # source://prism//lib/prism/node.rb#1981 - sig { returns(T.nilable(Prism::Location)) } - def message_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#2080 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#1990 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader read_name: Symbol - # - # source://prism//lib/prism/node.rb#1984 - sig { returns(Symbol) } - def read_name; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#1975 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2055 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2119 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#1993 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2060 - sig { returns(T::Boolean) } - def variable_call?; end - - # attr_reader write_name: Symbol - # - # source://prism//lib/prism/node.rb#1987 - sig { returns(Symbol) } - def write_name; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#1972 - 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#2129 - def type; end - end -end - -# Represents a method call, in all of the various forms that can take. -# -# foo -# ^^^ -# -# foo() -# ^^^^^ -# -# +foo -# ^^^^ -# -# foo + bar -# ^^^^^^^^^ -# -# foo.bar -# ^^^^^^^ -# -# foo&.bar -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#2153 -class Prism::CallNode < ::Prism::Node - # def initialize: (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) -> void - # - # @return [CallNode] a new instance of CallNode - # - # source://prism//lib/prism/node.rb#2182 - 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 - ).void - end - def initialize(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#2196 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#2173 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2254 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Node? - # - # source://prism//lib/prism/node.rb#2179 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#2259 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#2161 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2201 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#2274 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#2176 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2215 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2206 - def compact_child_nodes; end - - # def copy: (**params) -> CallNode - # - # source://prism//lib/prism/node.rb#2220 - sig { params(params: T.untyped).returns(Prism::CallNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2201 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#2239 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#2279 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String? - # - # source://prism//lib/prism/node.rb#2264 - sig { returns(T.nilable(String)) } - def message; end - - # attr_reader message_loc: Location? - # - # source://prism//lib/prism/node.rb#2167 - sig { returns(T.nilable(Prism::Location)) } - def message_loc; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#2164 - sig { returns(Symbol) } - def name; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#2269 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#2170 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#2158 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2244 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2323 - def type; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2249 - sig { returns(T::Boolean) } - def variable_call?; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#2155 - 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#2333 - def type; end - end -end - -# Flags for call nodes. -# -# source://prism//lib/prism/node.rb#17289 -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#17297 -Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) - -# &. operator -# -# source://prism//lib/prism/node.rb#17291 -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#17294 -Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) - -# Represents the use of an assignment operator on a call. -# -# foo.bar += baz -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#2342 -class Prism::CallOperatorWriteNode < ::Prism::Node - # def initialize: (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) -> void - # - # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode - # - # source://prism//lib/prism/node.rb#2371 - 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 - ).void - end - def initialize(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#2385 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2442 - sig { returns(T::Boolean) } - def attribute_write?; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#2447 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#2350 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2390 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2403 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2395 - def compact_child_nodes; end - - # def copy: (**params) -> CallOperatorWriteNode - # - # source://prism//lib/prism/node.rb#2408 - sig { params(params: T.untyped).returns(Prism::CallOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2390 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#2427 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#2457 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String? - # - # source://prism//lib/prism/node.rb#2452 - sig { returns(T.nilable(String)) } - def message; end - - # attr_reader message_loc: Location? - # - # source://prism//lib/prism/node.rb#2353 - sig { returns(T.nilable(Prism::Location)) } - def message_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#2362 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#2365 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader read_name: Symbol - # - # source://prism//lib/prism/node.rb#2356 - sig { returns(Symbol) } - def read_name; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#2347 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2432 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2492 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#2368 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2437 - sig { returns(T::Boolean) } - def variable_call?; end - - # attr_reader write_name: Symbol - # - # source://prism//lib/prism/node.rb#2359 - sig { returns(Symbol) } - def write_name; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#2344 - 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#2502 - def type; end - end -end - -# Represents the use of the `||=` operator on a call. -# -# foo.bar ||= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#2511 -class Prism::CallOrWriteNode < ::Prism::Node - # def initialize: (flags: Integer, receiver: Node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [CallOrWriteNode] a new instance of CallOrWriteNode - # - # source://prism//lib/prism/node.rb#2537 - 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 - ).void - end - def initialize(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#2550 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2606 - sig { returns(T::Boolean) } - def attribute_write?; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#2611 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#2519 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2555 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2568 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2560 - def compact_child_nodes; end - - # def copy: (**params) -> CallOrWriteNode - # - # source://prism//lib/prism/node.rb#2573 - sig { params(params: T.untyped).returns(Prism::CallOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2555 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#2591 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#2626 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String? - # - # source://prism//lib/prism/node.rb#2616 - sig { returns(T.nilable(String)) } - def message; end - - # attr_reader message_loc: Location? - # - # source://prism//lib/prism/node.rb#2522 - sig { returns(T.nilable(Prism::Location)) } - def message_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#2621 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#2531 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader read_name: Symbol - # - # source://prism//lib/prism/node.rb#2525 - sig { returns(Symbol) } - def read_name; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#2516 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2596 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2660 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#2534 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2601 - sig { returns(T::Boolean) } - def variable_call?; end - - # attr_reader write_name: Symbol - # - # source://prism//lib/prism/node.rb#2528 - sig { returns(Symbol) } - def write_name; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#2513 - 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#2670 - def type; end - end -end - -# Represents assigning to a method call. -# -# foo.bar, = 1 -# ^^^^^^^ -# -# begin -# rescue => foo.bar -# ^^^^^^^ -# end -# -# for foo.bar in baz do end -# ^^^^^^^ -# -# source://prism//lib/prism/node.rb#2687 -class Prism::CallTargetNode < ::Prism::Node - # def initialize: (flags: Integer, receiver: Node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location) -> void - # - # @return [CallTargetNode] a new instance of CallTargetNode - # - # source://prism//lib/prism/node.rb#2704 - sig do - params( - flags: Integer, - receiver: Prism::Node, - call_operator_loc: Prism::Location, - name: Symbol, - message_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(flags, receiver, call_operator_loc, name, message_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#2714 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2764 - sig { returns(T::Boolean) } - def attribute_write?; end - - # def call_operator: () -> String - # - # source://prism//lib/prism/node.rb#2769 - sig { returns(String) } - def call_operator; end - - # attr_reader call_operator_loc: Location - # - # source://prism//lib/prism/node.rb#2695 - sig { returns(Prism::Location) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2719 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2729 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2724 - def compact_child_nodes; end - - # def copy: (**params) -> CallTargetNode - # - # source://prism//lib/prism/node.rb#2734 - sig { params(params: T.untyped).returns(Prism::CallTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2719 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#2749 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#2779 - def inspect(inspector = T.unsafe(nil)); end - - # def message: () -> String - # - # source://prism//lib/prism/node.rb#2774 - sig { returns(String) } - def message; end - - # attr_reader message_loc: Location - # - # source://prism//lib/prism/node.rb#2701 - sig { returns(Prism::Location) } - def message_loc; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#2698 - sig { returns(Symbol) } - def name; end - - # attr_reader receiver: Node - # - # source://prism//lib/prism/node.rb#2692 - sig { returns(Prism::Node) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2754 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2805 - def type; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#2759 - sig { returns(T::Boolean) } - def variable_call?; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#2689 - 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#2815 - def type; end - end -end - -# Represents assigning to a local variable in pattern matching. -# -# foo => [bar => baz] -# ^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#2824 -class Prism::CapturePatternNode < ::Prism::Node - # def initialize: (value: Node, target: Node, operator_loc: Location, location: Location) -> void - # - # @return [CapturePatternNode] a new instance of CapturePatternNode - # - # source://prism//lib/prism/node.rb#2835 - sig do - params( - value: Prism::Node, - target: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(value, target, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#2843 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2848 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2858 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2853 - def compact_child_nodes; end - - # def copy: (**params) -> CapturePatternNode - # - # source://prism//lib/prism/node.rb#2863 - sig { params(params: T.untyped).returns(Prism::CapturePatternNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2848 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#2876 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#2886 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#2881 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#2832 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader target: Node - # - # source://prism//lib/prism/node.rb#2829 - sig { returns(Prism::Node) } - def target; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2910 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#2826 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2920 - def type; end - end -end - -# Represents the use of a case statement for pattern matching. -# -# case true -# in false -# end -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#2931 -class Prism::CaseMatchNode < ::Prism::Node - # def initialize: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void - # - # @return [CaseMatchNode] a new instance of CaseMatchNode - # - # source://prism//lib/prism/node.rb#2948 - 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 - ).void - end - def initialize(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#2958 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def case_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3002 - sig { returns(String) } - def case_keyword; end - - # attr_reader case_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#2942 - sig { returns(Prism::Location) } - def case_keyword_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2963 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#2977 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#2968 - def compact_child_nodes; end - - # attr_reader conditions: Array[Node] - # - # source://prism//lib/prism/node.rb#2936 - sig { returns(T::Array[Prism::Node]) } - def conditions; end - - # attr_reader consequent: ElseNode? - # - # source://prism//lib/prism/node.rb#2939 - sig { returns(T.nilable(Prism::ElseNode)) } - def consequent; end - - # def copy: (**params) -> CaseMatchNode - # - # source://prism//lib/prism/node.rb#2982 - sig { params(params: T.untyped).returns(Prism::CaseMatchNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#2963 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#2997 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3007 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#2945 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#3012 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader predicate: Node? - # - # source://prism//lib/prism/node.rb#2933 - sig { returns(T.nilable(Prism::Node)) } - def predicate; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3046 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3056 - def type; end - end -end - -# Represents the use of a case statement. -# -# case true -# when false -# end -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3067 -class Prism::CaseNode < ::Prism::Node - # def initialize: (predicate: Node?, conditions: Array[Node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location) -> void - # - # @return [CaseNode] a new instance of CaseNode - # - # source://prism//lib/prism/node.rb#3084 - 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 - ).void - end - def initialize(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#3094 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def case_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3138 - sig { returns(String) } - def case_keyword; end - - # attr_reader case_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3078 - sig { returns(Prism::Location) } - def case_keyword_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3099 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3113 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3104 - def compact_child_nodes; end - - # attr_reader conditions: Array[Node] - # - # source://prism//lib/prism/node.rb#3072 - sig { returns(T::Array[Prism::Node]) } - def conditions; end - - # attr_reader consequent: ElseNode? - # - # source://prism//lib/prism/node.rb#3075 - sig { returns(T.nilable(Prism::ElseNode)) } - def consequent; end - - # def copy: (**params) -> CaseNode - # - # source://prism//lib/prism/node.rb#3118 - sig { params(params: T.untyped).returns(Prism::CaseNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3099 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#3133 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3143 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3081 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#3148 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader predicate: Node? - # - # source://prism//lib/prism/node.rb#3069 - sig { returns(T.nilable(Prism::Node)) } - def predicate; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3182 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3192 - def type; end - end -end - -# Represents a class declaration involving the `class` keyword. -# -# class Foo end -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3201 -class Prism::ClassNode < ::Prism::Node - # def initialize: (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) -> void - # - # @return [ClassNode] a new instance of ClassNode - # - # source://prism//lib/prism/node.rb#3227 - 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 - ).void - end - def initialize(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#3240 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#3218 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3245 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def class_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3287 - sig { returns(String) } - def class_keyword; end - - # attr_reader class_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3206 - sig { returns(Prism::Location) } - def class_keyword_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3259 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3250 - def compact_child_nodes; end - - # attr_reader constant_path: Node - # - # source://prism//lib/prism/node.rb#3209 - sig { returns(Prism::Node) } - def constant_path; end - - # def copy: (**params) -> ClassNode - # - # source://prism//lib/prism/node.rb#3264 - sig { params(params: T.untyped).returns(Prism::ClassNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3245 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#3282 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#3297 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#3221 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # def inheritance_operator: () -> String? - # - # source://prism//lib/prism/node.rb#3292 - sig { returns(T.nilable(String)) } - def inheritance_operator; end - - # attr_reader inheritance_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#3212 - sig { returns(T.nilable(Prism::Location)) } - def inheritance_operator_loc; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#3302 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#3203 - sig { returns(T::Array[Symbol]) } - def locals; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3224 - sig { returns(Symbol) } - def name; end - - # attr_reader superclass: Node? - # - # source://prism//lib/prism/node.rb#3215 - sig { returns(T.nilable(Prism::Node)) } - def superclass; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3340 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3350 - def type; end - end -end - -# Represents the use of the `&&=` operator for assignment to a class variable. -# -# @@target &&= value -# ^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3359 -class Prism::ClassVariableAndWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#3373 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#3382 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3387 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3397 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3392 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#3402 - sig { params(params: T.untyped).returns(Prism::ClassVariableAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3387 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#3416 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#3426 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3361 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#3364 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#3421 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#3367 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3450 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#3370 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3460 - def type; end - end -end - -# Represents assigning to a class variable using an operator that isn't `=`. -# -# @@target += value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3469 -class Prism::ClassVariableOperatorWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - # - # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#3486 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - operator: Symbol, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, value, operator, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#3496 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3501 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3511 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3506 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#3516 - sig { params(params: T.untyped).returns(Prism::ClassVariableOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3501 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#3531 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#3536 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3471 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#3474 - sig { returns(Prism::Location) } - def name_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#3483 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#3477 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3561 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#3480 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3571 - def type; end - end -end - -# Represents the use of the `||=` operator for assignment to a class variable. -# -# @@target ||= value -# ^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3580 -class Prism::ClassVariableOrWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#3594 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#3603 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3608 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3618 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3613 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#3623 - sig { params(params: T.untyped).returns(Prism::ClassVariableOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3608 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#3637 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#3647 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3582 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#3585 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#3642 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#3588 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3671 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#3591 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3681 - def type; end - end -end - -# Represents referencing a class variable. -# -# @@foo -# ^^^^^ -# -# source://prism//lib/prism/node.rb#3690 -class Prism::ClassVariableReadNode < ::Prism::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode - # - # source://prism//lib/prism/node.rb#3695 - sig { params(name: Symbol, location: Prism::Location).void } - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#3701 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3706 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3716 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3711 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableReadNode - # - # source://prism//lib/prism/node.rb#3721 - sig { params(params: T.untyped).returns(Prism::ClassVariableReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3706 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#3732 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#3737 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3692 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3757 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3767 - def type; end - end -end - -# Represents writing to a class variable in a context that doesn't have an explicit value. -# -# @@foo, @@bar = baz -# ^^^^^ ^^^^^ -# -# source://prism//lib/prism/node.rb#3776 -class Prism::ClassVariableTargetNode < ::Prism::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode - # - # source://prism//lib/prism/node.rb#3781 - sig { params(name: Symbol, location: Prism::Location).void } - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#3787 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3792 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3802 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3797 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableTargetNode - # - # source://prism//lib/prism/node.rb#3807 - sig { params(params: T.untyped).returns(Prism::ClassVariableTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3792 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#3818 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#3823 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3778 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3843 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3853 - def type; end - end -end - -# Represents writing to a class variable. -# -# @@foo = 1 -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3862 -class Prism::ClassVariableWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location?, location: Location) -> void - # - # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode - # - # source://prism//lib/prism/node.rb#3876 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: T.nilable(Prism::Location), - location: Prism::Location - ).void - end - def initialize(name, name_loc, value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#3885 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3890 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#3900 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#3895 - def compact_child_nodes; end - - # def copy: (**params) -> ClassVariableWriteNode - # - # source://prism//lib/prism/node.rb#3905 - sig { params(params: T.untyped).returns(Prism::ClassVariableWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#3890 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#3919 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#3929 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3864 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#3867 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String? - # - # source://prism//lib/prism/node.rb#3924 - sig { returns(T.nilable(String)) } - def operator; end - - # attr_reader operator_loc: Location? - # - # source://prism//lib/prism/node.rb#3873 - sig { returns(T.nilable(Prism::Location)) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3953 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#3870 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3963 - def type; end - end -end - -# This represents a comment that was encountered during parsing. It is the -# base class for all comment types. -# -# source://prism//lib/prism/parse_result.rb#228 -class Prism::Comment - # Create a new comment object with the given location. - # - # @return [Comment] a new instance of Comment - # - # source://prism//lib/prism/parse_result.rb#233 - def initialize(location); end - - # Implement the hash pattern matching interface for Comment. - # - # source://prism//lib/prism/parse_result.rb#238 - def deconstruct_keys(keys); end - - # The location of this comment in the source. - # - # source://prism//lib/prism/parse_result.rb#230 - sig { returns(Prism::Location) } - def location; end - - sig { returns(T::Boolean) } - def trailing?; end -end - -# A compiler is a visitor that returns the value of each node as it visits. -# This is as opposed to a visitor which will only walk the tree. This can be -# useful when you are trying to compile a tree into a different format. -# -# For example, to build a representation of the tree as s-expressions, you -# could write: -# -# class SExpressions < Prism::Compiler -# def visit_arguments_node(node) = [:arguments, super] -# def visit_call_node(node) = [:call, super] -# def visit_integer_node(node) = [:integer] -# def visit_program_node(node) = [:program, super] -# end -# -# Prism.parse("1 + 2").value.accept(SExpressions.new) -# # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] -# -# source://prism//lib/prism/compiler.rb#26 -class Prism::Compiler - # Visit an individual node. - # - # source://prism//lib/prism/compiler.rb#28 - def visit(node); end - - # Visit the child nodes of the given node. - # Compile a AliasGlobalVariableNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_alias_global_variable_node(node); end - - # Visit the child nodes of the given node. - # Compile a AliasMethodNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_alias_method_node(node); end - - # Visit a list of nodes. - # - # source://prism//lib/prism/compiler.rb#33 - def visit_all(nodes); end - - # Visit the child nodes of the given node. - # Compile a AlternationPatternNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_alternation_pattern_node(node); end - - # Visit the child nodes of the given node. - # Compile a AndNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_and_node(node); end - - # Visit the child nodes of the given node. - # Compile a ArgumentsNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_arguments_node(node); end - - # Visit the child nodes of the given node. - # Compile a ArrayNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_array_node(node); end - - # Visit the child nodes of the given node. - # Compile a ArrayPatternNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_array_pattern_node(node); end - - # Visit the child nodes of the given node. - # Compile a AssocNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_assoc_node(node); end - - # Visit the child nodes of the given node. - # Compile a AssocSplatNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_assoc_splat_node(node); end - - # Visit the child nodes of the given node. - # Compile a BackReferenceReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_back_reference_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a BeginNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_begin_node(node); end - - # Visit the child nodes of the given node. - # Compile a BlockArgumentNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_block_argument_node(node); end - - # Visit the child nodes of the given node. - # Compile a BlockLocalVariableNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_block_local_variable_node(node); end - - # Visit the child nodes of the given node. - # Compile a BlockNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_block_node(node); end - - # Visit the child nodes of the given node. - # Compile a BlockParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_block_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a BlockParametersNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_block_parameters_node(node); end - - # Visit the child nodes of the given node. - # Compile a BreakNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_break_node(node); end - - # Visit the child nodes of the given node. - # Compile a CallAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_call_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a CallNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_call_node(node); end - - # Visit the child nodes of the given node. - # Compile a CallOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_call_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a CallOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_call_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a CallTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_call_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a CapturePatternNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_capture_pattern_node(node); end - - # Visit the child nodes of the given node. - # Compile a CaseMatchNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_case_match_node(node); end - - # Visit the child nodes of the given node. - # Compile a CaseNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_case_node(node); end - - # Visit the child nodes of the given node. - # - # source://prism//lib/prism/compiler.rb#38 - def visit_child_nodes(node); end - - # Visit the child nodes of the given node. - # Compile a ClassNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_node(node); end - - # Visit the child nodes of the given node. - # Compile a ClassVariableAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_variable_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ClassVariableOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_variable_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ClassVariableOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_variable_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ClassVariableReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_variable_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a ClassVariableTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_variable_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a ClassVariableWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_class_variable_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantPathAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_path_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantPathNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_path_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantPathOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_path_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantPathOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_path_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantPathTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_path_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantPathWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_path_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a ConstantWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_constant_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a DefNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_def_node(node); end - - # Visit the child nodes of the given node. - # Compile a DefinedNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_defined_node(node); end - - # Visit the child nodes of the given node. - # Compile a ElseNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_else_node(node); end - - # Visit the child nodes of the given node. - # Compile a EmbeddedStatementsNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_embedded_statements_node(node); end - - # Visit the child nodes of the given node. - # Compile a EmbeddedVariableNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_embedded_variable_node(node); end - - # Visit the child nodes of the given node. - # Compile a EnsureNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_ensure_node(node); end - - # Visit the child nodes of the given node. - # Compile a FalseNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_false_node(node); end - - # Visit the child nodes of the given node. - # Compile a FindPatternNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_find_pattern_node(node); end - - # Visit the child nodes of the given node. - # Compile a FlipFlopNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_flip_flop_node(node); end - - # Visit the child nodes of the given node. - # Compile a FloatNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_float_node(node); end - - # Visit the child nodes of the given node. - # Compile a ForNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_for_node(node); end - - # Visit the child nodes of the given node. - # Compile a ForwardingArgumentsNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_forwarding_arguments_node(node); end - - # Visit the child nodes of the given node. - # Compile a ForwardingParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_forwarding_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a ForwardingSuperNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_forwarding_super_node(node); end - - # Visit the child nodes of the given node. - # Compile a GlobalVariableAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_global_variable_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a GlobalVariableOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_global_variable_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a GlobalVariableOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_global_variable_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a GlobalVariableReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_global_variable_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a GlobalVariableTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_global_variable_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a GlobalVariableWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_global_variable_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a HashNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_hash_node(node); end - - # Visit the child nodes of the given node. - # Compile a HashPatternNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_hash_pattern_node(node); end - - # Visit the child nodes of the given node. - # Compile a IfNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_if_node(node); end - - # Visit the child nodes of the given node. - # Compile a ImaginaryNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_imaginary_node(node); end - - # Visit the child nodes of the given node. - # Compile a ImplicitNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_implicit_node(node); end - - # Visit the child nodes of the given node. - # Compile a ImplicitRestNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_implicit_rest_node(node); end - - # Visit the child nodes of the given node. - # Compile a InNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_in_node(node); end - - # Visit the child nodes of the given node. - # Compile a IndexAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_index_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a IndexOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_index_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a IndexOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_index_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a IndexTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_index_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a InstanceVariableAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_instance_variable_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a InstanceVariableOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_instance_variable_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a InstanceVariableOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_instance_variable_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a InstanceVariableReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_instance_variable_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a InstanceVariableTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_instance_variable_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a InstanceVariableWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_instance_variable_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a IntegerNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_integer_node(node); end - - # Visit the child nodes of the given node. - # Compile a InterpolatedMatchLastLineNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_interpolated_match_last_line_node(node); end - - # Visit the child nodes of the given node. - # Compile a InterpolatedRegularExpressionNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_interpolated_regular_expression_node(node); end - - # Visit the child nodes of the given node. - # Compile a InterpolatedStringNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_interpolated_string_node(node); end - - # Visit the child nodes of the given node. - # Compile a InterpolatedSymbolNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_interpolated_symbol_node(node); end - - # Visit the child nodes of the given node. - # Compile a InterpolatedXStringNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_interpolated_x_string_node(node); end - - # Visit the child nodes of the given node. - # Compile a KeywordHashNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_keyword_hash_node(node); end - - # Visit the child nodes of the given node. - # Compile a KeywordRestParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_keyword_rest_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a LambdaNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_lambda_node(node); end - - # Visit the child nodes of the given node. - # Compile a LocalVariableAndWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_local_variable_and_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a LocalVariableOperatorWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_local_variable_operator_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a LocalVariableOrWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_local_variable_or_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a LocalVariableReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_local_variable_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a LocalVariableTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_local_variable_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a LocalVariableWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_local_variable_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a MatchLastLineNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_match_last_line_node(node); end - - # Visit the child nodes of the given node. - # Compile a MatchPredicateNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_match_predicate_node(node); end - - # Visit the child nodes of the given node. - # Compile a MatchRequiredNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_match_required_node(node); end - - # Visit the child nodes of the given node. - # Compile a MatchWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_match_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a MissingNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_missing_node(node); end - - # Visit the child nodes of the given node. - # Compile a ModuleNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_module_node(node); end - - # Visit the child nodes of the given node. - # Compile a MultiTargetNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_multi_target_node(node); end - - # Visit the child nodes of the given node. - # Compile a MultiWriteNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_multi_write_node(node); end - - # Visit the child nodes of the given node. - # Compile a NextNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_next_node(node); end - - # Visit the child nodes of the given node. - # Compile a NilNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_nil_node(node); end - - # Visit the child nodes of the given node. - # Compile a NoKeywordsParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_no_keywords_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a NumberedParametersNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_numbered_parameters_node(node); end - - # Visit the child nodes of the given node. - # Compile a NumberedReferenceReadNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_numbered_reference_read_node(node); end - - # Visit the child nodes of the given node. - # Compile a OptionalKeywordParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_optional_keyword_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a OptionalParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_optional_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a OrNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_or_node(node); end - - # Visit the child nodes of the given node. - # Compile a ParametersNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_parameters_node(node); end - - # Visit the child nodes of the given node. - # Compile a ParenthesesNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_parentheses_node(node); end - - # Visit the child nodes of the given node. - # Compile a PinnedExpressionNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_pinned_expression_node(node); end - - # Visit the child nodes of the given node. - # Compile a PinnedVariableNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_pinned_variable_node(node); end - - # Visit the child nodes of the given node. - # Compile a PostExecutionNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_post_execution_node(node); end - - # Visit the child nodes of the given node. - # Compile a PreExecutionNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_pre_execution_node(node); end - - # Visit the child nodes of the given node. - # Compile a ProgramNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_program_node(node); end - - # Visit the child nodes of the given node. - # Compile a RangeNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_range_node(node); end - - # Visit the child nodes of the given node. - # Compile a RationalNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_rational_node(node); end - - # Visit the child nodes of the given node. - # Compile a RedoNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_redo_node(node); end - - # Visit the child nodes of the given node. - # Compile a RegularExpressionNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_regular_expression_node(node); end - - # Visit the child nodes of the given node. - # Compile a RequiredKeywordParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_required_keyword_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a RequiredParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_required_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a RescueModifierNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_rescue_modifier_node(node); end - - # Visit the child nodes of the given node. - # Compile a RescueNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_rescue_node(node); end - - # Visit the child nodes of the given node. - # Compile a RestParameterNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_rest_parameter_node(node); end - - # Visit the child nodes of the given node. - # Compile a RetryNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_retry_node(node); end - - # Visit the child nodes of the given node. - # Compile a ReturnNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_return_node(node); end - - # Visit the child nodes of the given node. - # Compile a SelfNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_self_node(node); end - - # Visit the child nodes of the given node. - # Compile a SingletonClassNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_singleton_class_node(node); end - - # Visit the child nodes of the given node. - # Compile a SourceEncodingNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_source_encoding_node(node); end - - # Visit the child nodes of the given node. - # Compile a SourceFileNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_source_file_node(node); end - - # Visit the child nodes of the given node. - # Compile a SourceLineNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_source_line_node(node); end - - # Visit the child nodes of the given node. - # Compile a SplatNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_splat_node(node); end - - # Visit the child nodes of the given node. - # Compile a StatementsNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_statements_node(node); end - - # Visit the child nodes of the given node. - # Compile a StringNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_string_node(node); end - - # Visit the child nodes of the given node. - # Compile a SuperNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_super_node(node); end - - # Visit the child nodes of the given node. - # Compile a SymbolNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_symbol_node(node); end - - # Visit the child nodes of the given node. - # Compile a TrueNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_true_node(node); end - - # Visit the child nodes of the given node. - # Compile a UndefNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_undef_node(node); end - - # Visit the child nodes of the given node. - # Compile a UnlessNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_unless_node(node); end - - # Visit the child nodes of the given node. - # Compile a UntilNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_until_node(node); end - - # Visit the child nodes of the given node. - # Compile a WhenNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_when_node(node); end - - # Visit the child nodes of the given node. - # Compile a WhileNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_while_node(node); end - - # Visit the child nodes of the given node. - # Compile a XStringNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_x_string_node(node); end - - # Visit the child nodes of the given node. - # Compile a YieldNode node - # - # source://prism//lib/prism/compiler.rb#38 - def visit_yield_node(node); end -end - -# Represents the use of the `&&=` operator for assignment to a constant. -# -# Target &&= value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#3972 -class Prism::ConstantAndWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode - # - # source://prism//lib/prism/node.rb#3986 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#3995 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4000 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4010 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4005 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantAndWriteNode - # - # source://prism//lib/prism/node.rb#4015 - sig { params(params: T.untyped).returns(Prism::ConstantAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4000 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#4029 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#4039 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#3974 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#3977 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#4034 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#3980 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4063 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#3983 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4073 - def type; end - end -end - -# Represents assigning to a constant using an operator that isn't `=`. -# -# Target += value -# ^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4082 -class Prism::ConstantOperatorWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - # - # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4099 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - operator: Symbol, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, value, operator, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#4109 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4114 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4124 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4119 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4129 - sig { params(params: T.untyped).returns(Prism::ConstantOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4114 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#4144 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#4149 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#4084 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#4087 - sig { returns(Prism::Location) } - def name_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#4096 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4090 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4174 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#4093 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4184 - def type; end - end -end - -# Represents the use of the `||=` operator for assignment to a constant. -# -# Target ||= value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4193 -class Prism::ConstantOrWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode - # - # source://prism//lib/prism/node.rb#4207 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#4216 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4221 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4231 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4226 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantOrWriteNode - # - # source://prism//lib/prism/node.rb#4236 - sig { params(params: T.untyped).returns(Prism::ConstantOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4221 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#4250 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#4260 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#4195 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#4198 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#4255 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4201 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4284 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#4204 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4294 - def type; end - end -end - -# Represents the use of the `&&=` operator for assignment to a constant path. -# -# Parent::Child &&= value -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4303 -class Prism::ConstantPathAndWriteNode < ::Prism::Node - # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode - # - # source://prism//lib/prism/node.rb#4314 - sig do - params( - target: Prism::ConstantPathNode, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(target, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#4322 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4327 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4337 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4332 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathAndWriteNode - # - # source://prism//lib/prism/node.rb#4342 - sig { params(params: T.untyped).returns(Prism::ConstantPathAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4327 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#4355 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#4365 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#4360 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4308 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://prism//lib/prism/node.rb#4305 - sig { returns(Prism::ConstantPathNode) } - def target; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4389 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#4311 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4399 - def type; end - end -end - -# Represents accessing a constant through a path of `::` operators. -# -# Foo::Bar -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4408 -class Prism::ConstantPathNode < ::Prism::Node - # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void - # - # @return [ConstantPathNode] a new instance of ConstantPathNode - # - # source://prism//lib/prism/node.rb#4419 - sig do - params( - parent: T.nilable(Prism::Node), - child: Prism::Node, - delimiter_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(parent, child, delimiter_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#4427 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader child: Node - # - # source://prism//lib/prism/node.rb#4413 - sig { returns(Prism::Node) } - def child; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4432 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4445 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4437 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathNode - # - # source://prism//lib/prism/node.rb#4450 - sig { params(params: T.untyped).returns(Prism::ConstantPathNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4432 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#4463 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def delimiter: () -> String - # - # source://prism//lib/prism/node.rb#4468 - sig { returns(String) } - def delimiter; end - - # attr_reader delimiter_loc: Location - # - # source://prism//lib/prism/node.rb#4416 - sig { returns(Prism::Location) } - def delimiter_loc; end - - # Returns the full name of this constant path. For example: "Foo::Bar" - # - # source://prism//lib/prism/node_ext.rb#129 - def full_name; end - - # Returns the list of parts for the full name of this constant path. - # For example: [:Foo, :Bar] - # - # source://prism//lib/prism/node_ext.rb#112 - def full_name_parts; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#4473 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader parent: Node? - # - # source://prism//lib/prism/node.rb#4410 - sig { returns(T.nilable(Prism::Node)) } - def parent; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4501 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4511 - def type; end - end -end - -# An error class raised when dynamic parts are found while computing a -# constant path's full name. For example: -# Foo::Bar::Baz -> does not raise because all parts of the constant path are -# simple constants -# var::Bar::Baz -> raises because the first part of the constant path is a -# local variable -# -# source://prism//lib/prism/node_ext.rb#108 -class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end - -# Represents assigning to a constant path using an operator that isn't `=`. -# -# Parent::Child += value -# ^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4520 -class Prism::ConstantPathOperatorWriteNode < ::Prism::Node - # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - # - # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4534 - sig do - params( - target: Prism::ConstantPathNode, - operator_loc: Prism::Location, - value: Prism::Node, - operator: Symbol, - location: Prism::Location - ).void - end - def initialize(target, operator_loc, value, operator, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#4543 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4548 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4558 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4553 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathOperatorWriteNode - # - # source://prism//lib/prism/node.rb#4563 - sig { params(params: T.untyped).returns(Prism::ConstantPathOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4548 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#4577 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#4582 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#4531 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4525 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://prism//lib/prism/node.rb#4522 - sig { returns(Prism::ConstantPathNode) } - def target; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4607 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#4528 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4617 - def type; end - end -end - -# Represents the use of the `||=` operator for assignment to a constant path. -# -# Parent::Child ||= value -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4626 -class Prism::ConstantPathOrWriteNode < ::Prism::Node - # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode - # - # source://prism//lib/prism/node.rb#4637 - sig do - params( - target: Prism::ConstantPathNode, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(target, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#4645 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4650 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4660 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4655 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathOrWriteNode - # - # source://prism//lib/prism/node.rb#4665 - sig { params(params: T.untyped).returns(Prism::ConstantPathOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4650 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#4678 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#4688 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#4683 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4631 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://prism//lib/prism/node.rb#4628 - sig { returns(Prism::ConstantPathNode) } - def target; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4712 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#4634 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4722 - def type; end - end -end - -# Represents writing to a constant path in a context that doesn't have an explicit value. -# -# Foo::Foo, Bar::Bar = baz -# ^^^^^^^^ ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4731 -class Prism::ConstantPathTargetNode < ::Prism::Node - # def initialize: (parent: Node?, child: Node, delimiter_loc: Location, location: Location) -> void - # - # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode - # - # source://prism//lib/prism/node.rb#4742 - sig do - params( - parent: T.nilable(Prism::Node), - child: Prism::Node, - delimiter_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(parent, child, delimiter_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#4750 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader child: Node - # - # source://prism//lib/prism/node.rb#4736 - sig { returns(Prism::Node) } - def child; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4755 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4768 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4760 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathTargetNode - # - # source://prism//lib/prism/node.rb#4773 - sig { params(params: T.untyped).returns(Prism::ConstantPathTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4755 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#4786 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def delimiter: () -> String - # - # source://prism//lib/prism/node.rb#4791 - sig { returns(String) } - def delimiter; end - - # attr_reader delimiter_loc: Location - # - # source://prism//lib/prism/node.rb#4739 - sig { returns(Prism::Location) } - def delimiter_loc; end - - # Returns the full name of this constant path. For example: "Foo::Bar" - # - # source://prism//lib/prism/node_ext.rb#142 - def full_name; end - - # Returns the list of parts for the full name of this constant path. - # For example: [:Foo, :Bar] - # - # source://prism//lib/prism/node_ext.rb#137 - def full_name_parts; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#4796 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader parent: Node? - # - # source://prism//lib/prism/node.rb#4733 - sig { returns(T.nilable(Prism::Node)) } - def parent; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4824 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4834 - def type; end - end -end - -# Represents writing to a constant path. -# -# ::Foo = 1 -# ^^^^^^^^^ -# -# Foo::Bar = 1 -# ^^^^^^^^^^^^ -# -# ::Foo::Bar = 1 -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#4849 -class Prism::ConstantPathWriteNode < ::Prism::Node - # def initialize: (target: ConstantPathNode, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode - # - # source://prism//lib/prism/node.rb#4860 - sig do - params( - target: Prism::ConstantPathNode, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(target, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#4868 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4873 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4883 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4878 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantPathWriteNode - # - # source://prism//lib/prism/node.rb#4888 - sig { params(params: T.untyped).returns(Prism::ConstantPathWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4873 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#4901 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#4911 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#4906 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#4854 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader target: ConstantPathNode - # - # source://prism//lib/prism/node.rb#4851 - sig { returns(Prism::ConstantPathNode) } - def target; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4935 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#4857 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4945 - def type; end - end -end - -# Represents referencing a constant. -# -# Foo -# ^^^ -# -# source://prism//lib/prism/node.rb#4954 -class Prism::ConstantReadNode < ::Prism::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [ConstantReadNode] a new instance of ConstantReadNode - # - # source://prism//lib/prism/node.rb#4959 - sig { params(name: Symbol, location: Prism::Location).void } - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#4965 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4970 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#4980 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#4975 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantReadNode - # - # source://prism//lib/prism/node.rb#4985 - sig { params(params: T.untyped).returns(Prism::ConstantReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#4970 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#4996 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # Returns the full name of this constant. For example: "Foo" - # - # source://prism//lib/prism/node_ext.rb#96 - def full_name; end - - # Returns the list of parts for the full name of this constant. - # For example: [:Foo] - # - # source://prism//lib/prism/node_ext.rb#91 - def full_name_parts; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#5001 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#4956 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5021 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5031 - def type; end - end -end - -# Represents writing to a constant in a context that doesn't have an explicit value. -# -# Foo, Bar = baz -# ^^^ ^^^ -# -# source://prism//lib/prism/node.rb#5040 -class Prism::ConstantTargetNode < ::Prism::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [ConstantTargetNode] a new instance of ConstantTargetNode - # - # source://prism//lib/prism/node.rb#5045 - sig { params(name: Symbol, location: Prism::Location).void } - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#5051 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5056 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5066 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5061 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantTargetNode - # - # source://prism//lib/prism/node.rb#5071 - sig { params(params: T.untyped).returns(Prism::ConstantTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5056 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#5082 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#5087 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#5042 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5107 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5117 - def type; end - end -end - -# Represents writing to a constant. -# -# Foo = 1 -# ^^^^^^^ -# -# source://prism//lib/prism/node.rb#5126 -class Prism::ConstantWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void - # - # @return [ConstantWriteNode] a new instance of ConstantWriteNode - # - # source://prism//lib/prism/node.rb#5140 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(name, name_loc, value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#5149 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5154 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5164 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5159 - def compact_child_nodes; end - - # def copy: (**params) -> ConstantWriteNode - # - # source://prism//lib/prism/node.rb#5169 - sig { params(params: T.untyped).returns(Prism::ConstantWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5154 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#5183 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#5193 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#5128 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#5131 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#5188 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#5137 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5217 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#5134 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5227 - def type; end - end -end - -class Prism::DATAComment < Prism::Comment; end - -# The DSL module provides a set of methods that can be used to create prism -# nodes in a more concise manner. For example, instead of writing: -# -# source = Prism::Source.new("[1]") -# -# Prism::ArrayNode.new( -# [ -# Prism::IntegerNode.new( -# Prism::IntegerBaseFlags::DECIMAL, -# Prism::Location.new(source, 1, 1), -# ) -# ], -# Prism::Location.new(source, 0, 1), -# Prism::Location.new(source, 2, 1) -# ) -# -# you could instead write: -# -# source = Prism::Source.new("[1]") -# -# ArrayNode( -# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, Location(source, 1, 1))), -# Location(source, 0, 1), -# Location(source, 2, 1) -# ) -# -# 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#37 -module Prism::DSL - private - - # Create a new AliasGlobalVariableNode node - # - # source://prism//lib/prism/dsl.rb#46 - def AliasGlobalVariableNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end - - # Create a new AliasMethodNode node - # - # source://prism//lib/prism/dsl.rb#51 - def AliasMethodNode(new_name, old_name, keyword_loc, location = T.unsafe(nil)); end - - # Create a new AlternationPatternNode node - # - # source://prism//lib/prism/dsl.rb#56 - def AlternationPatternNode(left, right, operator_loc, location = T.unsafe(nil)); end - - # Create a new AndNode node - # - # source://prism//lib/prism/dsl.rb#61 - def AndNode(left, right, operator_loc, location = T.unsafe(nil)); end - - # Create a new ArgumentsNode node - # - # source://prism//lib/prism/dsl.rb#66 - def ArgumentsNode(flags, arguments, location = T.unsafe(nil)); end - - # Create a new ArrayNode node - # - # source://prism//lib/prism/dsl.rb#71 - def ArrayNode(flags, elements, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new ArrayPatternNode node - # - # source://prism//lib/prism/dsl.rb#76 - def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new AssocNode node - # - # source://prism//lib/prism/dsl.rb#81 - def AssocNode(key, value, operator_loc, location = T.unsafe(nil)); end - - # Create a new AssocSplatNode node - # - # source://prism//lib/prism/dsl.rb#86 - def AssocSplatNode(value, operator_loc, location = T.unsafe(nil)); end - - # Create a new BackReferenceReadNode node - # - # source://prism//lib/prism/dsl.rb#91 - def BackReferenceReadNode(name, location = T.unsafe(nil)); end - - # Create a new BeginNode node - # - # source://prism//lib/prism/dsl.rb#96 - def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new BlockArgumentNode node - # - # source://prism//lib/prism/dsl.rb#101 - def BlockArgumentNode(expression, operator_loc, location = T.unsafe(nil)); end - - # Create a new BlockLocalVariableNode node - # - # source://prism//lib/prism/dsl.rb#106 - def BlockLocalVariableNode(name, location = T.unsafe(nil)); end - - # Create a new BlockNode node - # - # source://prism//lib/prism/dsl.rb#111 - def BlockNode(locals, locals_body_index, parameters, body, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new BlockParameterNode node - # - # source://prism//lib/prism/dsl.rb#116 - def BlockParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end - - # Create a new BlockParametersNode node - # - # source://prism//lib/prism/dsl.rb#121 - def BlockParametersNode(parameters, locals, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new BreakNode node - # - # source://prism//lib/prism/dsl.rb#126 - def BreakNode(arguments, keyword_loc, location = T.unsafe(nil)); end - - # Create a new CallAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#131 - def CallAndWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new CallNode node - # - # source://prism//lib/prism/dsl.rb#136 - def CallNode(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location = T.unsafe(nil)); end - - # Create a new CallOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#141 - def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new CallOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#146 - def CallOrWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new CallTargetNode node - # - # source://prism//lib/prism/dsl.rb#151 - def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, location = T.unsafe(nil)); end - - # Create a new CapturePatternNode node - # - # source://prism//lib/prism/dsl.rb#156 - def CapturePatternNode(value, target, operator_loc, location = T.unsafe(nil)); end - - # Create a new CaseMatchNode node - # - # source://prism//lib/prism/dsl.rb#161 - def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new CaseNode node - # - # source://prism//lib/prism/dsl.rb#166 - def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new ClassNode node - # - # source://prism//lib/prism/dsl.rb#171 - def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location = T.unsafe(nil)); end - - # Create a new ClassVariableAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#176 - def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ClassVariableOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#181 - def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end - - # Create a new ClassVariableOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#186 - def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ClassVariableReadNode node - # - # source://prism//lib/prism/dsl.rb#191 - def ClassVariableReadNode(name, location = T.unsafe(nil)); end - - # Create a new ClassVariableTargetNode node - # - # source://prism//lib/prism/dsl.rb#196 - def ClassVariableTargetNode(name, location = T.unsafe(nil)); end - - # Create a new ClassVariableWriteNode node - # - # source://prism//lib/prism/dsl.rb#201 - def ClassVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end - - # Create a new ConstantAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#206 - def ConstantAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ConstantOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#211 - def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end - - # Create a new ConstantOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#216 - def ConstantOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ConstantPathAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#221 - def ConstantPathAndWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ConstantPathNode node - # - # source://prism//lib/prism/dsl.rb#226 - def ConstantPathNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end - - # Create a new ConstantPathOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#231 - def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, location = T.unsafe(nil)); end - - # Create a new ConstantPathOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#236 - def ConstantPathOrWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ConstantPathTargetNode node - # - # source://prism//lib/prism/dsl.rb#241 - def ConstantPathTargetNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end - - # Create a new ConstantPathWriteNode node - # - # source://prism//lib/prism/dsl.rb#246 - def ConstantPathWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new ConstantReadNode node - # - # source://prism//lib/prism/dsl.rb#251 - def ConstantReadNode(name, location = T.unsafe(nil)); end - - # Create a new ConstantTargetNode node - # - # source://prism//lib/prism/dsl.rb#256 - def ConstantTargetNode(name, location = T.unsafe(nil)); end - - # Create a new ConstantWriteNode node - # - # source://prism//lib/prism/dsl.rb#261 - def ConstantWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end - - # Create a new DefNode node - # - # source://prism//lib/prism/dsl.rb#266 - def DefNode(name, name_loc, receiver, parameters, body, locals, locals_body_index, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new DefinedNode node - # - # source://prism//lib/prism/dsl.rb#271 - def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, location = T.unsafe(nil)); end - - # Create a new ElseNode node - # - # source://prism//lib/prism/dsl.rb#276 - def ElseNode(else_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new EmbeddedStatementsNode node - # - # source://prism//lib/prism/dsl.rb#281 - def EmbeddedStatementsNode(opening_loc, statements, closing_loc, location = T.unsafe(nil)); end - - # Create a new EmbeddedVariableNode node - # - # source://prism//lib/prism/dsl.rb#286 - def EmbeddedVariableNode(operator_loc, variable, location = T.unsafe(nil)); end - - # Create a new EnsureNode node - # - # source://prism//lib/prism/dsl.rb#291 - def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new FalseNode node - # - # source://prism//lib/prism/dsl.rb#296 - def FalseNode(location = T.unsafe(nil)); end - - # Create a new FindPatternNode node - # - # source://prism//lib/prism/dsl.rb#301 - def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new FlipFlopNode node - # - # source://prism//lib/prism/dsl.rb#306 - def FlipFlopNode(flags, left, right, operator_loc, location = T.unsafe(nil)); end - - # Create a new FloatNode node - # - # source://prism//lib/prism/dsl.rb#311 - def FloatNode(location = T.unsafe(nil)); end - - # Create a new ForNode node - # - # source://prism//lib/prism/dsl.rb#316 - def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new ForwardingArgumentsNode node - # - # source://prism//lib/prism/dsl.rb#321 - def ForwardingArgumentsNode(location = T.unsafe(nil)); end - - # Create a new ForwardingParameterNode node - # - # source://prism//lib/prism/dsl.rb#326 - def ForwardingParameterNode(location = T.unsafe(nil)); end - - # Create a new ForwardingSuperNode node - # - # source://prism//lib/prism/dsl.rb#331 - def ForwardingSuperNode(block, location = T.unsafe(nil)); end - - # Create a new GlobalVariableAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#336 - def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new GlobalVariableOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#341 - def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end - - # Create a new GlobalVariableOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#346 - def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new GlobalVariableReadNode node - # - # source://prism//lib/prism/dsl.rb#351 - def GlobalVariableReadNode(name, location = T.unsafe(nil)); end - - # Create a new GlobalVariableTargetNode node - # - # source://prism//lib/prism/dsl.rb#356 - def GlobalVariableTargetNode(name, location = T.unsafe(nil)); end - - # Create a new GlobalVariableWriteNode node - # - # source://prism//lib/prism/dsl.rb#361 - def GlobalVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end - - # Create a new HashNode node - # - # source://prism//lib/prism/dsl.rb#366 - def HashNode(opening_loc, elements, closing_loc, location = T.unsafe(nil)); end - - # Create a new HashPatternNode node - # - # source://prism//lib/prism/dsl.rb#371 - def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new IfNode node - # - # source://prism//lib/prism/dsl.rb#376 - def IfNode(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new ImaginaryNode node - # - # source://prism//lib/prism/dsl.rb#381 - def ImaginaryNode(numeric, location = T.unsafe(nil)); end - - # Create a new ImplicitNode node - # - # source://prism//lib/prism/dsl.rb#386 - def ImplicitNode(value, location = T.unsafe(nil)); end - - # Create a new ImplicitRestNode node - # - # source://prism//lib/prism/dsl.rb#391 - def ImplicitRestNode(location = T.unsafe(nil)); end - - # Create a new InNode node - # - # source://prism//lib/prism/dsl.rb#396 - def InNode(pattern, statements, in_loc, then_loc, location = T.unsafe(nil)); end - - # Create a new IndexAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#401 - def IndexAndWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new IndexOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#406 - def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new IndexOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#411 - def IndexOrWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new IndexTargetNode node - # - # source://prism//lib/prism/dsl.rb#416 - def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, location = T.unsafe(nil)); end - - # Create a new InstanceVariableAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#421 - def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new InstanceVariableOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#426 - def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end - - # Create a new InstanceVariableOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#431 - def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new InstanceVariableReadNode node - # - # source://prism//lib/prism/dsl.rb#436 - def InstanceVariableReadNode(name, location = T.unsafe(nil)); end - - # Create a new InstanceVariableTargetNode node - # - # source://prism//lib/prism/dsl.rb#441 - def InstanceVariableTargetNode(name, location = T.unsafe(nil)); end - - # Create a new InstanceVariableWriteNode node - # - # source://prism//lib/prism/dsl.rb#446 - def InstanceVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end - - # Create a new IntegerNode node - # - # source://prism//lib/prism/dsl.rb#451 - def IntegerNode(flags, location = T.unsafe(nil)); end - - # Create a new InterpolatedMatchLastLineNode node - # - # source://prism//lib/prism/dsl.rb#456 - def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, location = T.unsafe(nil)); end - - # Create a new InterpolatedRegularExpressionNode node - # - # source://prism//lib/prism/dsl.rb#461 - def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, location = T.unsafe(nil)); end - - # Create a new InterpolatedStringNode node - # - # source://prism//lib/prism/dsl.rb#466 - def InterpolatedStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end - - # Create a new InterpolatedSymbolNode node - # - # source://prism//lib/prism/dsl.rb#471 - def InterpolatedSymbolNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end - - # Create a new InterpolatedXStringNode node - # - # source://prism//lib/prism/dsl.rb#476 - def InterpolatedXStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end - - # Create a new KeywordHashNode node - # - # source://prism//lib/prism/dsl.rb#481 - def KeywordHashNode(flags, elements, location = T.unsafe(nil)); end - - # Create a new KeywordRestParameterNode node - # - # source://prism//lib/prism/dsl.rb#486 - def KeywordRestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end - - # Create a new LambdaNode node - # - # source://prism//lib/prism/dsl.rb#491 - def LambdaNode(locals, locals_body_index, operator_loc, opening_loc, closing_loc, parameters, body, location = T.unsafe(nil)); end - - # Create a new LocalVariableAndWriteNode node - # - # source://prism//lib/prism/dsl.rb#496 - def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end - - # Create a new LocalVariableOperatorWriteNode node - # - # source://prism//lib/prism/dsl.rb#501 - def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, location = T.unsafe(nil)); end - - # Create a new LocalVariableOrWriteNode node - # - # source://prism//lib/prism/dsl.rb#506 - def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end - - # Create a new LocalVariableReadNode node - # - # source://prism//lib/prism/dsl.rb#511 - def LocalVariableReadNode(name, depth, location = T.unsafe(nil)); end - - # Create a new LocalVariableTargetNode node - # - # source://prism//lib/prism/dsl.rb#516 - def LocalVariableTargetNode(name, depth, location = T.unsafe(nil)); end - - # Create a new LocalVariableWriteNode node - # - # source://prism//lib/prism/dsl.rb#521 - def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, location = T.unsafe(nil)); end - - # Create a new Location object - # - # source://prism//lib/prism/dsl.rb#41 - 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#526 - def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end - - # Create a new MatchPredicateNode node - # - # source://prism//lib/prism/dsl.rb#531 - def MatchPredicateNode(value, pattern, operator_loc, location = T.unsafe(nil)); end - - # Create a new MatchRequiredNode node - # - # source://prism//lib/prism/dsl.rb#536 - def MatchRequiredNode(value, pattern, operator_loc, location = T.unsafe(nil)); end - - # Create a new MatchWriteNode node - # - # source://prism//lib/prism/dsl.rb#541 - def MatchWriteNode(call, targets, location = T.unsafe(nil)); end - - # Create a new MissingNode node - # - # source://prism//lib/prism/dsl.rb#546 - def MissingNode(location = T.unsafe(nil)); end - - # Create a new ModuleNode node - # - # source://prism//lib/prism/dsl.rb#551 - def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location = T.unsafe(nil)); end - - # Create a new MultiTargetNode node - # - # source://prism//lib/prism/dsl.rb#556 - def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, location = T.unsafe(nil)); end - - # Create a new MultiWriteNode node - # - # source://prism//lib/prism/dsl.rb#561 - def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new NextNode node - # - # source://prism//lib/prism/dsl.rb#566 - def NextNode(arguments, keyword_loc, location = T.unsafe(nil)); end - - # Create a new NilNode node - # - # source://prism//lib/prism/dsl.rb#571 - def NilNode(location = T.unsafe(nil)); end - - # Create a new NoKeywordsParameterNode node - # - # source://prism//lib/prism/dsl.rb#576 - def NoKeywordsParameterNode(operator_loc, keyword_loc, location = T.unsafe(nil)); end - - # Create a new NumberedParametersNode node - # - # source://prism//lib/prism/dsl.rb#581 - def NumberedParametersNode(maximum, location = T.unsafe(nil)); end - - # Create a new NumberedReferenceReadNode node - # - # source://prism//lib/prism/dsl.rb#586 - def NumberedReferenceReadNode(number, location = T.unsafe(nil)); end - - # Create a new OptionalKeywordParameterNode node - # - # source://prism//lib/prism/dsl.rb#591 - def OptionalKeywordParameterNode(name, name_loc, value, location = T.unsafe(nil)); end - - # Create a new OptionalParameterNode node - # - # source://prism//lib/prism/dsl.rb#596 - def OptionalParameterNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end - - # Create a new OrNode node - # - # source://prism//lib/prism/dsl.rb#601 - def OrNode(left, right, operator_loc, location = T.unsafe(nil)); end - - # Create a new ParametersNode node - # - # source://prism//lib/prism/dsl.rb#606 - def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, location = T.unsafe(nil)); end - - # Create a new ParenthesesNode node - # - # source://prism//lib/prism/dsl.rb#611 - def ParenthesesNode(body, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new PinnedExpressionNode node - # - # source://prism//lib/prism/dsl.rb#616 - def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, location = T.unsafe(nil)); end - - # Create a new PinnedVariableNode node - # - # source://prism//lib/prism/dsl.rb#621 - def PinnedVariableNode(variable, operator_loc, location = T.unsafe(nil)); end - - # Create a new PostExecutionNode node - # - # source://prism//lib/prism/dsl.rb#626 - def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new PreExecutionNode node - # - # source://prism//lib/prism/dsl.rb#631 - def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end - - # Create a new ProgramNode node - # - # source://prism//lib/prism/dsl.rb#636 - def ProgramNode(locals, statements, location = T.unsafe(nil)); end - - # Create a new RangeNode node - # - # source://prism//lib/prism/dsl.rb#641 - def RangeNode(flags, left, right, operator_loc, location = T.unsafe(nil)); end - - # Create a new RationalNode node - # - # source://prism//lib/prism/dsl.rb#646 - def RationalNode(numeric, location = T.unsafe(nil)); end - - # Create a new RedoNode node - # - # source://prism//lib/prism/dsl.rb#651 - def RedoNode(location = T.unsafe(nil)); end - - # Create a new RegularExpressionNode node - # - # source://prism//lib/prism/dsl.rb#656 - def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end - - # Create a new RequiredKeywordParameterNode node - # - # source://prism//lib/prism/dsl.rb#661 - def RequiredKeywordParameterNode(name, name_loc, location = T.unsafe(nil)); end - - # Create a new RequiredParameterNode node - # - # source://prism//lib/prism/dsl.rb#666 - def RequiredParameterNode(name, location = T.unsafe(nil)); end - - # Create a new RescueModifierNode node - # - # source://prism//lib/prism/dsl.rb#671 - def RescueModifierNode(expression, keyword_loc, rescue_expression, location = T.unsafe(nil)); end - - # Create a new RescueNode node - # - # source://prism//lib/prism/dsl.rb#676 - def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location = T.unsafe(nil)); end - - # Create a new RestParameterNode node - # - # source://prism//lib/prism/dsl.rb#681 - def RestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end - - # Create a new RetryNode node - # - # source://prism//lib/prism/dsl.rb#686 - def RetryNode(location = T.unsafe(nil)); end - - # Create a new ReturnNode node - # - # source://prism//lib/prism/dsl.rb#691 - def ReturnNode(keyword_loc, arguments, location = T.unsafe(nil)); end - - # Create a new SelfNode node - # - # source://prism//lib/prism/dsl.rb#696 - def SelfNode(location = T.unsafe(nil)); end - - # Create a new SingletonClassNode node - # - # source://prism//lib/prism/dsl.rb#701 - def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new SourceEncodingNode node - # - # source://prism//lib/prism/dsl.rb#706 - def SourceEncodingNode(location = T.unsafe(nil)); end - - # Create a new SourceFileNode node - # - # source://prism//lib/prism/dsl.rb#711 - def SourceFileNode(filepath, location = T.unsafe(nil)); end - - # Create a new SourceLineNode node - # - # source://prism//lib/prism/dsl.rb#716 - def SourceLineNode(location = T.unsafe(nil)); end - - # Create a new SplatNode node - # - # source://prism//lib/prism/dsl.rb#721 - def SplatNode(operator_loc, expression, location = T.unsafe(nil)); end - - # Create a new StatementsNode node - # - # source://prism//lib/prism/dsl.rb#726 - def StatementsNode(body, location = T.unsafe(nil)); end - - # Create a new StringNode node - # - # source://prism//lib/prism/dsl.rb#731 - def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end - - # Create a new SuperNode node - # - # source://prism//lib/prism/dsl.rb#736 - def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, location = T.unsafe(nil)); end - - # Create a new SymbolNode node - # - # source://prism//lib/prism/dsl.rb#741 - def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, location = T.unsafe(nil)); end - - # Create a new TrueNode node - # - # source://prism//lib/prism/dsl.rb#746 - def TrueNode(location = T.unsafe(nil)); end - - # Create a new UndefNode node - # - # source://prism//lib/prism/dsl.rb#751 - def UndefNode(names, keyword_loc, location = T.unsafe(nil)); end - - # Create a new UnlessNode node - # - # source://prism//lib/prism/dsl.rb#756 - def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end - - # Create a new UntilNode node - # - # source://prism//lib/prism/dsl.rb#761 - def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, location = T.unsafe(nil)); end - - # Create a new WhenNode node - # - # source://prism//lib/prism/dsl.rb#766 - def WhenNode(keyword_loc, conditions, statements, location = T.unsafe(nil)); end - - # Create a new WhileNode node - # - # source://prism//lib/prism/dsl.rb#771 - def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, location = T.unsafe(nil)); end - - # Create a new XStringNode node - # - # source://prism//lib/prism/dsl.rb#776 - def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end - - # Create a new YieldNode node - # - # source://prism//lib/prism/dsl.rb#781 - def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, location = T.unsafe(nil)); end -end - -# This module is used for testing and debugging and is not meant to be used by -# consumers of this library. -# -# source://prism//lib/prism/debug.rb#6 -module Prism::Debug - class << self - # :call-seq: - # Debug::cruby_locals(source) -> Array - # - # For the given source, compiles with CRuby and returns a list of all of the - # sets of local variables that were encountered. - # - # source://prism//lib/prism/debug.rb#54 - def cruby_locals(source); end - - def inspect_node(_arg0); end - def memsize(_arg0); end - def named_captures(_arg0); end - - # :call-seq: - # Debug::newlines(source) -> Array - # - # For the given source string, return the byte offsets of every newline in - # the source. - # - # source://prism//lib/prism/debug.rb#196 - def newlines(source); end - - # :call-seq: - # Debug::prism_locals(source) -> Array - # - # For the given source, parses with prism and returns a list of all of the - # sets of local variables that were encountered. - # - # source://prism//lib/prism/debug.rb#98 - def prism_locals(source); end - - def profile_file(_arg0); end - end -end - -# Used to hold the place of a local that will be in the local table but -# cannot be accessed directly from the source code. For example, the -# iteration variable in a for loop or the positional parameter on a method -# definition that is destructured. -# -# source://prism//lib/prism/debug.rb#90 -Prism::Debug::AnonymousLocal = T.let(T.unsafe(nil), Object) - -# A wrapper around a RubyVM::InstructionSequence that provides a more -# convenient interface for accessing parts of the iseq. -# -# source://prism//lib/prism/debug.rb#9 -class Prism::Debug::ISeq - # @return [ISeq] a new instance of ISeq - # - # source://prism//lib/prism/debug.rb#12 - def initialize(parts); end - - # source://prism//lib/prism/debug.rb#28 - def each_child; end - - # source://prism//lib/prism/debug.rb#24 - def instructions; end - - # source://prism//lib/prism/debug.rb#20 - def local_table; end - - # source://prism//lib/prism/debug.rb#10 - def parts; end - - # source://prism//lib/prism/debug.rb#16 - def type; end -end - -# Represents a method definition. -# -# def method -# end -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#5237 -class Prism::DefNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], locals_body_index: Integer, def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> void - # - # @return [DefNode] a new instance of DefNode - # - # source://prism//lib/prism/node.rb#5278 - 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], - locals_body_index: Integer, - 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(name, name_loc, receiver, parameters, body, locals, locals_body_index, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#5296 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#5251 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5301 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5315 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5306 - def compact_child_nodes; end - - # def copy: (**params) -> DefNode - # - # source://prism//lib/prism/node.rb#5320 - sig { params(params: T.untyped).returns(Prism::DefNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5301 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#5343 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def def_keyword: () -> String - # - # source://prism//lib/prism/node.rb#5348 - sig { returns(String) } - def def_keyword; end - - # attr_reader def_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#5260 - sig { returns(Prism::Location) } - def def_keyword_loc; end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#5373 - sig { returns(T.nilable(String)) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#5275 - sig { returns(T.nilable(Prism::Location)) } - def end_keyword_loc; end - - # def equal: () -> String? - # - # source://prism//lib/prism/node.rb#5368 - sig { returns(T.nilable(String)) } - def equal; end - - # attr_reader equal_loc: Location? - # - # source://prism//lib/prism/node.rb#5272 - sig { returns(T.nilable(Prism::Location)) } - def equal_loc; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#5378 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#5254 - sig { returns(T::Array[Symbol]) } - def locals; end - - # attr_reader locals_body_index: Integer - # - # source://prism//lib/prism/node.rb#5257 - sig { returns(Integer) } - def locals_body_index; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#5358 - sig { returns(T.nilable(String)) } - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#5266 - sig { returns(T.nilable(Prism::Location)) } - def lparen_loc; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#5239 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#5242 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String? - # - # source://prism//lib/prism/node.rb#5353 - sig { returns(T.nilable(String)) } - def operator; end - - # attr_reader operator_loc: Location? - # - # source://prism//lib/prism/node.rb#5263 - sig { returns(T.nilable(Prism::Location)) } - def operator_loc; end - - # attr_reader parameters: ParametersNode? - # - # source://prism//lib/prism/node.rb#5248 - sig { returns(T.nilable(Prism::ParametersNode)) } - def parameters; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#5245 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#5363 - sig { returns(T.nilable(String)) } - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#5269 - sig { returns(T.nilable(Prism::Location)) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5425 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5435 - def type; end - end -end - -# Represents the use of the `defined?` keyword. -# -# defined?(a) -# ^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#5444 -class Prism::DefinedNode < ::Prism::Node - # def initialize: (lparen_loc: Location?, value: Node, rparen_loc: Location?, keyword_loc: Location, location: Location) -> void - # - # @return [DefinedNode] a new instance of DefinedNode - # - # source://prism//lib/prism/node.rb#5458 - 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 - ).void - end - def initialize(lparen_loc, value, rparen_loc, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#5467 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5472 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5482 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5477 - def compact_child_nodes; end - - # def copy: (**params) -> DefinedNode - # - # source://prism//lib/prism/node.rb#5487 - sig { params(params: T.untyped).returns(Prism::DefinedNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5472 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#5501 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#5521 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#5516 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#5455 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#5506 - sig { returns(T.nilable(String)) } - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#5446 - sig { returns(T.nilable(Prism::Location)) } - def lparen_loc; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#5511 - sig { returns(T.nilable(String)) } - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#5452 - sig { returns(T.nilable(Prism::Location)) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5545 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#5449 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5555 - def type; end - end -end - -# DesugarCompiler is a compiler that desugars Ruby code into a more primitive -# form. This is useful for consumers that want to deal with fewer node types. -# -# source://prism//lib/prism/desugar_compiler.rb#6 -class Prism::DesugarCompiler < ::Prism::MutationCompiler - # @@foo &&= bar - # - # becomes - # - # @@foo && @@foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#12 - def visit_class_variable_and_write_node(node); end - - # @@foo += bar - # - # becomes - # - # @@foo = @@foo + bar - # - # source://prism//lib/prism/desugar_compiler.rb#30 - def visit_class_variable_operator_write_node(node); end - - # @@foo ||= bar - # - # becomes - # - # defined?(@@foo) ? @@foo : @@foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#21 - def visit_class_variable_or_write_node(node); end - - # Foo &&= bar - # - # becomes - # - # Foo && Foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#39 - def visit_constant_and_write_node(node); end - - # Foo += bar - # - # becomes - # - # Foo = Foo + bar - # - # source://prism//lib/prism/desugar_compiler.rb#57 - def visit_constant_operator_write_node(node); end - - # Foo ||= bar - # - # becomes - # - # defined?(Foo) ? Foo : Foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#48 - def visit_constant_or_write_node(node); end - - # $foo &&= bar - # - # becomes - # - # $foo && $foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#66 - def visit_global_variable_and_write_node(node); end - - # $foo += bar - # - # becomes - # - # $foo = $foo + bar - # - # source://prism//lib/prism/desugar_compiler.rb#84 - def visit_global_variable_operator_write_node(node); end - - # $foo ||= bar - # - # becomes - # - # defined?($foo) ? $foo : $foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#75 - def visit_global_variable_or_write_node(node); end - - # becomes - # - # source://prism//lib/prism/desugar_compiler.rb#93 - def visit_instance_variable_and_write_node(node); end - - # becomes - # - # source://prism//lib/prism/desugar_compiler.rb#111 - def visit_instance_variable_operator_write_node(node); end - - # becomes - # - # source://prism//lib/prism/desugar_compiler.rb#102 - def visit_instance_variable_or_write_node(node); end - - # foo &&= bar - # - # becomes - # - # foo && foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#120 - def visit_local_variable_and_write_node(node); end - - # foo += bar - # - # becomes - # - # foo = foo + bar - # - # source://prism//lib/prism/desugar_compiler.rb#138 - def visit_local_variable_operator_write_node(node); end - - # foo ||= bar - # - # becomes - # - # foo || foo = bar - # - # source://prism//lib/prism/desugar_compiler.rb#129 - def visit_local_variable_or_write_node(node); end - - private - - # Desugar `x &&= y` to `x && x = y` - # - # source://prism//lib/prism/desugar_compiler.rb#145 - def desugar_and_write_node(node, read_class, write_class, *arguments); end - - # Desugar `x += y` to `x = x + y` - # - # source://prism//lib/prism/desugar_compiler.rb#155 - def desugar_operator_write_node(node, read_class, write_class, *arguments); end - - # Desugar `x ||= y` to `defined?(x) ? x : x = y` - # - # source://prism//lib/prism/desugar_compiler.rb#187 - def desugar_or_write_defined_node(node, read_class, write_class, *arguments); end - - # Desugar `x ||= y` to `x || x = y` - # - # source://prism//lib/prism/desugar_compiler.rb#177 - def desugar_or_write_node(node, read_class, write_class, *arguments); end -end - -# The dispatcher class fires events for nodes that are found while walking an -# AST to all registered listeners. It's useful for performing different types -# of analysis on the AST while only having to walk the tree once. -# -# To use the dispatcher, you would first instantiate it and register listeners -# for the events you're interested in: -# -# class OctalListener -# def on_integer_node_enter(node) -# if node.octal? && !node.slice.start_with?("0o") -# warn("Octal integers should be written with the 0o prefix") -# end -# end -# end -# -# dispatcher = Dispatcher.new -# dispatcher.register(listener, :on_integer_node_enter) -# -# Then, you can walk any number of trees and dispatch events to the listeners: -# -# result = Prism.parse("001 + 002 + 003") -# dispatcher.dispatch(result.value) -# -# Optionally, you can also use `#dispatch_once` to dispatch enter and leave -# events for a single node without recursing further down the tree. This can -# be useful in circumstances where you want to reuse the listeners you already -# have registers but want to stop walking the tree at a certain point. -# -# integer = result.value.statements.body.first.receiver.receiver -# dispatcher.dispatch_once(integer) -# -# source://prism//lib/prism/dispatcher.rb#40 -class Prism::Dispatcher < ::Prism::Visitor - # Initialize a new dispatcher. - # - # @return [Dispatcher] a new instance of Dispatcher - # - # source://prism//lib/prism/dispatcher.rb#45 - def initialize; end - - # Walks `root` dispatching events to all registered listeners. - # - # def dispatch: (Node) -> void - # - # source://prism//lib/prism/visitor.rb#16 - def dispatch(node); end - - # Dispatches a single event for `node` to all registered listeners. - # - # def dispatch_once: (Node) -> void - # - # source://prism//lib/prism/dispatcher.rb#64 - def dispatch_once(node); end - - # attr_reader listeners: Hash[Symbol, Array[Listener]] - # - # source://prism//lib/prism/dispatcher.rb#42 - def listeners; end - - # Register a listener for one or more events. - # - # def register: (Listener, *Symbol) -> void - # - # source://prism//lib/prism/dispatcher.rb#52 - def register(listener, *events); end - - # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#70 - def visit_alias_global_variable_node(node); end - - # Dispatch enter and leave events for AliasMethodNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#78 - def visit_alias_method_node(node); end - - # Dispatch enter and leave events for AlternationPatternNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#86 - def visit_alternation_pattern_node(node); end - - # Dispatch enter and leave events for AndNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#94 - def visit_and_node(node); end - - # Dispatch enter and leave events for ArgumentsNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#102 - def visit_arguments_node(node); end - - # Dispatch enter and leave events for ArrayNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#110 - def visit_array_node(node); end - - # Dispatch enter and leave events for ArrayPatternNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#118 - def visit_array_pattern_node(node); end - - # Dispatch enter and leave events for AssocNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#126 - def visit_assoc_node(node); end - - # Dispatch enter and leave events for AssocSplatNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#134 - def visit_assoc_splat_node(node); end - - # Dispatch enter and leave events for BackReferenceReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#142 - def visit_back_reference_read_node(node); end - - # Dispatch enter and leave events for BeginNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#150 - def visit_begin_node(node); end - - # Dispatch enter and leave events for BlockArgumentNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#158 - def visit_block_argument_node(node); end - - # Dispatch enter and leave events for BlockLocalVariableNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#166 - def visit_block_local_variable_node(node); end - - # Dispatch enter and leave events for BlockNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#174 - def visit_block_node(node); end - - # Dispatch enter and leave events for BlockParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#182 - def visit_block_parameter_node(node); end - - # Dispatch enter and leave events for BlockParametersNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#190 - def visit_block_parameters_node(node); end - - # Dispatch enter and leave events for BreakNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#198 - def visit_break_node(node); end - - # Dispatch enter and leave events for CallAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#206 - def visit_call_and_write_node(node); end - - # Dispatch enter and leave events for CallNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#214 - def visit_call_node(node); end - - # Dispatch enter and leave events for CallOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#222 - def visit_call_operator_write_node(node); end - - # Dispatch enter and leave events for CallOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#230 - def visit_call_or_write_node(node); end - - # Dispatch enter and leave events for CallTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#238 - def visit_call_target_node(node); end - - # Dispatch enter and leave events for CapturePatternNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#246 - def visit_capture_pattern_node(node); end - - # Dispatch enter and leave events for CaseMatchNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#254 - def visit_case_match_node(node); end - - # Dispatch enter and leave events for CaseNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#262 - def visit_case_node(node); end - - # Dispatch enter and leave events for ClassNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#270 - def visit_class_node(node); end - - # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#278 - def visit_class_variable_and_write_node(node); end - - # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#286 - def visit_class_variable_operator_write_node(node); end - - # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#294 - def visit_class_variable_or_write_node(node); end - - # Dispatch enter and leave events for ClassVariableReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#302 - def visit_class_variable_read_node(node); end - - # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#310 - def visit_class_variable_target_node(node); end - - # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#318 - def visit_class_variable_write_node(node); end - - # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#326 - def visit_constant_and_write_node(node); end - - # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#334 - def visit_constant_operator_write_node(node); end - - # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#342 - def visit_constant_or_write_node(node); end - - # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#350 - def visit_constant_path_and_write_node(node); end - - # Dispatch enter and leave events for ConstantPathNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#358 - def visit_constant_path_node(node); end - - # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#366 - def visit_constant_path_operator_write_node(node); end - - # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#374 - def visit_constant_path_or_write_node(node); end - - # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#382 - def visit_constant_path_target_node(node); end - - # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#390 - def visit_constant_path_write_node(node); end - - # Dispatch enter and leave events for ConstantReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#398 - def visit_constant_read_node(node); end - - # Dispatch enter and leave events for ConstantTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#406 - def visit_constant_target_node(node); end - - # Dispatch enter and leave events for ConstantWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#414 - def visit_constant_write_node(node); end - - # Dispatch enter and leave events for DefNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#422 - def visit_def_node(node); end - - # Dispatch enter and leave events for DefinedNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#430 - def visit_defined_node(node); end - - # Dispatch enter and leave events for ElseNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#438 - def visit_else_node(node); end - - # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#446 - def visit_embedded_statements_node(node); end - - # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#454 - def visit_embedded_variable_node(node); end - - # Dispatch enter and leave events for EnsureNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#462 - def visit_ensure_node(node); end - - # Dispatch enter and leave events for FalseNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#470 - def visit_false_node(node); end - - # Dispatch enter and leave events for FindPatternNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#478 - def visit_find_pattern_node(node); end - - # Dispatch enter and leave events for FlipFlopNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#486 - def visit_flip_flop_node(node); end - - # Dispatch enter and leave events for FloatNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#494 - def visit_float_node(node); end - - # Dispatch enter and leave events for ForNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#502 - def visit_for_node(node); end - - # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#510 - def visit_forwarding_arguments_node(node); end - - # Dispatch enter and leave events for ForwardingParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#518 - def visit_forwarding_parameter_node(node); end - - # Dispatch enter and leave events for ForwardingSuperNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#526 - def visit_forwarding_super_node(node); end - - # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#534 - def visit_global_variable_and_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#542 - def visit_global_variable_operator_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#550 - def visit_global_variable_or_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#558 - def visit_global_variable_read_node(node); end - - # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#566 - def visit_global_variable_target_node(node); end - - # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#574 - def visit_global_variable_write_node(node); end - - # Dispatch enter and leave events for HashNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#582 - def visit_hash_node(node); end - - # Dispatch enter and leave events for HashPatternNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#590 - def visit_hash_pattern_node(node); end - - # Dispatch enter and leave events for IfNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#598 - def visit_if_node(node); end - - # Dispatch enter and leave events for ImaginaryNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#606 - def visit_imaginary_node(node); end - - # Dispatch enter and leave events for ImplicitNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#614 - def visit_implicit_node(node); end - - # Dispatch enter and leave events for ImplicitRestNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#622 - def visit_implicit_rest_node(node); end - - # Dispatch enter and leave events for InNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#630 - def visit_in_node(node); end - - # Dispatch enter and leave events for IndexAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#638 - def visit_index_and_write_node(node); end - - # Dispatch enter and leave events for IndexOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#646 - def visit_index_operator_write_node(node); end - - # Dispatch enter and leave events for IndexOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#654 - def visit_index_or_write_node(node); end - - # Dispatch enter and leave events for IndexTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#662 - def visit_index_target_node(node); end - - # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#670 - def visit_instance_variable_and_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#678 - def visit_instance_variable_operator_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#686 - def visit_instance_variable_or_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#694 - def visit_instance_variable_read_node(node); end - - # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#702 - def visit_instance_variable_target_node(node); end - - # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#710 - def visit_instance_variable_write_node(node); end - - # Dispatch enter and leave events for IntegerNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#718 - def visit_integer_node(node); end - - # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#726 - def visit_interpolated_match_last_line_node(node); end - - # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#734 - def visit_interpolated_regular_expression_node(node); end - - # Dispatch enter and leave events for InterpolatedStringNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#742 - def visit_interpolated_string_node(node); end - - # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#750 - def visit_interpolated_symbol_node(node); end - - # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#758 - def visit_interpolated_x_string_node(node); end - - # Dispatch enter and leave events for KeywordHashNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#766 - def visit_keyword_hash_node(node); end - - # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#774 - def visit_keyword_rest_parameter_node(node); end - - # Dispatch enter and leave events for LambdaNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#782 - def visit_lambda_node(node); end - - # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#790 - def visit_local_variable_and_write_node(node); end - - # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#798 - def visit_local_variable_operator_write_node(node); end - - # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#806 - def visit_local_variable_or_write_node(node); end - - # Dispatch enter and leave events for LocalVariableReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#814 - def visit_local_variable_read_node(node); end - - # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#822 - def visit_local_variable_target_node(node); end - - # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#830 - def visit_local_variable_write_node(node); end - - # Dispatch enter and leave events for MatchLastLineNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#838 - def visit_match_last_line_node(node); end - - # Dispatch enter and leave events for MatchPredicateNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#846 - def visit_match_predicate_node(node); end - - # Dispatch enter and leave events for MatchRequiredNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#854 - def visit_match_required_node(node); end - - # Dispatch enter and leave events for MatchWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#862 - def visit_match_write_node(node); end - - # Dispatch enter and leave events for MissingNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#870 - def visit_missing_node(node); end - - # Dispatch enter and leave events for ModuleNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#878 - def visit_module_node(node); end - - # Dispatch enter and leave events for MultiTargetNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#886 - def visit_multi_target_node(node); end - - # Dispatch enter and leave events for MultiWriteNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#894 - def visit_multi_write_node(node); end - - # Dispatch enter and leave events for NextNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#902 - def visit_next_node(node); end - - # Dispatch enter and leave events for NilNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#910 - def visit_nil_node(node); end - - # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#918 - def visit_no_keywords_parameter_node(node); end - - # Dispatch enter and leave events for NumberedParametersNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#926 - def visit_numbered_parameters_node(node); end - - # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#934 - def visit_numbered_reference_read_node(node); end - - # Dispatch enter and leave events for OptionalKeywordParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#942 - def visit_optional_keyword_parameter_node(node); end - - # Dispatch enter and leave events for OptionalParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#950 - def visit_optional_parameter_node(node); end - - # Dispatch enter and leave events for OrNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#958 - def visit_or_node(node); end - - # Dispatch enter and leave events for ParametersNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#966 - def visit_parameters_node(node); end - - # Dispatch enter and leave events for ParenthesesNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#974 - def visit_parentheses_node(node); end - - # Dispatch enter and leave events for PinnedExpressionNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#982 - def visit_pinned_expression_node(node); end - - # Dispatch enter and leave events for PinnedVariableNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#990 - def visit_pinned_variable_node(node); end - - # Dispatch enter and leave events for PostExecutionNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#998 - def visit_post_execution_node(node); end - - # Dispatch enter and leave events for PreExecutionNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1006 - def visit_pre_execution_node(node); end - - # Dispatch enter and leave events for ProgramNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1014 - def visit_program_node(node); end - - # Dispatch enter and leave events for RangeNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1022 - def visit_range_node(node); end - - # Dispatch enter and leave events for RationalNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1030 - def visit_rational_node(node); end - - # Dispatch enter and leave events for RedoNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1038 - def visit_redo_node(node); end - - # Dispatch enter and leave events for RegularExpressionNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1046 - def visit_regular_expression_node(node); end - - # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1054 - def visit_required_keyword_parameter_node(node); end - - # Dispatch enter and leave events for RequiredParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1062 - def visit_required_parameter_node(node); end - - # Dispatch enter and leave events for RescueModifierNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1070 - def visit_rescue_modifier_node(node); end - - # Dispatch enter and leave events for RescueNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1078 - def visit_rescue_node(node); end - - # Dispatch enter and leave events for RestParameterNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1086 - def visit_rest_parameter_node(node); end - - # Dispatch enter and leave events for RetryNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1094 - def visit_retry_node(node); end - - # Dispatch enter and leave events for ReturnNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1102 - def visit_return_node(node); end - - # Dispatch enter and leave events for SelfNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1110 - def visit_self_node(node); end - - # Dispatch enter and leave events for SingletonClassNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1118 - def visit_singleton_class_node(node); end - - # Dispatch enter and leave events for SourceEncodingNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1126 - def visit_source_encoding_node(node); end - - # Dispatch enter and leave events for SourceFileNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1134 - def visit_source_file_node(node); end - - # Dispatch enter and leave events for SourceLineNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1142 - def visit_source_line_node(node); end - - # Dispatch enter and leave events for SplatNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1150 - def visit_splat_node(node); end - - # Dispatch enter and leave events for StatementsNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1158 - def visit_statements_node(node); end - - # Dispatch enter and leave events for StringNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1166 - def visit_string_node(node); end - - # Dispatch enter and leave events for SuperNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1174 - def visit_super_node(node); end - - # Dispatch enter and leave events for SymbolNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1182 - def visit_symbol_node(node); end - - # Dispatch enter and leave events for TrueNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1190 - def visit_true_node(node); end - - # Dispatch enter and leave events for UndefNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1198 - def visit_undef_node(node); end - - # Dispatch enter and leave events for UnlessNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1206 - def visit_unless_node(node); end - - # Dispatch enter and leave events for UntilNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1214 - def visit_until_node(node); end - - # Dispatch enter and leave events for WhenNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1222 - def visit_when_node(node); end - - # Dispatch enter and leave events for WhileNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1230 - def visit_while_node(node); end - - # Dispatch enter and leave events for XStringNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1238 - def visit_x_string_node(node); end - - # Dispatch enter and leave events for YieldNode nodes and continue - # walking the tree. - # - # source://prism//lib/prism/dispatcher.rb#1246 - def visit_yield_node(node); end -end - -# source://prism//lib/prism/dispatcher.rb#1252 -class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor - # @return [DispatchOnce] a new instance of DispatchOnce - # - # source://prism//lib/prism/dispatcher.rb#1255 - def initialize(listeners); end - - # Returns the value of attribute listeners. - # - # source://prism//lib/prism/dispatcher.rb#1253 - def listeners; end - - # Dispatch enter and leave events for AliasGlobalVariableNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1260 - def visit_alias_global_variable_node(node); end - - # Dispatch enter and leave events for AliasMethodNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1266 - def visit_alias_method_node(node); end - - # Dispatch enter and leave events for AlternationPatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1272 - def visit_alternation_pattern_node(node); end - - # Dispatch enter and leave events for AndNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1278 - def visit_and_node(node); end - - # Dispatch enter and leave events for ArgumentsNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1284 - def visit_arguments_node(node); end - - # Dispatch enter and leave events for ArrayNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1290 - def visit_array_node(node); end - - # Dispatch enter and leave events for ArrayPatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1296 - def visit_array_pattern_node(node); end - - # Dispatch enter and leave events for AssocNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1302 - def visit_assoc_node(node); end - - # Dispatch enter and leave events for AssocSplatNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1308 - def visit_assoc_splat_node(node); end - - # Dispatch enter and leave events for BackReferenceReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1314 - def visit_back_reference_read_node(node); end - - # Dispatch enter and leave events for BeginNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1320 - def visit_begin_node(node); end - - # Dispatch enter and leave events for BlockArgumentNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1326 - def visit_block_argument_node(node); end - - # Dispatch enter and leave events for BlockLocalVariableNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1332 - def visit_block_local_variable_node(node); end - - # Dispatch enter and leave events for BlockNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1338 - def visit_block_node(node); end - - # Dispatch enter and leave events for BlockParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1344 - def visit_block_parameter_node(node); end - - # Dispatch enter and leave events for BlockParametersNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1350 - def visit_block_parameters_node(node); end - - # Dispatch enter and leave events for BreakNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1356 - def visit_break_node(node); end - - # Dispatch enter and leave events for CallAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1362 - def visit_call_and_write_node(node); end - - # Dispatch enter and leave events for CallNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1368 - def visit_call_node(node); end - - # Dispatch enter and leave events for CallOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1374 - def visit_call_operator_write_node(node); end - - # Dispatch enter and leave events for CallOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1380 - def visit_call_or_write_node(node); end - - # Dispatch enter and leave events for CallTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1386 - def visit_call_target_node(node); end - - # Dispatch enter and leave events for CapturePatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1392 - def visit_capture_pattern_node(node); end - - # Dispatch enter and leave events for CaseMatchNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1398 - def visit_case_match_node(node); end - - # Dispatch enter and leave events for CaseNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1404 - def visit_case_node(node); end - - # Dispatch enter and leave events for ClassNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1410 - def visit_class_node(node); end - - # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1416 - def visit_class_variable_and_write_node(node); end - - # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1422 - def visit_class_variable_operator_write_node(node); end - - # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1428 - def visit_class_variable_or_write_node(node); end - - # Dispatch enter and leave events for ClassVariableReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1434 - def visit_class_variable_read_node(node); end - - # Dispatch enter and leave events for ClassVariableTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1440 - def visit_class_variable_target_node(node); end - - # Dispatch enter and leave events for ClassVariableWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1446 - def visit_class_variable_write_node(node); end - - # Dispatch enter and leave events for ConstantAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1452 - def visit_constant_and_write_node(node); end - - # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1458 - def visit_constant_operator_write_node(node); end - - # Dispatch enter and leave events for ConstantOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1464 - def visit_constant_or_write_node(node); end - - # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1470 - def visit_constant_path_and_write_node(node); end - - # Dispatch enter and leave events for ConstantPathNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1476 - def visit_constant_path_node(node); end - - # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1482 - def visit_constant_path_operator_write_node(node); end - - # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1488 - def visit_constant_path_or_write_node(node); end - - # Dispatch enter and leave events for ConstantPathTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1494 - def visit_constant_path_target_node(node); end - - # Dispatch enter and leave events for ConstantPathWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1500 - def visit_constant_path_write_node(node); end - - # Dispatch enter and leave events for ConstantReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1506 - def visit_constant_read_node(node); end - - # Dispatch enter and leave events for ConstantTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1512 - def visit_constant_target_node(node); end - - # Dispatch enter and leave events for ConstantWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1518 - def visit_constant_write_node(node); end - - # Dispatch enter and leave events for DefNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1524 - def visit_def_node(node); end - - # Dispatch enter and leave events for DefinedNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1530 - def visit_defined_node(node); end - - # Dispatch enter and leave events for ElseNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1536 - def visit_else_node(node); end - - # Dispatch enter and leave events for EmbeddedStatementsNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1542 - def visit_embedded_statements_node(node); end - - # Dispatch enter and leave events for EmbeddedVariableNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1548 - def visit_embedded_variable_node(node); end - - # Dispatch enter and leave events for EnsureNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1554 - def visit_ensure_node(node); end - - # Dispatch enter and leave events for FalseNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1560 - def visit_false_node(node); end - - # Dispatch enter and leave events for FindPatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1566 - def visit_find_pattern_node(node); end - - # Dispatch enter and leave events for FlipFlopNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1572 - def visit_flip_flop_node(node); end - - # Dispatch enter and leave events for FloatNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1578 - def visit_float_node(node); end - - # Dispatch enter and leave events for ForNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1584 - def visit_for_node(node); end - - # Dispatch enter and leave events for ForwardingArgumentsNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1590 - def visit_forwarding_arguments_node(node); end - - # Dispatch enter and leave events for ForwardingParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1596 - def visit_forwarding_parameter_node(node); end - - # Dispatch enter and leave events for ForwardingSuperNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1602 - def visit_forwarding_super_node(node); end - - # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1608 - def visit_global_variable_and_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1614 - def visit_global_variable_operator_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1620 - def visit_global_variable_or_write_node(node); end - - # Dispatch enter and leave events for GlobalVariableReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1626 - def visit_global_variable_read_node(node); end - - # Dispatch enter and leave events for GlobalVariableTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1632 - def visit_global_variable_target_node(node); end - - # Dispatch enter and leave events for GlobalVariableWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1638 - def visit_global_variable_write_node(node); end - - # Dispatch enter and leave events for HashNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1644 - def visit_hash_node(node); end - - # Dispatch enter and leave events for HashPatternNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1650 - def visit_hash_pattern_node(node); end - - # Dispatch enter and leave events for IfNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1656 - def visit_if_node(node); end - - # Dispatch enter and leave events for ImaginaryNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1662 - def visit_imaginary_node(node); end - - # Dispatch enter and leave events for ImplicitNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1668 - def visit_implicit_node(node); end - - # Dispatch enter and leave events for ImplicitRestNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1674 - def visit_implicit_rest_node(node); end - - # Dispatch enter and leave events for InNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1680 - def visit_in_node(node); end - - # Dispatch enter and leave events for IndexAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1686 - def visit_index_and_write_node(node); end - - # Dispatch enter and leave events for IndexOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1692 - def visit_index_operator_write_node(node); end - - # Dispatch enter and leave events for IndexOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1698 - def visit_index_or_write_node(node); end - - # Dispatch enter and leave events for IndexTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1704 - def visit_index_target_node(node); end - - # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1710 - def visit_instance_variable_and_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1716 - def visit_instance_variable_operator_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1722 - def visit_instance_variable_or_write_node(node); end - - # Dispatch enter and leave events for InstanceVariableReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1728 - def visit_instance_variable_read_node(node); end - - # Dispatch enter and leave events for InstanceVariableTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1734 - def visit_instance_variable_target_node(node); end - - # Dispatch enter and leave events for InstanceVariableWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1740 - def visit_instance_variable_write_node(node); end - - # Dispatch enter and leave events for IntegerNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1746 - def visit_integer_node(node); end - - # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1752 - def visit_interpolated_match_last_line_node(node); end - - # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1758 - def visit_interpolated_regular_expression_node(node); end - - # Dispatch enter and leave events for InterpolatedStringNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1764 - def visit_interpolated_string_node(node); end - - # Dispatch enter and leave events for InterpolatedSymbolNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1770 - def visit_interpolated_symbol_node(node); end - - # Dispatch enter and leave events for InterpolatedXStringNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1776 - def visit_interpolated_x_string_node(node); end - - # Dispatch enter and leave events for KeywordHashNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1782 - def visit_keyword_hash_node(node); end - - # Dispatch enter and leave events for KeywordRestParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1788 - def visit_keyword_rest_parameter_node(node); end - - # Dispatch enter and leave events for LambdaNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1794 - def visit_lambda_node(node); end - - # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1800 - def visit_local_variable_and_write_node(node); end - - # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1806 - def visit_local_variable_operator_write_node(node); end - - # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1812 - def visit_local_variable_or_write_node(node); end - - # Dispatch enter and leave events for LocalVariableReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1818 - def visit_local_variable_read_node(node); end - - # Dispatch enter and leave events for LocalVariableTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1824 - def visit_local_variable_target_node(node); end - - # Dispatch enter and leave events for LocalVariableWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1830 - def visit_local_variable_write_node(node); end - - # Dispatch enter and leave events for MatchLastLineNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1836 - def visit_match_last_line_node(node); end - - # Dispatch enter and leave events for MatchPredicateNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1842 - def visit_match_predicate_node(node); end - - # Dispatch enter and leave events for MatchRequiredNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1848 - def visit_match_required_node(node); end - - # Dispatch enter and leave events for MatchWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1854 - def visit_match_write_node(node); end - - # Dispatch enter and leave events for MissingNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1860 - def visit_missing_node(node); end - - # Dispatch enter and leave events for ModuleNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1866 - def visit_module_node(node); end - - # Dispatch enter and leave events for MultiTargetNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1872 - def visit_multi_target_node(node); end - - # Dispatch enter and leave events for MultiWriteNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1878 - def visit_multi_write_node(node); end - - # Dispatch enter and leave events for NextNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1884 - def visit_next_node(node); end - - # Dispatch enter and leave events for NilNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1890 - def visit_nil_node(node); end - - # Dispatch enter and leave events for NoKeywordsParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1896 - def visit_no_keywords_parameter_node(node); end - - # Dispatch enter and leave events for NumberedParametersNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1902 - def visit_numbered_parameters_node(node); end - - # Dispatch enter and leave events for NumberedReferenceReadNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1908 - def visit_numbered_reference_read_node(node); end - - # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1914 - def visit_optional_keyword_parameter_node(node); end - - # Dispatch enter and leave events for OptionalParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1920 - def visit_optional_parameter_node(node); end - - # Dispatch enter and leave events for OrNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1926 - def visit_or_node(node); end - - # Dispatch enter and leave events for ParametersNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1932 - def visit_parameters_node(node); end - - # Dispatch enter and leave events for ParenthesesNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1938 - def visit_parentheses_node(node); end - - # Dispatch enter and leave events for PinnedExpressionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1944 - def visit_pinned_expression_node(node); end - - # Dispatch enter and leave events for PinnedVariableNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1950 - def visit_pinned_variable_node(node); end - - # Dispatch enter and leave events for PostExecutionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1956 - def visit_post_execution_node(node); end - - # Dispatch enter and leave events for PreExecutionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1962 - def visit_pre_execution_node(node); end - - # Dispatch enter and leave events for ProgramNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1968 - def visit_program_node(node); end - - # Dispatch enter and leave events for RangeNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1974 - def visit_range_node(node); end - - # Dispatch enter and leave events for RationalNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1980 - def visit_rational_node(node); end - - # Dispatch enter and leave events for RedoNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1986 - def visit_redo_node(node); end - - # Dispatch enter and leave events for RegularExpressionNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1992 - def visit_regular_expression_node(node); end - - # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#1998 - def visit_required_keyword_parameter_node(node); end - - # Dispatch enter and leave events for RequiredParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2004 - def visit_required_parameter_node(node); end - - # Dispatch enter and leave events for RescueModifierNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2010 - def visit_rescue_modifier_node(node); end - - # Dispatch enter and leave events for RescueNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2016 - def visit_rescue_node(node); end - - # Dispatch enter and leave events for RestParameterNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2022 - def visit_rest_parameter_node(node); end - - # Dispatch enter and leave events for RetryNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2028 - def visit_retry_node(node); end - - # Dispatch enter and leave events for ReturnNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2034 - def visit_return_node(node); end - - # Dispatch enter and leave events for SelfNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2040 - def visit_self_node(node); end - - # Dispatch enter and leave events for SingletonClassNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2046 - def visit_singleton_class_node(node); end - - # Dispatch enter and leave events for SourceEncodingNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2052 - def visit_source_encoding_node(node); end - - # Dispatch enter and leave events for SourceFileNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2058 - def visit_source_file_node(node); end - - # Dispatch enter and leave events for SourceLineNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2064 - def visit_source_line_node(node); end - - # Dispatch enter and leave events for SplatNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2070 - def visit_splat_node(node); end - - # Dispatch enter and leave events for StatementsNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2076 - def visit_statements_node(node); end - - # Dispatch enter and leave events for StringNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2082 - def visit_string_node(node); end - - # Dispatch enter and leave events for SuperNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2088 - def visit_super_node(node); end - - # Dispatch enter and leave events for SymbolNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2094 - def visit_symbol_node(node); end - - # Dispatch enter and leave events for TrueNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2100 - def visit_true_node(node); end - - # Dispatch enter and leave events for UndefNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2106 - def visit_undef_node(node); end - - # Dispatch enter and leave events for UnlessNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2112 - def visit_unless_node(node); end - - # Dispatch enter and leave events for UntilNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2118 - def visit_until_node(node); end - - # Dispatch enter and leave events for WhenNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2124 - def visit_when_node(node); end - - # Dispatch enter and leave events for WhileNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2130 - def visit_while_node(node); end - - # Dispatch enter and leave events for XStringNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2136 - def visit_x_string_node(node); end - - # Dispatch enter and leave events for YieldNode nodes. - # - # source://prism//lib/prism/dispatcher.rb#2142 - def visit_yield_node(node); end -end - -# This visitor provides the ability to call Node#to_dot, which converts a -# subtree into a graphviz dot graph. -# -# source://prism//lib/prism/dot_visitor.rb#13 -class Prism::DotVisitor < ::Prism::Visitor - # Initialize a new dot visitor. - # - # @return [DotVisitor] a new instance of DotVisitor - # - # source://prism//lib/prism/dot_visitor.rb#105 - def initialize; end - - # The digraph that is being built. - # - # source://prism//lib/prism/dot_visitor.rb#102 - def digraph; end - - # Convert this visitor into a graphviz dot graph string. - # - # source://prism//lib/prism/dot_visitor.rb#110 - def to_dot; end - - # Visit a AliasGlobalVariableNode node. - # - # source://prism//lib/prism/dot_visitor.rb#115 - def visit_alias_global_variable_node(node); end - - # Visit a AliasMethodNode node. - # - # source://prism//lib/prism/dot_visitor.rb#140 - def visit_alias_method_node(node); end - - # Visit a AlternationPatternNode node. - # - # source://prism//lib/prism/dot_visitor.rb#165 - def visit_alternation_pattern_node(node); end - - # Visit a AndNode node. - # - # source://prism//lib/prism/dot_visitor.rb#190 - def visit_and_node(node); end - - # Visit a ArgumentsNode node. - # - # source://prism//lib/prism/dot_visitor.rb#215 - def visit_arguments_node(node); end - - # Visit a ArrayNode node. - # - # source://prism//lib/prism/dot_visitor.rb#245 - def visit_array_node(node); end - - # Visit a ArrayPatternNode node. - # - # source://prism//lib/prism/dot_visitor.rb#285 - def visit_array_pattern_node(node); end - - # Visit a AssocNode node. - # - # source://prism//lib/prism/dot_visitor.rb#347 - def visit_assoc_node(node); end - - # Visit a AssocSplatNode node. - # - # source://prism//lib/prism/dot_visitor.rb#376 - def visit_assoc_splat_node(node); end - - # Visit a BackReferenceReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#399 - def visit_back_reference_read_node(node); end - - # Visit a BeginNode node. - # - # source://prism//lib/prism/dot_visitor.rb#416 - def visit_begin_node(node); end - - # Visit a BlockArgumentNode node. - # - # source://prism//lib/prism/dot_visitor.rb#464 - def visit_block_argument_node(node); end - - # Visit a BlockLocalVariableNode node. - # - # source://prism//lib/prism/dot_visitor.rb#487 - def visit_block_local_variable_node(node); end - - # Visit a BlockNode node. - # - # source://prism//lib/prism/dot_visitor.rb#504 - def visit_block_node(node); end - - # Visit a BlockParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#542 - def visit_block_parameter_node(node); end - - # Visit a BlockParametersNode node. - # - # source://prism//lib/prism/dot_visitor.rb#567 - def visit_block_parameters_node(node); end - - # Visit a BreakNode node. - # - # source://prism//lib/prism/dot_visitor.rb#610 - def visit_break_node(node); end - - # Visit a CallAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#633 - def visit_call_and_write_node(node); end - - # Visit a CallNode node. - # - # source://prism//lib/prism/dot_visitor.rb#679 - def visit_call_node(node); end - - # Visit a CallOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#737 - def visit_call_operator_write_node(node); end - - # Visit a CallOrWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#786 - def visit_call_or_write_node(node); end - - # Visit a CallTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#832 - def visit_call_target_node(node); end - - # Visit a CapturePatternNode node. - # - # source://prism//lib/prism/dot_visitor.rb#862 - def visit_capture_pattern_node(node); end - - # Visit a CaseMatchNode node. - # - # source://prism//lib/prism/dot_visitor.rb#887 - def visit_case_match_node(node); end - - # Visit a CaseNode node. - # - # source://prism//lib/prism/dot_visitor.rb#932 - def visit_case_node(node); end - - # Visit a ClassNode node. - # - # source://prism//lib/prism/dot_visitor.rb#977 - def visit_class_node(node); end - - # Visit a ClassVariableAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1024 - def visit_class_variable_and_write_node(node); end - - # Visit a ClassVariableOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1051 - def visit_class_variable_operator_write_node(node); end - - # Visit a ClassVariableOrWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1081 - def visit_class_variable_or_write_node(node); end - - # Visit a ClassVariableReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1108 - def visit_class_variable_read_node(node); end - - # Visit a ClassVariableTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1125 - def visit_class_variable_target_node(node); end - - # Visit a ClassVariableWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1142 - def visit_class_variable_write_node(node); end - - # Visit a ConstantAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1171 - def visit_constant_and_write_node(node); end - - # Visit a ConstantOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1198 - def visit_constant_operator_write_node(node); end - - # Visit a ConstantOrWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1228 - def visit_constant_or_write_node(node); end - - # Visit a ConstantPathAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1255 - def visit_constant_path_and_write_node(node); end - - # Visit a ConstantPathNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1280 - def visit_constant_path_node(node); end - - # Visit a ConstantPathOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1307 - def visit_constant_path_operator_write_node(node); end - - # Visit a ConstantPathOrWriteNode node. - # - # 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#1360 - def visit_constant_path_target_node(node); end - - # Visit a ConstantPathWriteNode node. - # - # 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#1412 - def visit_constant_read_node(node); end - - # Visit a ConstantTargetNode node. - # - # 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#1446 - def visit_constant_write_node(node); end - - # Visit a DefNode node. - # - # 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#1545 - def visit_defined_node(node); end - - # Visit a ElseNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1576 - def visit_else_node(node); end - - # Visit a EmbeddedStatementsNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1604 - def visit_embedded_statements_node(node); end - - # Visit a EmbeddedVariableNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1630 - def visit_embedded_variable_node(node); end - - # Visit a EnsureNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1651 - def visit_ensure_node(node); end - - # Visit a FalseNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1677 - def visit_false_node(node); end - - # Visit a FindPatternNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1691 - def visit_find_pattern_node(node); end - - # Visit a FlipFlopNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1742 - def visit_flip_flop_node(node); end - - # Visit a FloatNode node. - # - # source://prism//lib/prism/dot_visitor.rb#1774 - def visit_float_node(node); end - - # Visit a ForNode node. - # - # 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#1830 - def visit_forwarding_arguments_node(node); end - - # Visit a ForwardingParameterNode node. - # - # 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#1858 - def visit_forwarding_super_node(node); end - - # Visit a GlobalVariableAndWriteNode node. - # - # 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#1905 - def visit_global_variable_operator_write_node(node); end - - # Visit a GlobalVariableOrWriteNode node. - # - # 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#1962 - def visit_global_variable_read_node(node); end - - # Visit a GlobalVariableTargetNode node. - # - # 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#1996 - def visit_global_variable_write_node(node); end - - # Visit a HashNode node. - # - # 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#2056 - def visit_hash_pattern_node(node); end - - # Visit a IfNode node. - # - # 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#2150 - def visit_imaginary_node(node); end - - # Visit a ImplicitNode node. - # - # 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#2186 - def visit_implicit_rest_node(node); end - - # Visit a InNode node. - # - # 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#2232 - def visit_index_and_write_node(node); end - - # Visit a IndexOperatorWriteNode node. - # - # 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#2341 - def visit_index_or_write_node(node); end - - # Visit a IndexTargetNode node. - # - # 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#2433 - def visit_instance_variable_and_write_node(node); end - - # Visit a InstanceVariableOperatorWriteNode node. - # - # 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#2490 - def visit_instance_variable_or_write_node(node); end - - # Visit a InstanceVariableReadNode node. - # - # 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#2534 - def visit_instance_variable_target_node(node); end - - # Visit a InstanceVariableWriteNode node. - # - # 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#2578 - def visit_integer_node(node); end - - # Visit a InterpolatedMatchLastLineNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2595 - def visit_interpolated_match_last_line_node(node); end - - # Visit a InterpolatedRegularExpressionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2631 - def visit_interpolated_regular_expression_node(node); end - - # Visit a InterpolatedStringNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2667 - def visit_interpolated_string_node(node); end - - # Visit a InterpolatedSymbolNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2704 - def visit_interpolated_symbol_node(node); end - - # Visit a InterpolatedXStringNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2741 - def visit_interpolated_x_string_node(node); end - - # Visit a KeywordHashNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2774 - def visit_keyword_hash_node(node); end - - # Visit a KeywordRestParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2804 - def visit_keyword_rest_parameter_node(node); end - - # Visit a LambdaNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2829 - def visit_lambda_node(node); end - - # Visit a LocalVariableAndWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2870 - def visit_local_variable_and_write_node(node); end - - # Visit a LocalVariableOperatorWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2900 - def visit_local_variable_operator_write_node(node); end - - # Visit a LocalVariableOrWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2933 - def visit_local_variable_or_write_node(node); end - - # Visit a LocalVariableReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2963 - def visit_local_variable_read_node(node); end - - # Visit a LocalVariableTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#2983 - def visit_local_variable_target_node(node); end - - # Visit a LocalVariableWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3003 - def visit_local_variable_write_node(node); end - - # Visit a MatchLastLineNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3033 - def visit_match_last_line_node(node); end - - # Visit a MatchPredicateNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3062 - def visit_match_predicate_node(node); end - - # Visit a MatchRequiredNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3087 - def visit_match_required_node(node); end - - # Visit a MatchWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3112 - def visit_match_write_node(node); end - - # Visit a MissingNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3143 - def visit_missing_node(node); end - - # Visit a ModuleNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3157 - def visit_module_node(node); end - - # Visit a MultiTargetNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3193 - def visit_multi_target_node(node); end - - # Visit a MultiWriteNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3249 - def visit_multi_write_node(node); end - - # Visit a NextNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3312 - def visit_next_node(node); end - - # Visit a NilNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3335 - def visit_nil_node(node); end - - # Visit a NoKeywordsParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3349 - def visit_no_keywords_parameter_node(node); end - - # Visit a NumberedParametersNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3369 - def visit_numbered_parameters_node(node); end - - # Visit a NumberedReferenceReadNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3386 - def visit_numbered_reference_read_node(node); end - - # Visit a OptionalKeywordParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3403 - def visit_optional_keyword_parameter_node(node); end - - # Visit a OptionalParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3427 - def visit_optional_parameter_node(node); end - - # Visit a OrNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3454 - def visit_or_node(node); end - - # Visit a ParametersNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3479 - def visit_parameters_node(node); end - - # Visit a ParenthesesNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3563 - def visit_parentheses_node(node); end - - # Visit a PinnedExpressionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3589 - def visit_pinned_expression_node(node); end - - # Visit a PinnedVariableNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3616 - def visit_pinned_variable_node(node); end - - # Visit a PostExecutionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3637 - def visit_post_execution_node(node); end - - # Visit a PreExecutionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3666 - def visit_pre_execution_node(node); end - - # Visit a ProgramNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3695 - def visit_program_node(node); end - - # Visit a RangeNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3716 - def visit_range_node(node); end - - # Visit a RationalNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3748 - def visit_rational_node(node); end - - # Visit a RedoNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3766 - def visit_redo_node(node); end - - # Visit a RegularExpressionNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3780 - def visit_regular_expression_node(node); end - - # Visit a RequiredKeywordParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3809 - def visit_required_keyword_parameter_node(node); end - - # Visit a RequiredParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3829 - def visit_required_parameter_node(node); end - - # Visit a RescueModifierNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3846 - def visit_rescue_modifier_node(node); end - - # Visit a RescueNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3871 - def visit_rescue_node(node); end - - # Visit a RestParameterNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3924 - def visit_rest_parameter_node(node); end - - # Visit a RetryNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3949 - def visit_retry_node(node); end - - # Visit a ReturnNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3963 - def visit_return_node(node); end - - # Visit a SelfNode node. - # - # source://prism//lib/prism/dot_visitor.rb#3986 - def visit_self_node(node); end - - # Visit a SingletonClassNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4000 - def visit_singleton_class_node(node); end - - # Visit a SourceEncodingNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4036 - def visit_source_encoding_node(node); end - - # Visit a SourceFileNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4050 - def visit_source_file_node(node); end - - # Visit a SourceLineNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4067 - def visit_source_line_node(node); end - - # Visit a SplatNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4081 - def visit_splat_node(node); end - - # Visit a StatementsNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4104 - def visit_statements_node(node); end - - # Visit a StringNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4131 - def visit_string_node(node); end - - # Visit a SuperNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4164 - def visit_super_node(node); end - - # Visit a SymbolNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4203 - def visit_symbol_node(node); end - - # Visit a TrueNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4238 - def visit_true_node(node); end - - # Visit a UndefNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4252 - def visit_undef_node(node); end - - # Visit a UnlessNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4282 - def visit_unless_node(node); end - - # Visit a UntilNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4325 - def visit_until_node(node); end - - # Visit a WhenNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4360 - def visit_when_node(node); end - - # Visit a WhileNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4396 - def visit_while_node(node); end - - # Visit a XStringNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4431 - def visit_x_string_node(node); end - - # Visit a YieldNode node. - # - # source://prism//lib/prism/dot_visitor.rb#4460 - def visit_yield_node(node); end - - private - - # Inspect a node that has arguments_node_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4506 - 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#4514 - 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#4522 - 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#4532 - 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#4541 - def integer_base_flags_inspect(node); end - - # Inspect a node that has keyword_hash_node_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4552 - 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#4500 - 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#4560 - def loop_flags_inspect(node); end - - # Generate a unique node ID for a node throughout the digraph. - # - # source://prism//lib/prism/dot_visitor.rb#4495 - def node_id(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#4568 - 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#4576 - def regular_expression_flags_inspect(node); end - - # Inspect a node that has string_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4594 - 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#4604 - def symbol_flags_inspect(node); end -end - -# source://prism//lib/prism/dot_visitor.rb#58 -class Prism::DotVisitor::Digraph - # @return [Digraph] a new instance of Digraph - # - # source://prism//lib/prism/dot_visitor.rb#61 - def initialize; end - - # source://prism//lib/prism/dot_visitor.rb#75 - def edge(value); end - - # Returns the value of attribute edges. - # - # source://prism//lib/prism/dot_visitor.rb#59 - def edges; end - - # source://prism//lib/prism/dot_visitor.rb#67 - def node(value); end - - # Returns the value of attribute nodes. - # - # source://prism//lib/prism/dot_visitor.rb#59 - def nodes; end - - # source://prism//lib/prism/dot_visitor.rb#79 - def to_dot; end - - # source://prism//lib/prism/dot_visitor.rb#71 - def waypoint(value); end - - # Returns the value of attribute waypoints. - # - # source://prism//lib/prism/dot_visitor.rb#59 - def waypoints; end -end - -# source://prism//lib/prism/dot_visitor.rb#14 -class Prism::DotVisitor::Field - # @return [Field] a new instance of Field - # - # source://prism//lib/prism/dot_visitor.rb#17 - def initialize(name, value, port); end - - # Returns the value of attribute name. - # - # source://prism//lib/prism/dot_visitor.rb#15 - def name; end - - # Returns the value of attribute port. - # - # source://prism//lib/prism/dot_visitor.rb#15 - def port; end - - # source://prism//lib/prism/dot_visitor.rb#23 - def to_dot; end - - # Returns the value of attribute value. - # - # source://prism//lib/prism/dot_visitor.rb#15 - def value; end -end - -# source://prism//lib/prism/dot_visitor.rb#32 -class Prism::DotVisitor::Table - # @return [Table] a new instance of Table - # - # source://prism//lib/prism/dot_visitor.rb#35 - def initialize(name); end - - # source://prism//lib/prism/dot_visitor.rb#40 - def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end - - # Returns the value of attribute fields. - # - # source://prism//lib/prism/dot_visitor.rb#33 - def fields; end - - # Returns the value of attribute name. - # - # source://prism//lib/prism/dot_visitor.rb#33 - def name; end - - # source://prism//lib/prism/dot_visitor.rb#44 - def to_dot; end -end - -# Represents an `else` clause in a `case`, `if`, or `unless` statement. -# -# if a then b else c end -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#5564 -class Prism::ElseNode < ::Prism::Node - # def initialize: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> void - # - # @return [ElseNode] a new instance of ElseNode - # - # source://prism//lib/prism/node.rb#5575 - sig do - params( - else_keyword_loc: Prism::Location, - statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location - ).void - end - def initialize(else_keyword_loc, statements, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#5583 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5588 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5600 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5593 - def compact_child_nodes; end - - # def copy: (**params) -> ElseNode - # - # source://prism//lib/prism/node.rb#5605 - sig { params(params: T.untyped).returns(Prism::ElseNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5588 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#5618 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def else_keyword: () -> String - # - # source://prism//lib/prism/node.rb#5623 - sig { returns(String) } - def else_keyword; end - - # attr_reader else_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#5566 - sig { returns(Prism::Location) } - def else_keyword_loc; end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#5628 - sig { returns(T.nilable(String)) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#5572 - sig { returns(T.nilable(Prism::Location)) } - def end_keyword_loc; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#5633 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#5569 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5660 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5670 - def type; end - end -end - -# EmbDocComment objects correspond to comments that are surrounded by =begin -# and =end. -# -# source://prism//lib/prism/parse_result.rb#260 -class Prism::EmbDocComment < ::Prism::Comment - # Returns a string representation of this comment. - # - # source://prism//lib/prism/parse_result.rb#267 - def inspect; end - - # This can only be true for inline comments. - # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#262 - def trailing?; end -end - -# Represents an interpolated set of statements. -# -# "foo #{bar}" -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#5679 -class Prism::EmbeddedStatementsNode < ::Prism::Node - # def initialize: (opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location) -> void - # - # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode - # - # source://prism//lib/prism/node.rb#5690 - sig do - params( - opening_loc: Prism::Location, - statements: T.nilable(Prism::StatementsNode), - closing_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(opening_loc, statements, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#5698 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5703 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#5743 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#5687 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5715 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5708 - def compact_child_nodes; end - - # def copy: (**params) -> EmbeddedStatementsNode - # - # source://prism//lib/prism/node.rb#5720 - sig { params(params: T.untyped).returns(Prism::EmbeddedStatementsNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5703 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#5733 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#5748 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#5738 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#5681 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#5684 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5775 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5785 - def type; end - end -end - -# Represents an interpolated variable. -# -# "foo #@bar" -# ^^^^^ -# -# source://prism//lib/prism/node.rb#5794 -class Prism::EmbeddedVariableNode < ::Prism::Node - # def initialize: (operator_loc: Location, variable: Node, location: Location) -> void - # - # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode - # - # source://prism//lib/prism/node.rb#5802 - sig { params(operator_loc: Prism::Location, variable: Prism::Node, location: Prism::Location).void } - def initialize(operator_loc, variable, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#5809 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5814 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5824 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5819 - def compact_child_nodes; end - - # def copy: (**params) -> EmbeddedVariableNode - # - # source://prism//lib/prism/node.rb#5829 - sig { params(params: T.untyped).returns(Prism::EmbeddedVariableNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5814 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#5841 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#5851 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#5846 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#5796 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5873 - def type; end - - # attr_reader variable: Node - # - # source://prism//lib/prism/node.rb#5799 - sig { returns(Prism::Node) } - def variable; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5883 - def type; end - end -end - -# Flags for nodes that have unescaped content. -# -# source://prism//lib/prism/node.rb#17301 -module Prism::EncodingFlags; end - -# internal bytes forced the encoding to binary -# -# source://prism//lib/prism/node.rb#17306 -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#17303 -Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) - -# Represents an `ensure` clause in a `begin` statement. -# -# begin -# foo -# ensure -# ^^^^^^ -# bar -# end -# -# source://prism//lib/prism/node.rb#5896 -class Prism::EnsureNode < ::Prism::Node - # def initialize: (ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location) -> void - # - # @return [EnsureNode] a new instance of EnsureNode - # - # source://prism//lib/prism/node.rb#5907 - sig do - params( - ensure_keyword_loc: Prism::Location, - statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(ensure_keyword_loc, statements, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#5915 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5920 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#5932 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#5925 - def compact_child_nodes; end - - # def copy: (**params) -> EnsureNode - # - # source://prism//lib/prism/node.rb#5937 - sig { params(params: T.untyped).returns(Prism::EnsureNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5920 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#5950 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#5960 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#5904 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # def ensure_keyword: () -> String - # - # source://prism//lib/prism/node.rb#5955 - sig { returns(String) } - def ensure_keyword; end - - # attr_reader ensure_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#5898 - sig { returns(Prism::Location) } - def ensure_keyword_loc; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#5965 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#5901 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5992 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6002 - def type; end - end -end - -# Represents the use of the literal `false` keyword. -# -# false -# ^^^^^ -# -# source://prism//lib/prism/node.rb#6011 -class Prism::FalseNode < ::Prism::Node - # def initialize: (location: Location) -> void - # - # @return [FalseNode] a new instance of FalseNode - # - # source://prism//lib/prism/node.rb#6013 - sig { params(location: Prism::Location).void } - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#6018 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6023 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6033 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6028 - def compact_child_nodes; end - - # def copy: (**params) -> FalseNode - # - # source://prism//lib/prism/node.rb#6038 - sig { params(params: T.untyped).returns(Prism::FalseNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6023 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#6048 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#6053 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6072 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6082 - def type; end - end -end - -# Represents a find pattern in pattern matching. -# -# foo in *bar, baz, *qux -# ^^^^^^^^^^^^^^^ -# -# foo in [*bar, baz, *qux] -# ^^^^^^^^^^^^^^^^^ -# -# foo in Foo(*bar, baz, *qux) -# ^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#6097 -class Prism::FindPatternNode < ::Prism::Node - # def initialize: (constant: Node?, left: Node, requireds: Array[Node], right: Node, opening_loc: Location?, closing_loc: Location?, location: Location) -> void - # - # @return [FindPatternNode] a new instance of FindPatternNode - # - # source://prism//lib/prism/node.rb#6117 - 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 - ).void - end - def initialize(constant, left, requireds, right, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#6128 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6133 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#6179 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#6114 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6148 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6138 - def compact_child_nodes; end - - # attr_reader constant: Node? - # - # source://prism//lib/prism/node.rb#6099 - sig { returns(T.nilable(Prism::Node)) } - def constant; end - - # def copy: (**params) -> FindPatternNode - # - # source://prism//lib/prism/node.rb#6153 - sig { params(params: T.untyped).returns(Prism::FindPatternNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6133 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#6169 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#6184 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node - # - # source://prism//lib/prism/node.rb#6102 - sig { returns(Prism::Node) } - def left; end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#6174 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#6111 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader requireds: Array[Node] - # - # source://prism//lib/prism/node.rb#6105 - sig { returns(T::Array[Prism::Node]) } - def requireds; end - - # attr_reader right: Node - # - # source://prism//lib/prism/node.rb#6108 - sig { returns(Prism::Node) } - def right; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6216 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6226 - def type; end - end -end - -# Represents the use of the `..` or `...` operators to create flip flops. -# -# baz if foo .. bar -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#6235 -class Prism::FlipFlopNode < ::Prism::Node - # def initialize: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> void - # - # @return [FlipFlopNode] a new instance of FlipFlopNode - # - # source://prism//lib/prism/node.rb#6249 - sig do - params( - flags: Integer, - left: T.nilable(Prism::Node), - right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(flags, left, right, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#6258 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6263 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6276 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6268 - def compact_child_nodes; end - - # def copy: (**params) -> FlipFlopNode - # - # source://prism//lib/prism/node.rb#6281 - sig { params(params: T.untyped).returns(Prism::FlipFlopNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6263 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#6295 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def exclude_end?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#6300 - sig { returns(T::Boolean) } - def exclude_end?; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#6310 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node? - # - # source://prism//lib/prism/node.rb#6240 - sig { returns(T.nilable(Prism::Node)) } - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#6305 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#6246 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader right: Node? - # - # source://prism//lib/prism/node.rb#6243 - sig { returns(T.nilable(Prism::Node)) } - def right; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6344 - def type; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#6237 - 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#6354 - def type; end - end -end - -# Represents a floating point number literal. -# -# 1.0 -# ^^^ -# -# source://prism//lib/prism/node.rb#6363 -class Prism::FloatNode < ::Prism::Node - # def initialize: (location: Location) -> void - # - # @return [FloatNode] a new instance of FloatNode - # - # source://prism//lib/prism/node.rb#6365 - sig { params(location: Prism::Location).void } - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#6370 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6375 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6385 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6380 - def compact_child_nodes; end - - # def copy: (**params) -> FloatNode - # - # source://prism//lib/prism/node.rb#6390 - sig { params(params: T.untyped).returns(Prism::FloatNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6375 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#6400 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#6405 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6424 - def type; end - - # Returns the value of the node as a Ruby Float. - # - # source://prism//lib/prism/node_ext.rb#62 - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6434 - def type; end - end -end - -# Represents the use of the `for` keyword. -# -# for i in a end -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#6443 -class Prism::ForNode < ::Prism::Node - # def initialize: (index: Node, collection: Node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location) -> void - # - # @return [ForNode] a new instance of ForNode - # - # source://prism//lib/prism/node.rb#6466 - 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 - ).void - end - def initialize(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#6478 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6483 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # attr_reader collection: Node - # - # source://prism//lib/prism/node.rb#6448 - sig { returns(Prism::Node) } - def collection; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6497 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6488 - def compact_child_nodes; end - - # def copy: (**params) -> ForNode - # - # source://prism//lib/prism/node.rb#6502 - sig { params(params: T.untyped).returns(Prism::ForNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6483 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#6519 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def do_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#6534 - sig { returns(T.nilable(String)) } - def do_keyword; end - - # attr_reader do_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#6460 - sig { returns(T.nilable(Prism::Location)) } - def do_keyword_loc; end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#6539 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#6463 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # def for_keyword: () -> String - # - # source://prism//lib/prism/node.rb#6524 - sig { returns(String) } - def for_keyword; end - - # attr_reader for_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#6454 - sig { returns(Prism::Location) } - def for_keyword_loc; end - - # def in_keyword: () -> String - # - # source://prism//lib/prism/node.rb#6529 - sig { returns(String) } - def in_keyword; end - - # attr_reader in_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#6457 - sig { returns(Prism::Location) } - def in_keyword_loc; end - - # attr_reader index: Node - # - # source://prism//lib/prism/node.rb#6445 - sig { returns(Prism::Node) } - def index; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#6544 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#6451 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6577 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6587 - def type; end - end -end - -# Represents forwarding all arguments to this method to another method. -# -# def foo(...) -# bar(...) -# ^^^ -# end -# -# source://prism//lib/prism/node.rb#6598 -class Prism::ForwardingArgumentsNode < ::Prism::Node - # def initialize: (location: Location) -> void - # - # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode - # - # source://prism//lib/prism/node.rb#6600 - sig { params(location: Prism::Location).void } - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#6605 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6610 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6620 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6615 - def compact_child_nodes; end - - # def copy: (**params) -> ForwardingArgumentsNode - # - # source://prism//lib/prism/node.rb#6625 - sig { params(params: T.untyped).returns(Prism::ForwardingArgumentsNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6610 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#6635 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#6640 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6659 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6669 - def type; end - end -end - -# Represents the use of the forwarding parameter in a method, block, or lambda declaration. -# -# def foo(...) -# ^^^ -# end -# -# source://prism//lib/prism/node.rb#6679 -class Prism::ForwardingParameterNode < ::Prism::Node - # def initialize: (location: Location) -> void - # - # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode - # - # source://prism//lib/prism/node.rb#6681 - sig { params(location: Prism::Location).void } - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#6686 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6691 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6701 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6696 - def compact_child_nodes; end - - # def copy: (**params) -> ForwardingParameterNode - # - # source://prism//lib/prism/node.rb#6706 - sig { params(params: T.untyped).returns(Prism::ForwardingParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6691 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#6716 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#6721 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6740 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6750 - def type; end - end -end - -# Represents the use of the `super` keyword without parentheses or arguments. -# -# super -# ^^^^^ -# -# source://prism//lib/prism/node.rb#6759 -class Prism::ForwardingSuperNode < ::Prism::Node - # def initialize: (block: BlockNode?, location: Location) -> void - # - # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode - # - # source://prism//lib/prism/node.rb#6764 - sig { params(block: T.nilable(Prism::BlockNode), location: Prism::Location).void } - def initialize(block, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#6770 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader block: BlockNode? - # - # source://prism//lib/prism/node.rb#6761 - sig { returns(T.nilable(Prism::BlockNode)) } - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6775 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6787 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6780 - def compact_child_nodes; end - - # def copy: (**params) -> ForwardingSuperNode - # - # source://prism//lib/prism/node.rb#6792 - sig { params(params: T.untyped).returns(Prism::ForwardingSuperNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6775 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#6803 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#6808 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6833 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6843 - def type; end - end -end - -# Represents the use of the `&&=` operator for assignment to a global variable. -# -# $target &&= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#6852 -class Prism::GlobalVariableAndWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#6866 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#6875 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6880 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#6890 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6885 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#6895 - sig { params(params: T.untyped).returns(Prism::GlobalVariableAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6880 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#6909 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#6919 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#6854 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#6857 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#6914 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#6860 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6943 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#6863 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6953 - def type; end - end -end - -# Represents assigning to a global variable using an operator that isn't `=`. -# -# $target += value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#6962 -class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - # - # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#6979 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - operator: Symbol, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, value, operator, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#6989 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6994 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7004 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#6999 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#7009 - sig { params(params: T.untyped).returns(Prism::GlobalVariableOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#6994 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#7024 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#7029 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#6964 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#6967 - sig { returns(Prism::Location) } - def name_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#6976 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#6970 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7054 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#6973 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7064 - def type; end - end -end - -# Represents the use of the `||=` operator for assignment to a global variable. -# -# $target ||= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#7073 -class Prism::GlobalVariableOrWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#7087 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#7096 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7101 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7111 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7106 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#7116 - sig { params(params: T.untyped).returns(Prism::GlobalVariableOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7101 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#7130 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#7140 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#7075 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#7078 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#7135 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#7081 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7164 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#7084 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7174 - def type; end - end -end - -# Represents referencing a global variable. -# -# $foo -# ^^^^ -# -# source://prism//lib/prism/node.rb#7183 -class Prism::GlobalVariableReadNode < ::Prism::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode - # - # source://prism//lib/prism/node.rb#7188 - sig { params(name: Symbol, location: Prism::Location).void } - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#7194 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7199 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7209 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7204 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableReadNode - # - # source://prism//lib/prism/node.rb#7214 - sig { params(params: T.untyped).returns(Prism::GlobalVariableReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7199 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#7225 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#7230 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#7185 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7250 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7260 - def type; end - end -end - -# Represents writing to a global variable in a context that doesn't have an explicit value. -# -# $foo, $bar = baz -# ^^^^ ^^^^ -# -# source://prism//lib/prism/node.rb#7269 -class Prism::GlobalVariableTargetNode < ::Prism::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode - # - # source://prism//lib/prism/node.rb#7274 - sig { params(name: Symbol, location: Prism::Location).void } - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#7280 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7285 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7295 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7290 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableTargetNode - # - # source://prism//lib/prism/node.rb#7300 - sig { params(params: T.untyped).returns(Prism::GlobalVariableTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7285 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#7311 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#7316 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#7271 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7336 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7346 - def type; end - end -end - -# Represents writing to a global variable. -# -# $foo = 1 -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#7355 -class Prism::GlobalVariableWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void - # - # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode - # - # source://prism//lib/prism/node.rb#7369 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(name, name_loc, value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#7378 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7383 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7393 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7388 - def compact_child_nodes; end - - # def copy: (**params) -> GlobalVariableWriteNode - # - # source://prism//lib/prism/node.rb#7398 - sig { params(params: T.untyped).returns(Prism::GlobalVariableWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7383 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#7412 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#7422 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#7357 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#7360 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#7417 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#7366 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7446 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#7363 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7456 - def type; end - end -end - -# Represents a hash literal. -# -# { a => b } -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#7465 -class Prism::HashNode < ::Prism::Node - # def initialize: (opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location) -> void - # - # @return [HashNode] a new instance of HashNode - # - # source://prism//lib/prism/node.rb#7476 - sig do - params( - opening_loc: Prism::Location, - elements: T::Array[Prism::Node], - closing_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(opening_loc, elements, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#7484 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7489 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#7527 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#7473 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7499 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7494 - def compact_child_nodes; end - - # def copy: (**params) -> HashNode - # - # source://prism//lib/prism/node.rb#7504 - sig { params(params: T.untyped).returns(Prism::HashNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7489 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#7517 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader elements: Array[Node] - # - # source://prism//lib/prism/node.rb#7470 - sig { returns(T::Array[Prism::Node]) } - def elements; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#7532 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#7522 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#7467 - sig { returns(Prism::Location) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7554 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7564 - def type; end - end -end - -# Represents a hash pattern in pattern matching. -# -# foo => { a: 1, b: 2 } -# ^^^^^^^^^^^^^^ -# -# foo => { a: 1, b: 2, **c } -# ^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#7576 -class Prism::HashPatternNode < ::Prism::Node - # def initialize: (constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location) -> void - # - # @return [HashPatternNode] a new instance of HashPatternNode - # - # source://prism//lib/prism/node.rb#7593 - sig do - params( - constant: T.nilable(Prism::Node), - elements: T::Array[Prism::Node], - rest: T.nilable(Prism::Node), - opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location - ).void - end - def initialize(constant, elements, rest, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#7603 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7608 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#7652 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#7590 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7622 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7613 - def compact_child_nodes; end - - # attr_reader constant: Node? - # - # source://prism//lib/prism/node.rb#7578 - sig { returns(T.nilable(Prism::Node)) } - def constant; end - - # def copy: (**params) -> HashPatternNode - # - # source://prism//lib/prism/node.rb#7627 - sig { params(params: T.untyped).returns(Prism::HashPatternNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7608 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#7642 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader elements: Array[Node] - # - # source://prism//lib/prism/node.rb#7581 - sig { returns(T::Array[Prism::Node]) } - def elements; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#7657 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#7647 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#7587 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader rest: Node? - # - # source://prism//lib/prism/node.rb#7584 - sig { returns(T.nilable(Prism::Node)) } - def rest; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7691 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7701 - def type; end - end -end - -# source://prism//lib/prism/node_ext.rb#35 -module Prism::HeredocQuery - # Returns true if this node was represented as a heredoc in the source code. - # - # @return [Boolean] - # - # source://prism//lib/prism/node_ext.rb#37 - def heredoc?; end -end - -# Represents the use of the `if` keyword, either in the block form or the modifier form. -# -# bar if foo -# ^^^^^^^^^^ -# -# if foo then bar end -# ^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#7713 -class Prism::IfNode < ::Prism::Node - # def initialize: (if_keyword_loc: Location?, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> void - # - # @return [IfNode] a new instance of IfNode - # - # source://prism//lib/prism/node.rb#7733 - 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 - ).void - end - def initialize(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#7744 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7753 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7767 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7758 - def compact_child_nodes; end - - # attr_reader consequent: Node? - # - # source://prism//lib/prism/node.rb#7727 - sig { returns(T.nilable(Prism::Node)) } - def consequent; end - - # def copy: (**params) -> IfNode - # - # source://prism//lib/prism/node.rb#7772 - sig { params(params: T.untyped).returns(Prism::IfNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7753 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#7788 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#7803 - sig { returns(T.nilable(String)) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#7730 - sig { returns(T.nilable(Prism::Location)) } - def end_keyword_loc; end - - # def if_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#7793 - sig { returns(T.nilable(String)) } - def if_keyword; end - - # attr_reader if_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#7715 - sig { returns(T.nilable(Prism::Location)) } - def if_keyword_loc; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#7808 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader predicate: Node - # - # source://prism//lib/prism/node.rb#7718 - sig { returns(Prism::Node) } - def predicate; end - - # source://prism//lib/prism/node.rb#7748 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#7724 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # def then_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#7798 - sig { returns(T.nilable(String)) } - def then_keyword; end - - # attr_reader then_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#7721 - sig { returns(T.nilable(Prism::Location)) } - def then_keyword_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7844 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7854 - def type; end - end -end - -# Represents an imaginary number literal. -# -# 1.0i -# ^^^^ -# -# source://prism//lib/prism/node.rb#7863 -class Prism::ImaginaryNode < ::Prism::Node - # def initialize: (numeric: Node, location: Location) -> void - # - # @return [ImaginaryNode] a new instance of ImaginaryNode - # - # source://prism//lib/prism/node.rb#7868 - sig { params(numeric: Prism::Node, location: Prism::Location).void } - def initialize(numeric, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#7874 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7879 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7889 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7884 - def compact_child_nodes; end - - # def copy: (**params) -> ImaginaryNode - # - # source://prism//lib/prism/node.rb#7894 - sig { params(params: T.untyped).returns(Prism::ImaginaryNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7879 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#7905 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#7910 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader numeric: Node - # - # source://prism//lib/prism/node.rb#7865 - sig { returns(Prism::Node) } - def numeric; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7931 - def type; end - - # Returns the value of the node as a Ruby Complex. - # - # source://prism//lib/prism/node_ext.rb#69 - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7941 - def type; end - end -end - -# Represents a node that is implicitly being added to the tree but doesn't -# correspond directly to a node in the source. -# -# { foo: } -# ^^^^ -# -# { Foo: } -# ^^^^ -# -# source://prism//lib/prism/node.rb#7954 -class Prism::ImplicitNode < ::Prism::Node - # def initialize: (value: Node, location: Location) -> void - # - # @return [ImplicitNode] a new instance of ImplicitNode - # - # source://prism//lib/prism/node.rb#7959 - sig { params(value: Prism::Node, location: Prism::Location).void } - def initialize(value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#7965 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7970 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#7980 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#7975 - def compact_child_nodes; end - - # def copy: (**params) -> ImplicitNode - # - # source://prism//lib/prism/node.rb#7985 - sig { params(params: T.untyped).returns(Prism::ImplicitNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#7970 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#7996 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#8001 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8022 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#7956 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8032 - def type; end - end -end - -# Represents using a trailing comma to indicate an implicit rest parameter. -# -# foo { |bar,| } -# ^ -# -# foo in [bar,] -# ^ -# -# for foo, in bar do end -# ^ -# -# foo, = bar -# ^ -# -# source://prism//lib/prism/node.rb#8050 -class Prism::ImplicitRestNode < ::Prism::Node - # def initialize: (location: Location) -> void - # - # @return [ImplicitRestNode] a new instance of ImplicitRestNode - # - # source://prism//lib/prism/node.rb#8052 - sig { params(location: Prism::Location).void } - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#8057 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8062 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8072 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8067 - def compact_child_nodes; end - - # def copy: (**params) -> ImplicitRestNode - # - # source://prism//lib/prism/node.rb#8077 - sig { params(params: T.untyped).returns(Prism::ImplicitRestNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8062 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#8087 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#8092 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8111 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8121 - def type; end - end -end - -# Represents the use of the `in` keyword in a case statement. -# -# case a; in b then c end -# ^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#8130 -class Prism::InNode < ::Prism::Node - # def initialize: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> void - # - # @return [InNode] a new instance of InNode - # - # source://prism//lib/prism/node.rb#8144 - sig do - params( - 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(pattern, statements, in_loc, then_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#8153 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8158 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8171 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8163 - def compact_child_nodes; end - - # def copy: (**params) -> InNode - # - # source://prism//lib/prism/node.rb#8176 - sig { params(params: T.untyped).returns(Prism::InNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8158 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#8190 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def in: () -> String - # - # source://prism//lib/prism/node.rb#8195 - sig { returns(String) } - def in; end - - # attr_reader in_loc: Location - # - # source://prism//lib/prism/node.rb#8138 - sig { returns(Prism::Location) } - def in_loc; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#8205 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader pattern: Node - # - # source://prism//lib/prism/node.rb#8132 - sig { returns(Prism::Node) } - def pattern; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#8135 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # def then: () -> String? - # - # source://prism//lib/prism/node.rb#8200 - sig { returns(T.nilable(String)) } - def then; end - - # attr_reader then_loc: Location? - # - # source://prism//lib/prism/node.rb#8141 - sig { returns(T.nilable(Prism::Location)) } - def then_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8234 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8244 - def type; end - end -end - -# Represents the use of the `&&=` operator on a call to the `[]` method. -# -# foo.bar[baz] &&= value -# ^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#8253 -class Prism::IndexAndWriteNode < ::Prism::Node - # def initialize: (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) -> void - # - # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode - # - # source://prism//lib/prism/node.rb#8282 - 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 - ).void - end - def initialize(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#8296 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#8267 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8355 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Node? - # - # source://prism//lib/prism/node.rb#8273 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#8360 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#8261 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8301 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#8370 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#8270 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8316 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8306 - def compact_child_nodes; end - - # def copy: (**params) -> IndexAndWriteNode - # - # source://prism//lib/prism/node.rb#8321 - sig { params(params: T.untyped).returns(Prism::IndexAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8301 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#8340 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#8380 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#8365 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#8264 - sig { returns(Prism::Location) } - def opening_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#8375 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#8276 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#8258 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8345 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8425 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#8279 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8350 - sig { returns(T::Boolean) } - def variable_call?; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#8255 - 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#8435 - def type; end - end -end - -# Represents the use of an assignment operator on a call to `[]`. -# -# foo.bar[baz] += value -# ^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#8444 -class Prism::IndexOperatorWriteNode < ::Prism::Node - # def initialize: (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) -> void - # - # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode - # - # source://prism//lib/prism/node.rb#8476 - 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 - ).void - end - def initialize(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#8491 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#8458 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8551 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Node? - # - # source://prism//lib/prism/node.rb#8464 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#8556 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#8452 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8496 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#8566 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#8461 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8511 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8501 - def compact_child_nodes; end - - # def copy: (**params) -> IndexOperatorWriteNode - # - # source://prism//lib/prism/node.rb#8516 - sig { params(params: T.untyped).returns(Prism::IndexOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8496 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#8536 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#8571 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#8561 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#8455 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#8467 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#8470 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#8449 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8541 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8617 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#8473 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8546 - sig { returns(T::Boolean) } - def variable_call?; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#8446 - 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#8627 - def type; end - end -end - -# Represents the use of the `||=` operator on a call to `[]`. -# -# foo.bar[baz] ||= value -# ^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#8636 -class Prism::IndexOrWriteNode < ::Prism::Node - # def initialize: (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) -> void - # - # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode - # - # source://prism//lib/prism/node.rb#8665 - 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 - ).void - end - def initialize(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#8679 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#8650 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8738 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Node? - # - # source://prism//lib/prism/node.rb#8656 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def call_operator: () -> String? - # - # source://prism//lib/prism/node.rb#8743 - sig { returns(T.nilable(String)) } - def call_operator; end - - # attr_reader call_operator_loc: Location? - # - # source://prism//lib/prism/node.rb#8644 - sig { returns(T.nilable(Prism::Location)) } - def call_operator_loc; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8684 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#8753 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#8653 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8699 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8689 - def compact_child_nodes; end - - # def copy: (**params) -> IndexOrWriteNode - # - # source://prism//lib/prism/node.rb#8704 - sig { params(params: T.untyped).returns(Prism::IndexOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8684 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#8723 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#8763 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#8748 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#8647 - sig { returns(Prism::Location) } - def opening_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#8758 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#8659 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader receiver: Node? - # - # source://prism//lib/prism/node.rb#8641 - sig { returns(T.nilable(Prism::Node)) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8728 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8808 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#8662 - sig { returns(Prism::Node) } - def value; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8733 - sig { returns(T::Boolean) } - def variable_call?; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#8638 - 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#8818 - def type; end - end -end - -# Represents assigning to an index. -# -# foo[bar], = 1 -# ^^^^^^^^ -# -# begin -# rescue => foo[bar] -# ^^^^^^^^ -# end -# -# for foo[bar] in baz do end -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#8835 -class Prism::IndexTargetNode < ::Prism::Node - # def initialize: (flags: Integer, receiver: Node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, location: Location) -> void - # - # @return [IndexTargetNode] a new instance of IndexTargetNode - # - # source://prism//lib/prism/node.rb#8855 - 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 - ).void - end - def initialize(flags, receiver, opening_loc, arguments, closing_loc, block, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#8866 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#8846 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def attribute_write?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8921 - sig { returns(T::Boolean) } - def attribute_write?; end - - # attr_reader block: Node? - # - # source://prism//lib/prism/node.rb#8852 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8871 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#8931 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#8849 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#8885 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#8876 - def compact_child_nodes; end - - # def copy: (**params) -> IndexTargetNode - # - # source://prism//lib/prism/node.rb#8890 - sig { params(params: T.untyped).returns(Prism::IndexTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#8871 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#8906 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#8936 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#8926 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#8843 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader receiver: Node - # - # source://prism//lib/prism/node.rb#8840 - sig { returns(Prism::Node) } - def receiver; end - - # def safe_navigation?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8911 - sig { returns(T::Boolean) } - def safe_navigation?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8973 - def type; end - - # def variable_call?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#8916 - sig { returns(T::Boolean) } - def variable_call?; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#8837 - 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#8983 - def type; end - end -end - -# InlineComment objects are the most common. They correspond to comments in -# the source file like this one that start with #. -# -# source://prism//lib/prism/parse_result.rb#245 -class Prism::InlineComment < ::Prism::Comment - # Returns a string representation of this comment. - # - # source://prism//lib/prism/parse_result.rb#253 - def inspect; end - - # Returns true if this comment happens on the same line as other code and - # false if the comment is by itself. - # - # @return [Boolean] - # - # source://prism//lib/prism/parse_result.rb#248 - sig { override.returns(T::Boolean) } - def trailing?; end -end - -# Represents the use of the `&&=` operator for assignment to an instance variable. -# -# @target &&= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#8992 -class Prism::InstanceVariableAndWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#9006 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#9015 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9020 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9030 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9025 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#9035 - sig { params(params: T.untyped).returns(Prism::InstanceVariableAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9020 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#9049 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#9059 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#8994 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#8997 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#9054 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#9000 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9083 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#9003 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9093 - def type; end - end -end - -# Represents assigning to an instance variable using an operator that isn't `=`. -# -# @target += value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9102 -class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void - # - # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#9119 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - operator: Symbol, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, value, operator, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#9129 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9134 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9144 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9139 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#9149 - sig { params(params: T.untyped).returns(Prism::InstanceVariableOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9134 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#9164 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#9169 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#9104 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#9107 - sig { returns(Prism::Location) } - def name_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#9116 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#9110 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9194 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#9113 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9204 - def type; end - end -end - -# Represents the use of the `||=` operator for assignment to an instance variable. -# -# @target ||= value -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9213 -class Prism::InstanceVariableOrWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#9227 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#9236 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9241 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9251 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9246 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#9256 - sig { params(params: T.untyped).returns(Prism::InstanceVariableOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9241 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#9270 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#9280 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#9215 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#9218 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#9275 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#9221 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9304 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#9224 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9314 - def type; end - end -end - -# Represents referencing an instance variable. -# -# @foo -# ^^^^ -# -# source://prism//lib/prism/node.rb#9323 -class Prism::InstanceVariableReadNode < ::Prism::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode - # - # source://prism//lib/prism/node.rb#9328 - sig { params(name: Symbol, location: Prism::Location).void } - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#9334 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9339 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9349 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9344 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableReadNode - # - # source://prism//lib/prism/node.rb#9354 - sig { params(params: T.untyped).returns(Prism::InstanceVariableReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9339 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#9365 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#9370 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#9325 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9390 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9400 - def type; end - end -end - -# Represents writing to an instance variable in a context that doesn't have an explicit value. -# -# @foo, @bar = baz -# ^^^^ ^^^^ -# -# source://prism//lib/prism/node.rb#9409 -class Prism::InstanceVariableTargetNode < ::Prism::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode - # - # source://prism//lib/prism/node.rb#9414 - sig { params(name: Symbol, location: Prism::Location).void } - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#9420 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9425 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9435 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9430 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableTargetNode - # - # source://prism//lib/prism/node.rb#9440 - sig { params(params: T.untyped).returns(Prism::InstanceVariableTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9425 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#9451 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#9456 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#9411 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9476 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9486 - def type; end - end -end - -# Represents writing to an instance variable. -# -# @foo = 1 -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9495 -class Prism::InstanceVariableWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void - # - # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode - # - # source://prism//lib/prism/node.rb#9509 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(name, name_loc, value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#9518 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9523 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9533 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9528 - def compact_child_nodes; end - - # def copy: (**params) -> InstanceVariableWriteNode - # - # source://prism//lib/prism/node.rb#9538 - sig { params(params: T.untyped).returns(Prism::InstanceVariableWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9523 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#9552 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#9562 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#9497 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#9500 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#9557 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#9506 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9586 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#9503 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9596 - def type; end - end -end - -# Flags for integer nodes that correspond to the base of the integer. -# -# source://prism//lib/prism/node.rb#17310 -module Prism::IntegerBaseFlags; end - -# 0b prefix -# -# source://prism//lib/prism/node.rb#17312 -Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) - -# 0d or no prefix -# -# source://prism//lib/prism/node.rb#17315 -Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) - -# 0x prefix -# -# source://prism//lib/prism/node.rb#17321 -Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) - -# 0o or 0 prefix -# -# source://prism//lib/prism/node.rb#17318 -Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) - -# Represents an integer number literal. -# -# 1 -# ^ -# -# source://prism//lib/prism/node.rb#9605 -class Prism::IntegerNode < ::Prism::Node - # def initialize: (flags: Integer, location: Location) -> void - # - # @return [IntegerNode] a new instance of IntegerNode - # - # source://prism//lib/prism/node.rb#9610 - sig { params(flags: Integer, location: Prism::Location).void } - def initialize(flags, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#9616 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def binary?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9652 - sig { returns(T::Boolean) } - def binary?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9621 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9631 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9626 - def compact_child_nodes; end - - # def copy: (**params) -> IntegerNode - # - # source://prism//lib/prism/node.rb#9636 - sig { params(params: T.untyped).returns(Prism::IntegerNode) } - def copy(**params); end - - # def decimal?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9657 - sig { returns(T::Boolean) } - def decimal?; end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9621 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#9647 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def hexadecimal?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9667 - sig { returns(T::Boolean) } - def hexadecimal?; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#9672 - def inspect(inspector = T.unsafe(nil)); end - - # def octal?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9662 - sig { returns(T::Boolean) } - def octal?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9693 - def type; end - - # Returns the value of the node as a Ruby Integer. - # - # source://prism//lib/prism/node_ext.rb#76 - def value; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#9607 - 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#9703 - def type; end - end -end - -# Represents a regular expression literal that contains interpolation that -# is being used in the predicate of a conditional to implicitly match -# against the last line read by an IO object. -# -# if /foo #{bar} baz/ then end -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9714 -class Prism::InterpolatedMatchLastLineNode < ::Prism::Node - include ::Prism::RegularExpressionOptions - - # def initialize: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void - # - # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode - # - # source://prism//lib/prism/node.rb#9728 - sig do - params( - flags: Integer, - opening_loc: Prism::Location, - parts: T::Array[Prism::Node], - closing_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(flags, opening_loc, parts, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#9737 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def ascii_8bit?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9806 - sig { returns(T::Boolean) } - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9747 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#9841 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#9725 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9757 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9752 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedMatchLastLineNode - # - # source://prism//lib/prism/node.rb#9762 - sig { params(params: T.untyped).returns(Prism::InterpolatedMatchLastLineNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9747 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#9776 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def euc_jp?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9801 - sig { returns(T::Boolean) } - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9786 - sig { returns(T::Boolean) } - def extended?; end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9826 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9831 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9821 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9781 - sig { returns(T::Boolean) } - def ignore_case?; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#9846 - def inspect(inspector = T.unsafe(nil)); end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9791 - sig { returns(T::Boolean) } - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9796 - sig { returns(T::Boolean) } - def once?; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#9836 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#9719 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://prism//lib/prism/node.rb#9722 - sig { returns(T::Array[Prism::Node]) } - def parts; end - - # source://prism//lib/prism/node.rb#9741 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9870 - def type; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9816 - sig { returns(T::Boolean) } - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9811 - sig { returns(T::Boolean) } - def windows_31j?; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#9716 - 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#9880 - def type; end - end -end - -# Represents a regular expression literal that contains interpolation. -# -# /foo #{bar} baz/ -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#9889 -class Prism::InterpolatedRegularExpressionNode < ::Prism::Node - include ::Prism::RegularExpressionOptions - - # def initialize: (flags: Integer, opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void - # - # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode - # - # source://prism//lib/prism/node.rb#9903 - sig do - params( - flags: Integer, - opening_loc: Prism::Location, - parts: T::Array[Prism::Node], - closing_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(flags, opening_loc, parts, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#9912 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def ascii_8bit?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9981 - sig { returns(T::Boolean) } - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9922 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#10016 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#9900 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#9932 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#9927 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedRegularExpressionNode - # - # source://prism//lib/prism/node.rb#9937 - sig { params(params: T.untyped).returns(Prism::InterpolatedRegularExpressionNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#9922 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#9951 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def euc_jp?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9976 - sig { returns(T::Boolean) } - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9961 - sig { returns(T::Boolean) } - def extended?; end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10001 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10006 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9996 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9956 - sig { returns(T::Boolean) } - def ignore_case?; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#10021 - def inspect(inspector = T.unsafe(nil)); end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9966 - sig { returns(T::Boolean) } - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9971 - sig { returns(T::Boolean) } - def once?; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#10011 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#9894 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://prism//lib/prism/node.rb#9897 - sig { returns(T::Array[Prism::Node]) } - def parts; end - - # source://prism//lib/prism/node.rb#9916 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10045 - def type; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9991 - sig { returns(T::Boolean) } - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#9986 - sig { returns(T::Boolean) } - def windows_31j?; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#9891 - 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#10055 - def type; end - end -end - -# Represents a string literal that contains interpolation. -# -# "foo #{bar} baz" -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10064 -class Prism::InterpolatedStringNode < ::Prism::Node - include ::Prism::HeredocQuery - - # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void - # - # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode - # - # source://prism//lib/prism/node.rb#10075 - sig do - params( - opening_loc: T.nilable(Prism::Location), - parts: T::Array[Prism::Node], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location - ).void - end - def initialize(opening_loc, parts, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#10083 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10093 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#10131 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#10072 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10103 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10098 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedStringNode - # - # source://prism//lib/prism/node.rb#10108 - sig { params(params: T.untyped).returns(Prism::InterpolatedStringNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10093 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#10121 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#10136 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#10126 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#10066 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://prism//lib/prism/node.rb#10069 - sig { returns(T::Array[Prism::Node]) } - def parts; end - - # source://prism//lib/prism/node.rb#10087 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10158 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10168 - def type; end - end -end - -# Represents a symbol literal that contains interpolation. -# -# :"foo #{bar} baz" -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10177 -class Prism::InterpolatedSymbolNode < ::Prism::Node - # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void - # - # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode - # - # source://prism//lib/prism/node.rb#10188 - sig do - params( - opening_loc: T.nilable(Prism::Location), - parts: T::Array[Prism::Node], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location - ).void - end - def initialize(opening_loc, parts, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#10196 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10206 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#10244 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#10185 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10216 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10211 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedSymbolNode - # - # source://prism//lib/prism/node.rb#10221 - sig { params(params: T.untyped).returns(Prism::InterpolatedSymbolNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10206 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#10234 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#10249 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#10239 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#10179 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://prism//lib/prism/node.rb#10182 - sig { returns(T::Array[Prism::Node]) } - def parts; end - - # source://prism//lib/prism/node.rb#10200 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10271 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10281 - def type; end - end -end - -# Represents an xstring literal that contains interpolation. -# -# `foo #{bar} baz` -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10290 -class Prism::InterpolatedXStringNode < ::Prism::Node - include ::Prism::HeredocQuery - - # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void - # - # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode - # - # source://prism//lib/prism/node.rb#10301 - sig do - params( - opening_loc: Prism::Location, - parts: T::Array[Prism::Node], - closing_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(opening_loc, parts, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#10309 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10319 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#10357 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#10298 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10329 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10324 - def compact_child_nodes; end - - # def copy: (**params) -> InterpolatedXStringNode - # - # source://prism//lib/prism/node.rb#10334 - sig { params(params: T.untyped).returns(Prism::InterpolatedXStringNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10319 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#10347 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#10362 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#10352 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#10292 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader parts: Array[Node] - # - # source://prism//lib/prism/node.rb#10295 - sig { returns(T::Array[Prism::Node]) } - def parts; end - - # source://prism//lib/prism/node.rb#10313 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10384 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10394 - def type; end - end -end - -# Represents a hash literal without opening and closing braces. -# -# foo(a: b) -# ^^^^ -# -# source://prism//lib/prism/node.rb#10403 -class Prism::KeywordHashNode < ::Prism::Node - # def initialize: (flags: Integer, elements: Array[Node], location: Location) -> void - # - # @return [KeywordHashNode] a new instance of KeywordHashNode - # - # source://prism//lib/prism/node.rb#10411 - sig { params(flags: Integer, elements: T::Array[Prism::Node], location: Prism::Location).void } - def initialize(flags, elements, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#10418 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10423 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10433 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10428 - def compact_child_nodes; end - - # def copy: (**params) -> KeywordHashNode - # - # source://prism//lib/prism/node.rb#10438 - sig { params(params: T.untyped).returns(Prism::KeywordHashNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10423 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#10450 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader elements: Array[Node] - # - # source://prism//lib/prism/node.rb#10408 - sig { returns(T::Array[Prism::Node]) } - def elements; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#10460 - def inspect(inspector = T.unsafe(nil)); end - - # def static_keys?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#10455 - sig { returns(T::Boolean) } - def static_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#10482 - def type; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#10405 - 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#10492 - def type; end - end -end - -# Flags for keyword hash nodes. -# -# source://prism//lib/prism/node.rb#17325 -module Prism::KeywordHashNodeFlags; end - -# a keyword hash which only has `AssocNode` elements all with static literal keys, which means the elements can be treated as keyword arguments -# -# source://prism//lib/prism/node.rb#17327 -Prism::KeywordHashNodeFlags::STATIC_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#10502 -class Prism::KeywordRestParameterNode < ::Prism::Node - # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void - # - # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode - # - # source://prism//lib/prism/node.rb#10513 - sig do - params( - name: T.nilable(Symbol), - name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#10521 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10526 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10536 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10531 - def compact_child_nodes; end - - # def copy: (**params) -> KeywordRestParameterNode - # - # source://prism//lib/prism/node.rb#10541 - sig { params(params: T.untyped).returns(Prism::KeywordRestParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10526 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#10554 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#10564 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol? - # - # source://prism//lib/prism/node.rb#10504 - sig { returns(T.nilable(Symbol)) } - def name; end - - # attr_reader name_loc: Location? - # - # source://prism//lib/prism/node.rb#10507 - sig { returns(T.nilable(Prism::Location)) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#10559 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10510 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10590 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10600 - def type; end - end -end - -# Represents using a lambda literal (not the lambda method call). -# -# ->(value) { value * 2 } -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10609 -class Prism::LambdaNode < ::Prism::Node - # def initialize: (locals: Array[Symbol], locals_body_index: Integer, operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Node?, body: Node?, location: Location) -> void - # - # @return [LambdaNode] a new instance of LambdaNode - # - # source://prism//lib/prism/node.rb#10632 - sig do - params( - locals: T::Array[Symbol], - locals_body_index: Integer, - 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(locals, locals_body_index, operator_loc, opening_loc, closing_loc, parameters, body, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#10644 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#10629 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10649 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#10699 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#10623 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10662 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10654 - def compact_child_nodes; end - - # def copy: (**params) -> LambdaNode - # - # source://prism//lib/prism/node.rb#10667 - sig { params(params: T.untyped).returns(Prism::LambdaNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10649 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#10684 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#10704 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#10611 - sig { returns(T::Array[Symbol]) } - def locals; end - - # attr_reader locals_body_index: Integer - # - # source://prism//lib/prism/node.rb#10614 - sig { returns(Integer) } - def locals_body_index; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#10694 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#10620 - sig { returns(Prism::Location) } - def opening_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#10689 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10617 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader parameters: Node? - # - # source://prism//lib/prism/node.rb#10626 - sig { returns(T.nilable(Prism::Node)) } - def parameters; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10740 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10750 - def type; end - end -end - -# This class is responsible for lexing the source using prism and then -# converting those tokens to be compatible with Ripper. In the vast majority -# of cases, this is a one-to-one mapping of the token type. Everything else -# generally lines up. However, there are a few cases that require special -# handling. -# -# source://prism//lib/prism/lex_compat.rb#11 -class Prism::LexCompat - # @return [LexCompat] a new instance of LexCompat - # - # source://prism//lib/prism/lex_compat.rb#599 - def initialize(source, **options); end - - # Returns the value of attribute options. - # - # source://prism//lib/prism/lex_compat.rb#597 - def options; end - - # source://prism//lib/prism/lex_compat.rb#604 - def result; end - - # Returns the value of attribute source. - # - # source://prism//lib/prism/lex_compat.rb#597 - 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#210 -class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#211 - def ==(other); end -end - -# A heredoc in this case is a list of tokens that belong to the body of the -# heredoc that should be appended onto the list of tokens when the heredoc -# closes. -# -# source://prism//lib/prism/lex_compat.rb#271 -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#583 - def build(opening); end - end -end - -# Dash heredocs are a little more complicated. They are a list of tokens -# that need to be split on "\\\n" to mimic Ripper's behavior. We also need -# to keep track of the state that the heredoc was opened in. -# -# source://prism//lib/prism/lex_compat.rb#295 -class Prism::LexCompat::Heredoc::DashHeredoc - # @return [DashHeredoc] a new instance of DashHeredoc - # - # source://prism//lib/prism/lex_compat.rb#298 - def initialize(split); end - - # source://prism//lib/prism/lex_compat.rb#303 - def <<(token); end - - # source://prism//lib/prism/lex_compat.rb#296 - def split; end - - # source://prism//lib/prism/lex_compat.rb#307 - def to_a; end - - # source://prism//lib/prism/lex_compat.rb#296 - def tokens; end -end - -# Heredocs that are dedenting heredocs are a little more complicated. -# Ripper outputs on_ignored_sp tokens for the whitespace that is being -# removed from the output. prism only modifies the node itself and keeps -# the token the same. This simplifies prism, but makes comparing against -# Ripper much harder because there is a length mismatch. -# -# Fortunately, we already have to pull out the heredoc tokens in order to -# insert them into the stream in the correct order. As such, we can do -# some extra manipulation on the tokens to make them match Ripper's -# output by mirroring the dedent logic that Ripper uses. -# -# source://prism//lib/prism/lex_compat.rb#354 -class Prism::LexCompat::Heredoc::DedentingHeredoc - # @return [DedentingHeredoc] a new instance of DedentingHeredoc - # - # source://prism//lib/prism/lex_compat.rb#359 - 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#370 - def <<(token); end - - # Returns the value of attribute dedent. - # - # source://prism//lib/prism/lex_compat.rb#357 - def dedent; end - - # Returns the value of attribute dedent_next. - # - # source://prism//lib/prism/lex_compat.rb#357 - def dedent_next; end - - # Returns the value of attribute embexpr_balance. - # - # source://prism//lib/prism/lex_compat.rb#357 - def embexpr_balance; end - - # source://prism//lib/prism/lex_compat.rb#407 - def to_a; end - - # Returns the value of attribute tokens. - # - # source://prism//lib/prism/lex_compat.rb#357 - def tokens; end -end - -# source://prism//lib/prism/lex_compat.rb#355 -Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) - -# Heredocs that are no dash or tilde heredocs are just a list of tokens. -# We need to keep them around so that we can insert them in the correct -# order back into the token stream and set the state of the last token to -# the state that the heredoc was opened in. -# -# source://prism//lib/prism/lex_compat.rb#276 -class Prism::LexCompat::Heredoc::PlainHeredoc - # @return [PlainHeredoc] a new instance of PlainHeredoc - # - # source://prism//lib/prism/lex_compat.rb#279 - def initialize; end - - # source://prism//lib/prism/lex_compat.rb#283 - def <<(token); end - - # source://prism//lib/prism/lex_compat.rb#287 - def to_a; end - - # source://prism//lib/prism/lex_compat.rb#277 - def tokens; end -end - -# Ident tokens for the most part are exactly the same, except sometimes we -# know an ident is a local when ripper doesn't (when they are introduced -# through named captures in regular expressions). In that case we don't -# compare the state. -# -# source://prism//lib/prism/lex_compat.rb#228 -class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#229 - 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#218 -class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#219 - 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#239 -class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#240 - def ==(other); end -end - -# If we have an identifier that follows a method name like: -# -# def foo bar -# -# then Ripper will mark bar as END|LABEL if there is a local in a parent -# scope named bar because it hasn't pushed the local table yet. We do this -# more accurately, so we need to allow comparing against both END and -# END|LABEL. -# -# source://prism//lib/prism/lex_compat.rb#259 -class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token - # source://prism//lib/prism/lex_compat.rb#260 - def ==(other); end -end - -# This is a mapping of prism token types to Ripper token types. This is a -# many-to-one mapping because we split up our token types, whereas Ripper -# tends to group them. -# -# source://prism//lib/prism/lex_compat.rb#15 -Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) - -# When we produce tokens, we produce the same arrays that Ripper does. -# However, we add a couple of convenience methods onto them to make them a -# little easier to work with. We delegate all other methods to the array. -# -# source://prism//lib/prism/lex_compat.rb#186 -class Prism::LexCompat::Token < ::SimpleDelegator - # The type of the token. - # - # source://prism//lib/prism/lex_compat.rb#193 - def event; end - - # The location of the token in the source. - # - # source://prism//lib/prism/lex_compat.rb#188 - def location; end - - # The state of the lexer when this token was produced. - # - # source://prism//lib/prism/lex_compat.rb#203 - def state; end - - # The slice of the source that this token represents. - # - # source://prism//lib/prism/lex_compat.rb#198 - 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#852 -class Prism::LexRipper - # @return [LexRipper] a new instance of LexRipper - # - # source://prism//lib/prism/lex_compat.rb#855 - def initialize(source); end - - # source://prism//lib/prism/lex_compat.rb#859 - def result; end - - # source://prism//lib/prism/lex_compat.rb#853 - def source; end -end - -# Represents the use of the `&&=` operator for assignment to a local variable. -# -# target &&= value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10759 -class Prism::LocalVariableAndWriteNode < ::Prism::Node - # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void - # - # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#10776 - sig do - params( - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - name: Symbol, - depth: Integer, - location: Prism::Location - ).void - end - def initialize(name_loc, operator_loc, value, name, depth, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#10786 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10791 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10801 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10796 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableAndWriteNode - # - # source://prism//lib/prism/node.rb#10806 - sig { params(params: T.untyped).returns(Prism::LocalVariableAndWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10791 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#10821 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#10773 - sig { returns(Integer) } - def depth; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#10831 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#10770 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#10761 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#10826 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10764 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10856 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#10767 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10866 - def type; end - end -end - -# Represents assigning to a local variable using an operator that isn't `=`. -# -# target += value -# ^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10875 -class Prism::LocalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, operator: Symbol, depth: Integer, location: Location) -> void - # - # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#10895 - sig do - params( - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - name: Symbol, - operator: Symbol, - depth: Integer, - location: Prism::Location - ).void - end - def initialize(name_loc, operator_loc, value, name, operator, depth, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#10906 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10911 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#10921 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#10916 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableOperatorWriteNode - # - # source://prism//lib/prism/node.rb#10926 - sig { params(params: T.untyped).returns(Prism::LocalVariableOperatorWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#10911 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#10942 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#10892 - sig { returns(Integer) } - def depth; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#10947 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#10886 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#10877 - sig { returns(Prism::Location) } - def name_loc; end - - # attr_reader operator: Symbol - # - # source://prism//lib/prism/node.rb#10889 - sig { returns(Symbol) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10880 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10973 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#10883 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10983 - def type; end - end -end - -# Represents the use of the `||=` operator for assignment to a local variable. -# -# target ||= value -# ^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#10992 -class Prism::LocalVariableOrWriteNode < ::Prism::Node - # def initialize: (name_loc: Location, operator_loc: Location, value: Node, name: Symbol, depth: Integer, location: Location) -> void - # - # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#11009 - sig do - params( - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - name: Symbol, - depth: Integer, - location: Prism::Location - ).void - end - def initialize(name_loc, operator_loc, value, name, depth, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#11019 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11024 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11034 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11029 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableOrWriteNode - # - # source://prism//lib/prism/node.rb#11039 - sig { params(params: T.untyped).returns(Prism::LocalVariableOrWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11024 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#11054 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#11006 - sig { returns(Integer) } - def depth; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#11064 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#11003 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#10994 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#11059 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#10997 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11089 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#11000 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11099 - def type; end - end -end - -# Represents reading a local variable. Note that this requires that a local -# variable of the same name has already been written to in the same scope, -# otherwise it is parsed as a method call. -# -# foo -# ^^^ -# -# source://prism//lib/prism/node.rb#11110 -class Prism::LocalVariableReadNode < ::Prism::Node - # def initialize: (name: Symbol, depth: Integer, location: Location) -> void - # - # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode - # - # source://prism//lib/prism/node.rb#11118 - sig { params(name: Symbol, depth: Integer, location: Prism::Location).void } - def initialize(name, depth, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#11125 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11130 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11140 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11135 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableReadNode - # - # source://prism//lib/prism/node.rb#11145 - sig { params(params: T.untyped).returns(Prism::LocalVariableReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11130 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#11157 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#11115 - sig { returns(Integer) } - def depth; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#11162 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#11112 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11183 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11193 - def type; end - end -end - -# Represents writing to a local variable in a context that doesn't have an explicit value. -# -# foo, bar = baz -# ^^^ ^^^ -# -# source://prism//lib/prism/node.rb#11202 -class Prism::LocalVariableTargetNode < ::Prism::Node - # def initialize: (name: Symbol, depth: Integer, location: Location) -> void - # - # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode - # - # source://prism//lib/prism/node.rb#11210 - sig { params(name: Symbol, depth: Integer, location: Prism::Location).void } - def initialize(name, depth, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#11217 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11222 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11232 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11227 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableTargetNode - # - # source://prism//lib/prism/node.rb#11237 - sig { params(params: T.untyped).returns(Prism::LocalVariableTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11222 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#11249 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#11207 - sig { returns(Integer) } - def depth; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#11254 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#11204 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11275 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11285 - def type; end - end -end - -# Represents writing to a local variable. -# -# foo = 1 -# ^^^^^^^ -# -# source://prism//lib/prism/node.rb#11294 -class Prism::LocalVariableWriteNode < ::Prism::Node - # def initialize: (name: Symbol, depth: Integer, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void - # - # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode - # - # source://prism//lib/prism/node.rb#11311 - sig do - params( - name: Symbol, - depth: Integer, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(name, depth, name_loc, value, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#11321 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11326 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11336 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11331 - def compact_child_nodes; end - - # def copy: (**params) -> LocalVariableWriteNode - # - # source://prism//lib/prism/node.rb#11341 - sig { params(params: T.untyped).returns(Prism::LocalVariableWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11326 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#11356 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader depth: Integer - # - # source://prism//lib/prism/node.rb#11299 - sig { returns(Integer) } - def depth; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#11366 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#11296 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#11302 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#11361 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#11308 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11391 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#11305 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11401 - def type; end - end -end - -# This represents a location in the source. -# -# source://prism//lib/prism/parse_result.rb#91 -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#108 - 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#202 - def ==(other); end - - # The list of comments attached to this location - # - # source://prism//lib/prism/parse_result.rb#104 - 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#116 - sig { params(options: T.untyped).returns(Prism::Location) } - def copy(**options); end - - # Implement the hash pattern matching interface for Location. - # - # source://prism//lib/prism/parse_result.rb#192 - 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#187 - 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#147 - def end_character_offset; end - - # The column number in bytes where this location ends from the start of the - # line. - # - # source://prism//lib/prism/parse_result.rb#181 - sig { returns(Integer) } - def end_column; end - - # The line number where this location ends. - # - # source://prism//lib/prism/parse_result.rb#163 - 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#141 - sig { returns(Integer) } - def end_offset; end - - # Returns a string representation of this location. - # - # source://prism//lib/prism/parse_result.rb#125 - 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#211 - def join(other); end - - # The length of this location in bytes. - # - # source://prism//lib/prism/parse_result.rb#101 - def length; end - - # Implement the pretty print interface for Location. - # - # source://prism//lib/prism/parse_result.rb#197 - def pretty_print(q); end - - # The source code that this location represents. - # - # source://prism//lib/prism/parse_result.rb#130 - 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#175 - 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#136 - def start_character_offset; end - - # The column number in bytes where this location starts from the start of - # the line. - # - # source://prism//lib/prism/parse_result.rb#169 - sig { returns(Integer) } - def start_column; end - - # The line number where this location starts. - # - # source://prism//lib/prism/parse_result.rb#152 - 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#157 - 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#98 - sig { returns(Integer) } - def start_offset; end - - protected - - # Returns the value of attribute source. - # - # source://prism//lib/prism/parse_result.rb#94 - 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#221 - def null; end - end -end - -# Flags for while and until loop nodes. -# -# source://prism//lib/prism/node.rb#17331 -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#17333 -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#273 -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#281 - def initialize(key_loc, value_loc); end - - # Implement the hash pattern matching interface for MagicComment. - # - # source://prism//lib/prism/parse_result.rb#297 - def deconstruct_keys(keys); end - - # Returns a string representation of this magic comment. - # - # source://prism//lib/prism/parse_result.rb#302 - def inspect; end - - # Returns the key of the magic comment by slicing it from the source code. - # - # source://prism//lib/prism/parse_result.rb#287 - def key; end - - # A Location object representing the location of the key in the source. - # - # source://prism//lib/prism/parse_result.rb#275 - 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#292 - def value; end - - # A Location object representing the location of the value in the source. - # - # source://prism//lib/prism/parse_result.rb#278 - def value_loc; end -end - -# Represents a regular expression literal used in the predicate of a -# conditional to implicitly match against the last line read by an IO -# object. -# -# if /foo/i then end -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#11412 -class Prism::MatchLastLineNode < ::Prism::Node - include ::Prism::RegularExpressionOptions - - # def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void - # - # @return [MatchLastLineNode] a new instance of MatchLastLineNode - # - # source://prism//lib/prism/node.rb#11429 - sig do - params( - flags: Integer, - opening_loc: Prism::Location, - content_loc: Prism::Location, - closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location - ).void - end - def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#11439 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def ascii_8bit?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11504 - sig { returns(T::Boolean) } - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11444 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#11544 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#11423 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11454 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11449 - def compact_child_nodes; end - - # def content: () -> String - # - # source://prism//lib/prism/node.rb#11539 - sig { returns(String) } - def content; end - - # attr_reader content_loc: Location - # - # source://prism//lib/prism/node.rb#11420 - sig { returns(Prism::Location) } - def content_loc; end - - # def copy: (**params) -> MatchLastLineNode - # - # source://prism//lib/prism/node.rb#11459 - sig { params(params: T.untyped).returns(Prism::MatchLastLineNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11444 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#11474 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def euc_jp?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11499 - sig { returns(T::Boolean) } - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11484 - sig { returns(T::Boolean) } - def extended?; end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11524 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11529 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11519 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11479 - sig { returns(T::Boolean) } - def ignore_case?; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#11549 - def inspect(inspector = T.unsafe(nil)); end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11489 - sig { returns(T::Boolean) } - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11494 - sig { returns(T::Boolean) } - def once?; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#11534 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#11417 - sig { returns(Prism::Location) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11574 - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#11426 - sig { returns(String) } - def unescaped; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11514 - sig { returns(T::Boolean) } - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#11509 - sig { returns(T::Boolean) } - def windows_31j?; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#11414 - 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#11584 - def type; end - end -end - -# Represents the use of the modifier `in` operator. -# -# foo in bar -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#11593 -class Prism::MatchPredicateNode < ::Prism::Node - # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void - # - # @return [MatchPredicateNode] a new instance of MatchPredicateNode - # - # source://prism//lib/prism/node.rb#11604 - sig do - params( - value: Prism::Node, - pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(value, pattern, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#11612 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11617 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11627 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11622 - def compact_child_nodes; end - - # def copy: (**params) -> MatchPredicateNode - # - # source://prism//lib/prism/node.rb#11632 - sig { params(params: T.untyped).returns(Prism::MatchPredicateNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11617 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#11645 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#11655 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#11650 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#11601 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader pattern: Node - # - # source://prism//lib/prism/node.rb#11598 - sig { returns(Prism::Node) } - def pattern; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11679 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#11595 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11689 - def type; end - end -end - -# Represents the use of the `=>` operator. -# -# foo => bar -# ^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#11698 -class Prism::MatchRequiredNode < ::Prism::Node - # def initialize: (value: Node, pattern: Node, operator_loc: Location, location: Location) -> void - # - # @return [MatchRequiredNode] a new instance of MatchRequiredNode - # - # source://prism//lib/prism/node.rb#11709 - sig do - params( - value: Prism::Node, - pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(value, pattern, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#11717 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11722 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11732 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11727 - def compact_child_nodes; end - - # def copy: (**params) -> MatchRequiredNode - # - # source://prism//lib/prism/node.rb#11737 - sig { params(params: T.untyped).returns(Prism::MatchRequiredNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11722 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#11750 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#11760 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#11755 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#11706 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader pattern: Node - # - # source://prism//lib/prism/node.rb#11703 - sig { returns(Prism::Node) } - def pattern; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11784 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#11700 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11794 - def type; end - end -end - -# Represents writing local variables using a regular expression match with -# named capture groups. -# -# /(?bar)/ =~ baz -# ^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#11804 -class Prism::MatchWriteNode < ::Prism::Node - # def initialize: (call: CallNode, targets: Array[Node], location: Location) -> void - # - # @return [MatchWriteNode] a new instance of MatchWriteNode - # - # source://prism//lib/prism/node.rb#11812 - sig { params(call: Prism::CallNode, targets: T::Array[Prism::Node], location: Prism::Location).void } - def initialize(call, targets, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#11819 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader call: CallNode - # - # source://prism//lib/prism/node.rb#11806 - sig { returns(Prism::CallNode) } - def call; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11824 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11834 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11829 - def compact_child_nodes; end - - # def copy: (**params) -> MatchWriteNode - # - # source://prism//lib/prism/node.rb#11839 - sig { params(params: T.untyped).returns(Prism::MatchWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11824 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#11851 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#11856 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader targets: Array[Node] - # - # source://prism//lib/prism/node.rb#11809 - sig { returns(T::Array[Prism::Node]) } - def targets; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11878 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11888 - 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#11895 -class Prism::MissingNode < ::Prism::Node - # def initialize: (location: Location) -> void - # - # @return [MissingNode] a new instance of MissingNode - # - # source://prism//lib/prism/node.rb#11897 - sig { params(location: Prism::Location).void } - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#11902 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11907 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#11917 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#11912 - def compact_child_nodes; end - - # def copy: (**params) -> MissingNode - # - # source://prism//lib/prism/node.rb#11922 - sig { params(params: T.untyped).returns(Prism::MissingNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#11907 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#11932 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#11937 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11956 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11966 - def type; end - end -end - -# Represents a module declaration involving the `module` keyword. -# -# module Foo end -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#11975 -class Prism::ModuleNode < ::Prism::Node - # def initialize: (locals: Array[Symbol], module_keyword_loc: Location, constant_path: Node, body: Node?, end_keyword_loc: Location, name: Symbol, location: Location) -> void - # - # @return [ModuleNode] a new instance of ModuleNode - # - # source://prism//lib/prism/node.rb#11995 - 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 - ).void - end - def initialize(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#12006 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#11986 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12011 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12024 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12016 - def compact_child_nodes; end - - # attr_reader constant_path: Node - # - # source://prism//lib/prism/node.rb#11983 - sig { returns(Prism::Node) } - def constant_path; end - - # def copy: (**params) -> ModuleNode - # - # source://prism//lib/prism/node.rb#12029 - sig { params(params: T.untyped).returns(Prism::ModuleNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12011 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#12045 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#12055 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#11989 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#12060 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#11977 - sig { returns(T::Array[Symbol]) } - def locals; end - - # def module_keyword: () -> String - # - # source://prism//lib/prism/node.rb#12050 - sig { returns(String) } - def module_keyword; end - - # attr_reader module_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#11980 - sig { returns(Prism::Location) } - def module_keyword_loc; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#11992 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12091 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12101 - def type; end - end -end - -# Represents a multi-target expression. -# -# a, (b, c) = 1, 2, 3 -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#12110 -class Prism::MultiTargetNode < ::Prism::Node - # def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location) -> void - # - # @return [MultiTargetNode] a new instance of MultiTargetNode - # - # source://prism//lib/prism/node.rb#12127 - sig do - params( - lefts: T::Array[Prism::Node], - rest: T.nilable(Prism::Node), - rights: T::Array[Prism::Node], - lparen_loc: T.nilable(Prism::Location), - rparen_loc: T.nilable(Prism::Location), - location: Prism::Location - ).void - end - def initialize(lefts, rest, rights, lparen_loc, rparen_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#12137 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12142 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12156 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12147 - def compact_child_nodes; end - - # def copy: (**params) -> MultiTargetNode - # - # source://prism//lib/prism/node.rb#12161 - sig { params(params: T.untyped).returns(Prism::MultiTargetNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12142 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#12176 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#12191 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader lefts: Array[Node] - # - # source://prism//lib/prism/node.rb#12112 - sig { returns(T::Array[Prism::Node]) } - def lefts; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#12181 - sig { returns(T.nilable(String)) } - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#12121 - sig { returns(T.nilable(Prism::Location)) } - def lparen_loc; end - - # attr_reader rest: Node? - # - # source://prism//lib/prism/node.rb#12115 - sig { returns(T.nilable(Prism::Node)) } - def rest; end - - # attr_reader rights: Array[Node] - # - # source://prism//lib/prism/node.rb#12118 - sig { returns(T::Array[Prism::Node]) } - def rights; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#12186 - sig { returns(T.nilable(String)) } - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#12124 - sig { returns(T.nilable(Prism::Location)) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12220 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12230 - def type; end - end -end - -# Represents a write to a multi-target expression. -# -# a, b, c = 1, 2, 3 -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#12239 -class Prism::MultiWriteNode < ::Prism::Node - # def initialize: (lefts: Array[Node], rest: Node?, rights: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [MultiWriteNode] a new instance of MultiWriteNode - # - # source://prism//lib/prism/node.rb#12262 - sig do - params( - lefts: T::Array[Prism::Node], - rest: T.nilable(Prism::Node), - rights: T::Array[Prism::Node], - 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(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#12274 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12279 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12294 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12284 - def compact_child_nodes; end - - # def copy: (**params) -> MultiWriteNode - # - # source://prism//lib/prism/node.rb#12299 - sig { params(params: T.untyped).returns(Prism::MultiWriteNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12279 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#12316 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#12336 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader lefts: Array[Node] - # - # source://prism//lib/prism/node.rb#12241 - sig { returns(T::Array[Prism::Node]) } - def lefts; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#12321 - sig { returns(T.nilable(String)) } - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#12250 - sig { returns(T.nilable(Prism::Location)) } - def lparen_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#12331 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#12256 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader rest: Node? - # - # source://prism//lib/prism/node.rb#12244 - sig { returns(T.nilable(Prism::Node)) } - def rest; end - - # attr_reader rights: Array[Node] - # - # source://prism//lib/prism/node.rb#12247 - sig { returns(T::Array[Prism::Node]) } - def rights; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#12326 - sig { returns(T.nilable(String)) } - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#12253 - sig { returns(T.nilable(Prism::Location)) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12368 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#12259 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12378 - def type; end - end -end - -# This visitor walks through the tree and copies each node as it is being -# visited. This is useful for consumers that want to mutate the tree, as you -# can change subtrees in place without effecting the rest of the tree. -# -# source://prism//lib/prism/mutation_compiler.rb#12 -class Prism::MutationCompiler < ::Prism::Compiler - # Copy a AliasGlobalVariableNode node - # - # source://prism//lib/prism/mutation_compiler.rb#14 - def visit_alias_global_variable_node(node); end - - # Copy a AliasMethodNode node - # - # source://prism//lib/prism/mutation_compiler.rb#19 - def visit_alias_method_node(node); end - - # Copy a AlternationPatternNode node - # - # source://prism//lib/prism/mutation_compiler.rb#24 - def visit_alternation_pattern_node(node); end - - # Copy a AndNode node - # - # source://prism//lib/prism/mutation_compiler.rb#29 - def visit_and_node(node); end - - # Copy a ArgumentsNode node - # - # source://prism//lib/prism/mutation_compiler.rb#34 - def visit_arguments_node(node); end - - # Copy a ArrayNode node - # - # source://prism//lib/prism/mutation_compiler.rb#39 - def visit_array_node(node); end - - # Copy a ArrayPatternNode node - # - # source://prism//lib/prism/mutation_compiler.rb#44 - def visit_array_pattern_node(node); end - - # Copy a AssocNode node - # - # source://prism//lib/prism/mutation_compiler.rb#49 - def visit_assoc_node(node); end - - # Copy a AssocSplatNode node - # - # source://prism//lib/prism/mutation_compiler.rb#54 - def visit_assoc_splat_node(node); end - - # Copy a BackReferenceReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#59 - def visit_back_reference_read_node(node); end - - # Copy a BeginNode node - # - # source://prism//lib/prism/mutation_compiler.rb#64 - def visit_begin_node(node); end - - # Copy a BlockArgumentNode node - # - # source://prism//lib/prism/mutation_compiler.rb#69 - def visit_block_argument_node(node); end - - # Copy a BlockLocalVariableNode node - # - # source://prism//lib/prism/mutation_compiler.rb#74 - def visit_block_local_variable_node(node); end - - # Copy a BlockNode node - # - # source://prism//lib/prism/mutation_compiler.rb#79 - def visit_block_node(node); end - - # Copy a BlockParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#84 - def visit_block_parameter_node(node); end - - # Copy a BlockParametersNode node - # - # source://prism//lib/prism/mutation_compiler.rb#89 - def visit_block_parameters_node(node); end - - # Copy a BreakNode node - # - # source://prism//lib/prism/mutation_compiler.rb#94 - def visit_break_node(node); end - - # Copy a CallAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#99 - def visit_call_and_write_node(node); end - - # Copy a CallNode node - # - # source://prism//lib/prism/mutation_compiler.rb#104 - def visit_call_node(node); end - - # Copy a CallOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#109 - def visit_call_operator_write_node(node); end - - # Copy a CallOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#114 - def visit_call_or_write_node(node); end - - # Copy a CallTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#119 - def visit_call_target_node(node); end - - # Copy a CapturePatternNode node - # - # source://prism//lib/prism/mutation_compiler.rb#124 - def visit_capture_pattern_node(node); end - - # Copy a CaseMatchNode node - # - # source://prism//lib/prism/mutation_compiler.rb#129 - def visit_case_match_node(node); end - - # Copy a CaseNode node - # - # source://prism//lib/prism/mutation_compiler.rb#134 - def visit_case_node(node); end - - # Copy a ClassNode node - # - # source://prism//lib/prism/mutation_compiler.rb#139 - def visit_class_node(node); end - - # Copy a ClassVariableAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#144 - def visit_class_variable_and_write_node(node); end - - # Copy a ClassVariableOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#149 - def visit_class_variable_operator_write_node(node); end - - # Copy a ClassVariableOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#154 - def visit_class_variable_or_write_node(node); end - - # Copy a ClassVariableReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#159 - def visit_class_variable_read_node(node); end - - # Copy a ClassVariableTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#164 - def visit_class_variable_target_node(node); end - - # Copy a ClassVariableWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#169 - def visit_class_variable_write_node(node); end - - # Copy a ConstantAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#174 - def visit_constant_and_write_node(node); end - - # Copy a ConstantOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#179 - def visit_constant_operator_write_node(node); end - - # Copy a ConstantOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#184 - def visit_constant_or_write_node(node); end - - # Copy a ConstantPathAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#189 - def visit_constant_path_and_write_node(node); end - - # Copy a ConstantPathNode node - # - # source://prism//lib/prism/mutation_compiler.rb#194 - def visit_constant_path_node(node); end - - # Copy a ConstantPathOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#199 - def visit_constant_path_operator_write_node(node); end - - # Copy a ConstantPathOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#204 - def visit_constant_path_or_write_node(node); end - - # Copy a ConstantPathTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#209 - def visit_constant_path_target_node(node); end - - # Copy a ConstantPathWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#214 - def visit_constant_path_write_node(node); end - - # Copy a ConstantReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#219 - def visit_constant_read_node(node); end - - # Copy a ConstantTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#224 - def visit_constant_target_node(node); end - - # Copy a ConstantWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#229 - def visit_constant_write_node(node); end - - # Copy a DefNode node - # - # source://prism//lib/prism/mutation_compiler.rb#234 - def visit_def_node(node); end - - # Copy a DefinedNode node - # - # source://prism//lib/prism/mutation_compiler.rb#239 - def visit_defined_node(node); end - - # Copy a ElseNode node - # - # source://prism//lib/prism/mutation_compiler.rb#244 - def visit_else_node(node); end - - # Copy a EmbeddedStatementsNode node - # - # source://prism//lib/prism/mutation_compiler.rb#249 - def visit_embedded_statements_node(node); end - - # Copy a EmbeddedVariableNode node - # - # source://prism//lib/prism/mutation_compiler.rb#254 - def visit_embedded_variable_node(node); end - - # Copy a EnsureNode node - # - # source://prism//lib/prism/mutation_compiler.rb#259 - def visit_ensure_node(node); end - - # Copy a FalseNode node - # - # source://prism//lib/prism/mutation_compiler.rb#264 - def visit_false_node(node); end - - # Copy a FindPatternNode node - # - # source://prism//lib/prism/mutation_compiler.rb#269 - def visit_find_pattern_node(node); end - - # Copy a FlipFlopNode node - # - # source://prism//lib/prism/mutation_compiler.rb#274 - def visit_flip_flop_node(node); end - - # Copy a FloatNode node - # - # source://prism//lib/prism/mutation_compiler.rb#279 - def visit_float_node(node); end - - # Copy a ForNode node - # - # source://prism//lib/prism/mutation_compiler.rb#284 - def visit_for_node(node); end - - # Copy a ForwardingArgumentsNode node - # - # source://prism//lib/prism/mutation_compiler.rb#289 - def visit_forwarding_arguments_node(node); end - - # Copy a ForwardingParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#294 - def visit_forwarding_parameter_node(node); end - - # Copy a ForwardingSuperNode node - # - # source://prism//lib/prism/mutation_compiler.rb#299 - def visit_forwarding_super_node(node); end - - # Copy a GlobalVariableAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#304 - def visit_global_variable_and_write_node(node); end - - # Copy a GlobalVariableOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#309 - def visit_global_variable_operator_write_node(node); end - - # Copy a GlobalVariableOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#314 - def visit_global_variable_or_write_node(node); end - - # Copy a GlobalVariableReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#319 - def visit_global_variable_read_node(node); end - - # Copy a GlobalVariableTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#324 - def visit_global_variable_target_node(node); end - - # Copy a GlobalVariableWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#329 - def visit_global_variable_write_node(node); end - - # Copy a HashNode node - # - # source://prism//lib/prism/mutation_compiler.rb#334 - def visit_hash_node(node); end - - # Copy a HashPatternNode node - # - # source://prism//lib/prism/mutation_compiler.rb#339 - def visit_hash_pattern_node(node); end - - # Copy a IfNode node - # - # source://prism//lib/prism/mutation_compiler.rb#344 - def visit_if_node(node); end - - # Copy a ImaginaryNode node - # - # source://prism//lib/prism/mutation_compiler.rb#349 - def visit_imaginary_node(node); end - - # Copy a ImplicitNode node - # - # source://prism//lib/prism/mutation_compiler.rb#354 - def visit_implicit_node(node); end - - # Copy a ImplicitRestNode node - # - # source://prism//lib/prism/mutation_compiler.rb#359 - def visit_implicit_rest_node(node); end - - # Copy a InNode node - # - # source://prism//lib/prism/mutation_compiler.rb#364 - def visit_in_node(node); end - - # Copy a IndexAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#369 - def visit_index_and_write_node(node); end - - # Copy a IndexOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#374 - def visit_index_operator_write_node(node); end - - # Copy a IndexOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#379 - def visit_index_or_write_node(node); end - - # Copy a IndexTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#384 - def visit_index_target_node(node); end - - # Copy a InstanceVariableAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#389 - def visit_instance_variable_and_write_node(node); end - - # Copy a InstanceVariableOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#394 - def visit_instance_variable_operator_write_node(node); end - - # Copy a InstanceVariableOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#399 - def visit_instance_variable_or_write_node(node); end - - # Copy a InstanceVariableReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#404 - def visit_instance_variable_read_node(node); end - - # Copy a InstanceVariableTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#409 - def visit_instance_variable_target_node(node); end - - # Copy a InstanceVariableWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#414 - def visit_instance_variable_write_node(node); end - - # Copy a IntegerNode node - # - # source://prism//lib/prism/mutation_compiler.rb#419 - def visit_integer_node(node); end - - # Copy a InterpolatedMatchLastLineNode node - # - # source://prism//lib/prism/mutation_compiler.rb#424 - def visit_interpolated_match_last_line_node(node); end - - # Copy a InterpolatedRegularExpressionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#429 - def visit_interpolated_regular_expression_node(node); end - - # Copy a InterpolatedStringNode node - # - # source://prism//lib/prism/mutation_compiler.rb#434 - def visit_interpolated_string_node(node); end - - # Copy a InterpolatedSymbolNode node - # - # source://prism//lib/prism/mutation_compiler.rb#439 - def visit_interpolated_symbol_node(node); end - - # Copy a InterpolatedXStringNode node - # - # source://prism//lib/prism/mutation_compiler.rb#444 - def visit_interpolated_x_string_node(node); end - - # Copy a KeywordHashNode node - # - # source://prism//lib/prism/mutation_compiler.rb#449 - def visit_keyword_hash_node(node); end - - # Copy a KeywordRestParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#454 - def visit_keyword_rest_parameter_node(node); end - - # Copy a LambdaNode node - # - # source://prism//lib/prism/mutation_compiler.rb#459 - def visit_lambda_node(node); end - - # Copy a LocalVariableAndWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#464 - def visit_local_variable_and_write_node(node); end - - # Copy a LocalVariableOperatorWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#469 - def visit_local_variable_operator_write_node(node); end - - # Copy a LocalVariableOrWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#474 - def visit_local_variable_or_write_node(node); end - - # Copy a LocalVariableReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#479 - def visit_local_variable_read_node(node); end - - # Copy a LocalVariableTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#484 - def visit_local_variable_target_node(node); end - - # Copy a LocalVariableWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#489 - def visit_local_variable_write_node(node); end - - # Copy a MatchLastLineNode node - # - # source://prism//lib/prism/mutation_compiler.rb#494 - def visit_match_last_line_node(node); end - - # Copy a MatchPredicateNode node - # - # source://prism//lib/prism/mutation_compiler.rb#499 - def visit_match_predicate_node(node); end - - # Copy a MatchRequiredNode node - # - # source://prism//lib/prism/mutation_compiler.rb#504 - def visit_match_required_node(node); end - - # Copy a MatchWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#509 - def visit_match_write_node(node); end - - # Copy a MissingNode node - # - # source://prism//lib/prism/mutation_compiler.rb#514 - def visit_missing_node(node); end - - # Copy a ModuleNode node - # - # source://prism//lib/prism/mutation_compiler.rb#519 - def visit_module_node(node); end - - # Copy a MultiTargetNode node - # - # source://prism//lib/prism/mutation_compiler.rb#524 - def visit_multi_target_node(node); end - - # Copy a MultiWriteNode node - # - # source://prism//lib/prism/mutation_compiler.rb#529 - def visit_multi_write_node(node); end - - # Copy a NextNode node - # - # source://prism//lib/prism/mutation_compiler.rb#534 - def visit_next_node(node); end - - # Copy a NilNode node - # - # source://prism//lib/prism/mutation_compiler.rb#539 - def visit_nil_node(node); end - - # Copy a NoKeywordsParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#544 - def visit_no_keywords_parameter_node(node); end - - # Copy a NumberedParametersNode node - # - # source://prism//lib/prism/mutation_compiler.rb#549 - def visit_numbered_parameters_node(node); end - - # Copy a NumberedReferenceReadNode node - # - # source://prism//lib/prism/mutation_compiler.rb#554 - def visit_numbered_reference_read_node(node); end - - # Copy a OptionalKeywordParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#559 - def visit_optional_keyword_parameter_node(node); end - - # Copy a OptionalParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#564 - def visit_optional_parameter_node(node); end - - # Copy a OrNode node - # - # source://prism//lib/prism/mutation_compiler.rb#569 - def visit_or_node(node); end - - # Copy a ParametersNode node - # - # source://prism//lib/prism/mutation_compiler.rb#574 - def visit_parameters_node(node); end - - # Copy a ParenthesesNode node - # - # source://prism//lib/prism/mutation_compiler.rb#579 - def visit_parentheses_node(node); end - - # Copy a PinnedExpressionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#584 - def visit_pinned_expression_node(node); end - - # Copy a PinnedVariableNode node - # - # source://prism//lib/prism/mutation_compiler.rb#589 - def visit_pinned_variable_node(node); end - - # Copy a PostExecutionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#594 - def visit_post_execution_node(node); end - - # Copy a PreExecutionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#599 - def visit_pre_execution_node(node); end - - # Copy a ProgramNode node - # - # source://prism//lib/prism/mutation_compiler.rb#604 - def visit_program_node(node); end - - # Copy a RangeNode node - # - # source://prism//lib/prism/mutation_compiler.rb#609 - def visit_range_node(node); end - - # Copy a RationalNode node - # - # source://prism//lib/prism/mutation_compiler.rb#614 - def visit_rational_node(node); end - - # Copy a RedoNode node - # - # source://prism//lib/prism/mutation_compiler.rb#619 - def visit_redo_node(node); end - - # Copy a RegularExpressionNode node - # - # source://prism//lib/prism/mutation_compiler.rb#624 - def visit_regular_expression_node(node); end - - # Copy a RequiredKeywordParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#629 - def visit_required_keyword_parameter_node(node); end - - # Copy a RequiredParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#634 - def visit_required_parameter_node(node); end - - # Copy a RescueModifierNode node - # - # source://prism//lib/prism/mutation_compiler.rb#639 - def visit_rescue_modifier_node(node); end - - # Copy a RescueNode node - # - # source://prism//lib/prism/mutation_compiler.rb#644 - def visit_rescue_node(node); end - - # Copy a RestParameterNode node - # - # source://prism//lib/prism/mutation_compiler.rb#649 - def visit_rest_parameter_node(node); end - - # Copy a RetryNode node - # - # source://prism//lib/prism/mutation_compiler.rb#654 - def visit_retry_node(node); end - - # Copy a ReturnNode node - # - # source://prism//lib/prism/mutation_compiler.rb#659 - def visit_return_node(node); end - - # Copy a SelfNode node - # - # source://prism//lib/prism/mutation_compiler.rb#664 - def visit_self_node(node); end - - # Copy a SingletonClassNode node - # - # source://prism//lib/prism/mutation_compiler.rb#669 - def visit_singleton_class_node(node); end - - # Copy a SourceEncodingNode node - # - # source://prism//lib/prism/mutation_compiler.rb#674 - def visit_source_encoding_node(node); end - - # Copy a SourceFileNode node - # - # source://prism//lib/prism/mutation_compiler.rb#679 - def visit_source_file_node(node); end - - # Copy a SourceLineNode node - # - # source://prism//lib/prism/mutation_compiler.rb#684 - def visit_source_line_node(node); end - - # Copy a SplatNode node - # - # source://prism//lib/prism/mutation_compiler.rb#689 - def visit_splat_node(node); end - - # Copy a StatementsNode node - # - # source://prism//lib/prism/mutation_compiler.rb#694 - def visit_statements_node(node); end - - # Copy a StringNode node - # - # source://prism//lib/prism/mutation_compiler.rb#699 - def visit_string_node(node); end - - # Copy a SuperNode node - # - # source://prism//lib/prism/mutation_compiler.rb#704 - def visit_super_node(node); end - - # Copy a SymbolNode node - # - # source://prism//lib/prism/mutation_compiler.rb#709 - def visit_symbol_node(node); end - - # Copy a TrueNode node - # - # source://prism//lib/prism/mutation_compiler.rb#714 - def visit_true_node(node); end - - # Copy a UndefNode node - # - # source://prism//lib/prism/mutation_compiler.rb#719 - def visit_undef_node(node); end - - # Copy a UnlessNode node - # - # source://prism//lib/prism/mutation_compiler.rb#724 - def visit_unless_node(node); end - - # Copy a UntilNode node - # - # source://prism//lib/prism/mutation_compiler.rb#729 - def visit_until_node(node); end - - # Copy a WhenNode node - # - # source://prism//lib/prism/mutation_compiler.rb#734 - def visit_when_node(node); end - - # Copy a WhileNode node - # - # source://prism//lib/prism/mutation_compiler.rb#739 - def visit_while_node(node); end - - # Copy a XStringNode node - # - # source://prism//lib/prism/mutation_compiler.rb#744 - def visit_x_string_node(node); end - - # Copy a YieldNode node - # - # source://prism//lib/prism/mutation_compiler.rb#749 - def visit_yield_node(node); end -end - -# Represents the use of the `next` keyword. -# -# next 1 -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#12387 -class Prism::NextNode < ::Prism::Node - # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void - # - # @return [NextNode] a new instance of NextNode - # - # source://prism//lib/prism/node.rb#12395 - sig do - params( - arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(arguments, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#12402 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#12389 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12407 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12419 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12412 - def compact_child_nodes; end - - # def copy: (**params) -> NextNode - # - # source://prism//lib/prism/node.rb#12424 - sig { params(params: T.untyped).returns(Prism::NextNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12407 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#12436 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#12446 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#12441 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#12392 - sig { returns(Prism::Location) } - def keyword_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12472 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12482 - def type; end - end -end - -# Represents the use of the `nil` keyword. -# -# nil -# ^^^ -# -# source://prism//lib/prism/node.rb#12491 -class Prism::NilNode < ::Prism::Node - # def initialize: (location: Location) -> void - # - # @return [NilNode] a new instance of NilNode - # - # source://prism//lib/prism/node.rb#12493 - sig { params(location: Prism::Location).void } - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#12498 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12503 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12513 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12508 - def compact_child_nodes; end - - # def copy: (**params) -> NilNode - # - # source://prism//lib/prism/node.rb#12518 - sig { params(params: T.untyped).returns(Prism::NilNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12503 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#12528 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#12533 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12552 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12562 - def type; end - end -end - -# Represents the use of `**nil` inside method arguments. -# -# def a(**nil) -# ^^^^^ -# end -# -# source://prism//lib/prism/node.rb#12572 -class Prism::NoKeywordsParameterNode < ::Prism::Node - # def initialize: (operator_loc: Location, keyword_loc: Location, location: Location) -> void - # - # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode - # - # source://prism//lib/prism/node.rb#12580 - sig { params(operator_loc: Prism::Location, keyword_loc: Prism::Location, location: Prism::Location).void } - def initialize(operator_loc, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#12587 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12592 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12602 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12597 - def compact_child_nodes; end - - # def copy: (**params) -> NoKeywordsParameterNode - # - # source://prism//lib/prism/node.rb#12607 - sig { params(params: T.untyped).returns(Prism::NoKeywordsParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12592 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#12619 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#12634 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#12629 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#12577 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#12624 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#12574 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12655 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12665 - def type; end - end -end - -# This represents a node in the tree. It is the parent class of all of the -# various node types. -# -# source://prism//lib/prism/node.rb#11 -class Prism::Node - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # A Location instance that represents the location of this node in the - # source. - # - # source://prism//lib/prism/node.rb#14 - sig { returns(Prism::Location) } - def location; end - - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16 - 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#35 - def pretty_print(q); end - - # source://prism//lib/prism/node.rb#20 - def set_newline_flag(newline_marked); end - - # Slice the location of the node from the source. - # - # source://prism//lib/prism/node.rb#29 - sig { returns(String) } - def slice; end - - # Convert this node into a graphviz dot graph string. - # - # source://prism//lib/prism/node.rb#43 - sig { returns(String) } - def to_dot; end -end - -# This object is responsible for generating the output for the inspect method -# implementations of child nodes. -# -# source://prism//lib/prism/node_inspector.rb#6 -class Prism::NodeInspector - # @return [NodeInspector] a new instance of NodeInspector - # - # source://prism//lib/prism/node_inspector.rb#9 - def initialize(prefix = T.unsafe(nil)); end - - # Appends a line to the output with the current prefix. - # - # source://prism//lib/prism/node_inspector.rb#15 - sig { params(line: String).void } - def <<(line); end - - # Returns a new inspector that can be used to inspect a child node. - # - # source://prism//lib/prism/node_inspector.rb#59 - sig { params(append: String).returns(Prism::NodeInspector) } - def child_inspector(append); end - - # Generates a string that represents a child node. - # - # source://prism//lib/prism/node_inspector.rb#54 - sig { params(node: Prism::Node, append: String).returns(String) } - def child_node(node, append); end - - # This generates a string that is used as the header of the inspect output - # for any given node. - # - # source://prism//lib/prism/node_inspector.rb#21 - # This generates a string that is used as the header of the inspect output - sig { params(node: Prism::Node).returns(String) } - def header(node); end - - # Generates a string that represents a list of nodes. It handles properly - # using the box drawing characters to make the output look nice. - # - # source://prism//lib/prism/node_inspector.rb#31 - # Generates a string that represents a list of nodes. It handles properly - sig { params(prefix: String, nodes: T::Array[Prism::Node]).returns(String) } - def list(prefix, nodes); end - - # Generates a string that represents a location field on a node. - # - # source://prism//lib/prism/node_inspector.rb#45 - sig { params(value: Prism::Location).returns(String) } - def location(value); end - - # source://prism//lib/prism/node_inspector.rb#7 - sig { returns(String) } - def output; end - - # source://prism//lib/prism/node_inspector.rb#7 - sig { returns(String) } - def prefix; end - - # Returns the output as a string. - # - # source://prism//lib/prism/node_inspector.rb#64 - sig { returns(String) } - def to_str; end -end - -# Represents an implicit set of parameters through the use of numbered -# parameters within a block or lambda. -# -# -> { _1 + _2 } -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#12675 -class Prism::NumberedParametersNode < ::Prism::Node - # def initialize: (maximum: Integer, location: Location) -> void - # - # @return [NumberedParametersNode] a new instance of NumberedParametersNode - # - # source://prism//lib/prism/node.rb#12680 - sig { params(maximum: Integer, location: Prism::Location).void } - def initialize(maximum, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#12686 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12691 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12701 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12696 - def compact_child_nodes; end - - # def copy: (**params) -> NumberedParametersNode - # - # source://prism//lib/prism/node.rb#12706 - sig { params(params: T.untyped).returns(Prism::NumberedParametersNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12691 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#12717 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#12722 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader maximum: Integer - # - # source://prism//lib/prism/node.rb#12677 - sig { returns(Integer) } - def maximum; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12742 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12752 - def type; end - end -end - -# Represents reading a numbered reference to a capture in the previous match. -# -# $1 -# ^^ -# -# source://prism//lib/prism/node.rb#12761 -class Prism::NumberedReferenceReadNode < ::Prism::Node - # def initialize: (number: Integer, location: Location) -> void - # - # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode - # - # source://prism//lib/prism/node.rb#12766 - sig { params(number: Integer, location: Prism::Location).void } - def initialize(number, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#12772 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12777 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12787 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12782 - def compact_child_nodes; end - - # def copy: (**params) -> NumberedReferenceReadNode - # - # source://prism//lib/prism/node.rb#12792 - sig { params(params: T.untyped).returns(Prism::NumberedReferenceReadNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12777 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#12803 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#12808 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader number: Integer - # - # source://prism//lib/prism/node.rb#12763 - sig { returns(Integer) } - def number; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12828 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12838 - def type; end - end -end - -# Represents an optional keyword parameter to a method, block, or lambda definition. -# -# def a(b: 1) -# ^^^^ -# end -# -# source://prism//lib/prism/node.rb#12848 -class Prism::OptionalKeywordParameterNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, value: Node, location: Location) -> void - # - # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode - # - # source://prism//lib/prism/node.rb#12859 - sig { params(name: Symbol, name_loc: Prism::Location, value: Prism::Node, location: Prism::Location).void } - def initialize(name, name_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#12867 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12872 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12882 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12877 - def compact_child_nodes; end - - # def copy: (**params) -> OptionalKeywordParameterNode - # - # source://prism//lib/prism/node.rb#12887 - sig { params(params: T.untyped).returns(Prism::OptionalKeywordParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12872 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#12900 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#12905 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#12850 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#12853 - sig { returns(Prism::Location) } - def name_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12928 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#12856 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12938 - def type; end - end -end - -# Represents an optional parameter to a method, block, or lambda definition. -# -# def a(b = 1) -# ^^^^^ -# end -# -# source://prism//lib/prism/node.rb#12948 -class Prism::OptionalParameterNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void - # - # @return [OptionalParameterNode] a new instance of OptionalParameterNode - # - # source://prism//lib/prism/node.rb#12962 - sig do - params( - name: Symbol, - name_loc: Prism::Location, - operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#12971 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12976 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#12986 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#12981 - def compact_child_nodes; end - - # def copy: (**params) -> OptionalParameterNode - # - # source://prism//lib/prism/node.rb#12991 - sig { params(params: T.untyped).returns(Prism::OptionalParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#12976 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#13005 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#13015 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#12950 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#12953 - sig { returns(Prism::Location) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#13010 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#12956 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13039 - def type; end - - # attr_reader value: Node - # - # source://prism//lib/prism/node.rb#12959 - sig { returns(Prism::Node) } - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13049 - def type; end - end -end - -# Represents the use of the `||` operator or the `or` keyword. -# -# left or right -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#13058 -class Prism::OrNode < ::Prism::Node - # def initialize: (left: Node, right: Node, operator_loc: Location, location: Location) -> void - # - # @return [OrNode] a new instance of OrNode - # - # source://prism//lib/prism/node.rb#13069 - sig { params(left: Prism::Node, right: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).void } - def initialize(left, right, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#13077 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13082 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13092 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13087 - def compact_child_nodes; end - - # def copy: (**params) -> OrNode - # - # source://prism//lib/prism/node.rb#13097 - sig { params(params: T.untyped).returns(Prism::OrNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13082 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#13110 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#13120 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node - # - # source://prism//lib/prism/node.rb#13060 - sig { returns(Prism::Node) } - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#13115 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#13066 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader right: Node - # - # source://prism//lib/prism/node.rb#13063 - sig { returns(Prism::Node) } - def right; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13144 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13154 - def type; end - end -end - -# A parser for the pack template language. -# -# source://prism//lib/prism/pack.rb#5 -module Prism::Pack - class << self - def parse(_arg0, _arg1, _arg2); end - end -end - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) - -# A directive in the pack template language. -# -# source://prism//lib/prism/pack.rb#59 -class Prism::Pack::Directive - # Initialize a new directive with the given values. - # - # @return [Directive] a new instance of Directive - # - # source://prism//lib/prism/pack.rb#88 - def initialize(version, variant, source, type, signed, endian, size, length_type, length); end - - # Provide a human-readable description of the directive. - # - # source://prism//lib/prism/pack.rb#130 - def describe; end - - # The type of endianness of the directive. - # - # source://prism//lib/prism/pack.rb#76 - def endian; end - - # The length of this directive (used for integers). - # - # source://prism//lib/prism/pack.rb#85 - def length; end - - # The length type of this directive (used for integers). - # - # source://prism//lib/prism/pack.rb#82 - def length_type; end - - # The type of signedness of the directive. - # - # source://prism//lib/prism/pack.rb#73 - def signed; end - - # The size of the directive. - # - # source://prism//lib/prism/pack.rb#79 - def size; end - - # A byteslice of the source string that this directive represents. - # - # source://prism//lib/prism/pack.rb#67 - def source; end - - # The type of the directive. - # - # source://prism//lib/prism/pack.rb#70 - def type; end - - # A symbol representing whether or not we are packing or unpacking. - # - # source://prism//lib/prism/pack.rb#64 - def variant; end - - # A symbol representing the version of Ruby. - # - # source://prism//lib/prism/pack.rb#61 - def version; end -end - -# The descriptions of the various types of endianness. -# -# source://prism//lib/prism/pack.rb#101 -Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) - -# The descriptions of the various types of signedness. -# -# source://prism//lib/prism/pack.rb#110 -Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) - -# The descriptions of the various types of sizes. -# -# source://prism//lib/prism/pack.rb#117 -Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) - -# The result of parsing a pack template. -# -# source://prism//lib/prism/pack.rb#195 -class Prism::Pack::Format - # Create a new Format with the given directives and encoding. - # - # @return [Format] a new instance of Format - # - # source://prism//lib/prism/pack.rb#203 - def initialize(directives, encoding); end - - # Provide a human-readable description of the format. - # - # source://prism//lib/prism/pack.rb#209 - def describe; end - - # A list of the directives in the template. - # - # source://prism//lib/prism/pack.rb#197 - def directives; end - - # The encoding of the template. - # - # source://prism//lib/prism/pack.rb#200 - def encoding; end -end - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) - -# source://prism//lib/prism/pack.rb#55 -Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) - -# Represents the list of parameters on a method, block, or lambda definition. -# -# def a(b, c, d) -# ^^^^^^^ -# end -# -# source://prism//lib/prism/node.rb#13164 -class Prism::ParametersNode < ::Prism::Node - # def initialize: (requireds: Array[Node], optionals: Array[Node], rest: Node?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void - # - # @return [ParametersNode] a new instance of ParametersNode - # - # source://prism//lib/prism/node.rb#13187 - sig do - params( - requireds: T::Array[Prism::Node], - optionals: T::Array[Prism::Node], - rest: T.nilable(Prism::Node), - posts: T::Array[Prism::Node], - keywords: T::Array[Prism::Node], - keyword_rest: T.nilable(Prism::Node), - block: T.nilable(Prism::BlockParameterNode), - location: Prism::Location - ).void - end - def initialize(requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#13199 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader block: BlockParameterNode? - # - # source://prism//lib/prism/node.rb#13184 - sig { returns(T.nilable(Prism::BlockParameterNode)) } - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13204 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13222 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13209 - def compact_child_nodes; end - - # def copy: (**params) -> ParametersNode - # - # source://prism//lib/prism/node.rb#13227 - sig { params(params: T.untyped).returns(Prism::ParametersNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13204 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#13244 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#13249 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader keyword_rest: Node? - # - # source://prism//lib/prism/node.rb#13181 - sig { returns(T.nilable(Prism::Node)) } - def keyword_rest; end - - # attr_reader keywords: Array[Node] - # - # source://prism//lib/prism/node.rb#13178 - sig { returns(T::Array[Prism::Node]) } - def keywords; end - - # attr_reader optionals: Array[Node] - # - # source://prism//lib/prism/node.rb#13169 - sig { returns(T::Array[Prism::Node]) } - def optionals; end - - # attr_reader posts: Array[Node] - # - # source://prism//lib/prism/node.rb#13175 - sig { returns(T::Array[Prism::Node]) } - def posts; end - - # attr_reader requireds: Array[Node] - # - # source://prism//lib/prism/node.rb#13166 - sig { returns(T::Array[Prism::Node]) } - def requireds; end - - # attr_reader rest: Node? - # - # source://prism//lib/prism/node.rb#13172 - sig { returns(T.nilable(Prism::Node)) } - def rest; end - - # Mirrors the Method#parameters method. - # - # source://prism//lib/prism/node_ext.rb#149 - def signature; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13290 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13300 - def type; end - end -end - -# Represents a parenthesized expression -# -# (10 + 34) -# ^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#13309 -class Prism::ParenthesesNode < ::Prism::Node - # def initialize: (body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void - # - # @return [ParenthesesNode] a new instance of ParenthesesNode - # - # source://prism//lib/prism/node.rb#13320 - sig do - params( - body: T.nilable(Prism::Node), - opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(body, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#13328 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#13311 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13337 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#13377 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#13317 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13349 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13342 - def compact_child_nodes; end - - # def copy: (**params) -> ParenthesesNode - # - # source://prism//lib/prism/node.rb#13354 - sig { params(params: T.untyped).returns(Prism::ParenthesesNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13337 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#13367 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#13382 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#13372 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#13314 - sig { returns(Prism::Location) } - def opening_loc; end - - # source://prism//lib/prism/node.rb#13332 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13409 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13419 - def type; end - end -end - -# This represents an error that was encountered during parsing. -# -# source://prism//lib/prism/parse_result.rb#308 -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#316 - def initialize(message, location); end - - # Implement the hash pattern matching interface for ParseError. - # - # source://prism//lib/prism/parse_result.rb#322 - def deconstruct_keys(keys); end - - # Returns a string representation of this error. - # - # source://prism//lib/prism/parse_result.rb#327 - def inspect; end - - # A Location object representing the location of this error in the source. - # - # source://prism//lib/prism/parse_result.rb#313 - sig { returns(Prism::Location) } - def location; end - - # The message associated with this error. - # - # source://prism//lib/prism/parse_result.rb#310 - sig { returns(String) } - def message; end -end - -# This represents the result of a call to ::parse or ::parse_file. It contains -# the AST, any comments that were encounters, and any errors that were -# encountered. -# -# source://prism//lib/prism/parse_result.rb#360 -class Prism::ParseResult - # Create a new parse result object with the given values. - # - # @return [ParseResult] a new instance of ParseResult - # - # source://prism//lib/prism/parse_result.rb#387 - def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end - - # Attach the list of comments to their respective locations in the tree. - # - # source://prism//lib/prism/parse_result/comments.rb#173 - def attach_comments!; end - - # The list of comments that were encountered during parsing. - # - # source://prism//lib/prism/parse_result.rb#367 - sig { returns(T::Array[Prism::Comment]) } - def comments; end - - # An optional location that represents the location of the content after the - # __END__ marker. 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#375 - def data_loc; end - - # Implement the hash pattern matching interface for ParseResult. - # - # source://prism//lib/prism/parse_result.rb#398 - def deconstruct_keys(keys); end - - # The list of errors that were generated during parsing. - # - # source://prism//lib/prism/parse_result.rb#378 - 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#410 - def failure?; end - - # The list of magic comments that were encountered during parsing. - # - # source://prism//lib/prism/parse_result.rb#370 - 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#384 - 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#404 - 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#364 - sig { returns(Prism::ProgramNode) } - def value; end - - # The list of warnings that were generated during parsing. - # - # source://prism//lib/prism/parse_result.rb#381 - sig { returns(T::Array[Prism::ParseWarning]) } - def warnings; end -end - -# When we've parsed the source, we have both the syntax tree and the list of -# comments that we found in the source. This class is responsible for -# walking the tree and finding the nearest location to attach each comment. -# -# It does this by first finding the nearest locations to each comment. -# Locations can either come from nodes directly or from location fields on -# nodes. For example, a `ClassNode` has an overall location encompassing the -# entire class, but it also has a location for the `class` keyword. -# -# Once the nearest locations are found, it determines which one to attach -# to. If it's a trailing comment (a comment on the same line as other source -# code), it will favor attaching to the nearest location that occurs before -# the comment. Otherwise it will favor attaching to the nearest location -# that is after the comment. -# -# source://prism//lib/prism/parse_result/comments.rb#19 -class Prism::ParseResult::Comments - # Create a new Comments object that will attach comments to the given - # parse result. - # - # @return [Comments] a new instance of Comments - # - # source://prism//lib/prism/parse_result/comments.rb#78 - def initialize(parse_result); end - - # Attach the comments to their respective locations in the tree by - # mutating the parse result. - # - # source://prism//lib/prism/parse_result/comments.rb#84 - def attach!; end - - # The parse result that we are attaching comments to. - # - # source://prism//lib/prism/parse_result/comments.rb#74 - def parse_result; end - - private - - # Responsible for finding the nearest targets to the given comment within - # the context of the given encapsulating node. - # - # source://prism//lib/prism/parse_result/comments.rb#103 - def nearest_targets(node, comment); end -end - -# A target for attaching comments that is based on a location field on a -# node. For example, the `end` token of a ClassNode. -# -# source://prism//lib/prism/parse_result/comments.rb#49 -class Prism::ParseResult::Comments::LocationTarget - # @return [LocationTarget] a new instance of LocationTarget - # - # source://prism//lib/prism/parse_result/comments.rb#52 - def initialize(location); end - - # source://prism//lib/prism/parse_result/comments.rb#68 - def <<(comment); end - - # @return [Boolean] - # - # source://prism//lib/prism/parse_result/comments.rb#64 - def encloses?(comment); end - - # source://prism//lib/prism/parse_result/comments.rb#60 - def end_offset; end - - # source://prism//lib/prism/parse_result/comments.rb#50 - def location; end - - # source://prism//lib/prism/parse_result/comments.rb#56 - def start_offset; end -end - -# A target for attaching comments that is based on a specific node's -# location. -# -# source://prism//lib/prism/parse_result/comments.rb#22 -class Prism::ParseResult::Comments::NodeTarget - # @return [NodeTarget] a new instance of NodeTarget - # - # source://prism//lib/prism/parse_result/comments.rb#25 - def initialize(node); end - - # source://prism//lib/prism/parse_result/comments.rb#42 - def <<(comment); end - - # @return [Boolean] - # - # source://prism//lib/prism/parse_result/comments.rb#37 - def encloses?(comment); end - - # source://prism//lib/prism/parse_result/comments.rb#33 - def end_offset; end - - # source://prism//lib/prism/parse_result/comments.rb#23 - def node; end - - # source://prism//lib/prism/parse_result/comments.rb#29 - def start_offset; end -end - -# The :line tracepoint event gets fired whenever the Ruby VM encounters an -# expression on a new line. The types of expressions that can trigger this -# event are: -# -# * if statements -# * unless statements -# * nodes that are children of statements lists -# -# In order to keep track of the newlines, we have a list of offsets that -# come back from the parser. We assign these offsets to the first nodes that -# we find in the tree that are on those lines. -# -# Note that the logic in this file should be kept in sync with the Java -# MarkNewlinesVisitor, since that visitor is responsible for marking the -# newlines for JRuby/TruffleRuby. -# -# source://prism//lib/prism/parse_result/newlines.rb#20 -class Prism::ParseResult::Newlines < ::Prism::Visitor - # Create a new Newlines visitor with the given newline offsets. - # - # @return [Newlines] a new instance of Newlines - # - # source://prism//lib/prism/parse_result/newlines.rb#22 - def initialize(newline_marked); end - - # Permit block/lambda nodes to mark newlines within themselves. - # - # source://prism//lib/prism/parse_result/newlines.rb#27 - def visit_block_node(node); end - - # Mark if/unless nodes as newlines. - # - # source://prism//lib/prism/parse_result/newlines.rb#41 - def visit_if_node(node); end - - # Permit block/lambda nodes to mark newlines within themselves. - # - # source://prism//lib/prism/parse_result/newlines.rb#27 - def visit_lambda_node(node); end - - # Permit statements lists to mark newlines within themselves. - # - # source://prism//lib/prism/parse_result/newlines.rb#49 - def visit_statements_node(node); end - - # Mark if/unless nodes as newlines. - # - # source://prism//lib/prism/parse_result/newlines.rb#41 - def visit_unless_node(node); end -end - -# This represents a warning that was encountered during parsing. -# -# source://prism//lib/prism/parse_result.rb#333 -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#341 - def initialize(message, location); end - - # Implement the hash pattern matching interface for ParseWarning. - # - # source://prism//lib/prism/parse_result.rb#347 - def deconstruct_keys(keys); end - - # Returns a string representation of this warning. - # - # source://prism//lib/prism/parse_result.rb#352 - def inspect; end - - # A Location object representing the location of this warning in the source. - # - # source://prism//lib/prism/parse_result.rb#338 - sig { returns(Prism::Location) } - def location; end - - # The message associated with this warning. - # - # source://prism//lib/prism/parse_result.rb#335 - sig { returns(String) } - def message; end -end - -# A pattern is an object that wraps a Ruby pattern matching expression. The -# expression would normally be passed to an `in` clause within a `case` -# expression or a rightward assignment expression. For example, in the -# following snippet: -# -# case node -# in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] -# end -# -# the pattern is the ConstantPathNode[...] expression. -# -# The pattern gets compiled into an object that responds to #call by running -# the #compile method. This method itself will run back through Prism to -# parse the expression into a tree, then walk the tree to generate the -# necessary callable objects. For example, if you wanted to compile the -# expression above into a callable, you would: -# -# callable = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").compile -# callable.call(node) -# -# The callable object returned by #compile is guaranteed to respond to #call -# with a single argument, which is the node to match against. It also is -# guaranteed to respond to #===, which means it itself can be used in a `case` -# expression, as in: -# -# case node -# when callable -# end -# -# If the query given to the initializer cannot be compiled into a valid -# matcher (either because of a syntax error or because it is using syntax we -# do not yet support) then a Prism::Pattern::CompilationError will be -# raised. -# -# source://prism//lib/prism/pattern.rb#37 -class Prism::Pattern - # Create a new pattern with the given query. The query should be a string - # containing a Ruby pattern matching expression. - # - # @return [Pattern] a new instance of Pattern - # - # source://prism//lib/prism/pattern.rb#63 - def initialize(query); end - - # Compile the query into a callable object that can be used to match against - # nodes. - # - # source://prism//lib/prism/pattern.rb#70 - def compile; end - - # The query that this pattern was initialized with. - # - # source://prism//lib/prism/pattern.rb#59 - def query; end - - # Scan the given node and all of its children for nodes that match the - # pattern. If a block is given, it will be called with each node that - # matches the pattern. If no block is given, an enumerator will be returned - # that will yield each node that matches the pattern. - # - # source://prism//lib/prism/pattern.rb#79 - def scan(root); end - - private - - # Shortcut for combining two procs into one that returns true if both return - # true. - # - # source://prism//lib/prism/pattern.rb#95 - def combine_and(left, right); end - - # Shortcut for combining two procs into one that returns true if either - # returns true. - # - # source://prism//lib/prism/pattern.rb#101 - def combine_or(left, right); end - - # in foo | bar - # - # source://prism//lib/prism/pattern.rb#136 - def compile_alternation_pattern_node(node); end - - # in [foo, bar, baz] - # - # source://prism//lib/prism/pattern.rb#111 - def compile_array_pattern_node(node); end - - # in Prism::ConstantReadNode - # - # source://prism//lib/prism/pattern.rb#141 - def compile_constant_path_node(node); end - - # in ConstantReadNode - # in String - # - # source://prism//lib/prism/pattern.rb#153 - def compile_constant_read_node(node); end - - # Raise an error because the given node is not supported. - # - # @raise [CompilationError] - # - # source://prism//lib/prism/pattern.rb#106 - def compile_error(node); end - - # in InstanceVariableReadNode[name: Symbol] - # in { name: Symbol } - # - # source://prism//lib/prism/pattern.rb#171 - def compile_hash_pattern_node(node); end - - # in nil - # - # source://prism//lib/prism/pattern.rb#196 - def compile_nil_node(node); end - - # Compile any kind of node. Dispatch out to the individual compilation - # methods based on the type of node. - # - # source://prism//lib/prism/pattern.rb#225 - def compile_node(node); end - - # in /foo/ - # - # source://prism//lib/prism/pattern.rb#201 - def compile_regular_expression_node(node); end - - # in "" - # in "foo" - # - # source://prism//lib/prism/pattern.rb#209 - def compile_string_node(node); end - - # in :+ - # in :foo - # - # source://prism//lib/prism/pattern.rb#217 - def compile_symbol_node(node); end -end - -# Raised when the query given to a pattern is either invalid Ruby syntax or -# is using syntax that we don't yet support. -# -# source://prism//lib/prism/pattern.rb#40 -class Prism::Pattern::CompilationError < ::StandardError - # Create a new CompilationError with the given representation of the node - # that caused the error. - # - # @return [CompilationError] a new instance of CompilationError - # - # source://prism//lib/prism/pattern.rb#43 - def initialize(repr); end -end - -# Represents the use of the `^` operator for pinning an expression in a -# pattern matching expression. -# -# foo in ^(bar) -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#13429 -class Prism::PinnedExpressionNode < ::Prism::Node - # def initialize: (expression: Node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location) -> void - # - # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode - # - # source://prism//lib/prism/node.rb#13443 - sig do - params( - expression: Prism::Node, - operator_loc: Prism::Location, - lparen_loc: Prism::Location, - rparen_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(expression, operator_loc, lparen_loc, rparen_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#13452 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13457 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13467 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13462 - def compact_child_nodes; end - - # def copy: (**params) -> PinnedExpressionNode - # - # source://prism//lib/prism/node.rb#13472 - sig { params(params: T.untyped).returns(Prism::PinnedExpressionNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13457 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#13486 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader expression: Node - # - # source://prism//lib/prism/node.rb#13431 - sig { returns(Prism::Node) } - def expression; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#13506 - def inspect(inspector = T.unsafe(nil)); end - - # def lparen: () -> String - # - # source://prism//lib/prism/node.rb#13496 - sig { returns(String) } - def lparen; end - - # attr_reader lparen_loc: Location - # - # source://prism//lib/prism/node.rb#13437 - sig { returns(Prism::Location) } - def lparen_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#13491 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#13434 - sig { returns(Prism::Location) } - def operator_loc; end - - # def rparen: () -> String - # - # source://prism//lib/prism/node.rb#13501 - sig { returns(String) } - def rparen; end - - # attr_reader rparen_loc: Location - # - # source://prism//lib/prism/node.rb#13440 - sig { returns(Prism::Location) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13530 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13540 - def type; end - end -end - -# Represents the use of the `^` operator for pinning a variable in a pattern -# matching expression. -# -# foo in ^bar -# ^^^^ -# -# source://prism//lib/prism/node.rb#13550 -class Prism::PinnedVariableNode < ::Prism::Node - # def initialize: (variable: Node, operator_loc: Location, location: Location) -> void - # - # @return [PinnedVariableNode] a new instance of PinnedVariableNode - # - # source://prism//lib/prism/node.rb#13558 - sig { params(variable: Prism::Node, operator_loc: Prism::Location, location: Prism::Location).void } - def initialize(variable, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#13565 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13570 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13580 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13575 - def compact_child_nodes; end - - # def copy: (**params) -> PinnedVariableNode - # - # source://prism//lib/prism/node.rb#13585 - sig { params(params: T.untyped).returns(Prism::PinnedVariableNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13570 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#13597 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#13607 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#13602 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#13555 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13629 - def type; end - - # attr_reader variable: Node - # - # source://prism//lib/prism/node.rb#13552 - sig { returns(Prism::Node) } - def variable; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13639 - def type; end - end -end - -# Represents the use of the `END` keyword. -# -# END { foo } -# ^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#13648 -class Prism::PostExecutionNode < ::Prism::Node - # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void - # - # @return [PostExecutionNode] a new instance of PostExecutionNode - # - # source://prism//lib/prism/node.rb#13662 - sig do - params( - statements: T.nilable(Prism::StatementsNode), - keyword_loc: Prism::Location, - opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#13671 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13676 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#13722 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#13659 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13688 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13681 - def compact_child_nodes; end - - # def copy: (**params) -> PostExecutionNode - # - # source://prism//lib/prism/node.rb#13693 - sig { params(params: T.untyped).returns(Prism::PostExecutionNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13676 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#13707 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#13727 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#13712 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#13653 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#13717 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#13656 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#13650 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13755 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13765 - def type; end - end -end - -# Represents the use of the `BEGIN` keyword. -# -# BEGIN { foo } -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#13774 -class Prism::PreExecutionNode < ::Prism::Node - # def initialize: (statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location) -> void - # - # @return [PreExecutionNode] a new instance of PreExecutionNode - # - # source://prism//lib/prism/node.rb#13788 - sig do - params( - statements: T.nilable(Prism::StatementsNode), - keyword_loc: Prism::Location, - opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(statements, keyword_loc, opening_loc, closing_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#13797 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13802 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#13848 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#13785 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13814 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13807 - def compact_child_nodes; end - - # def copy: (**params) -> PreExecutionNode - # - # source://prism//lib/prism/node.rb#13819 - sig { params(params: T.untyped).returns(Prism::PreExecutionNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13802 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#13833 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#13853 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#13838 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#13779 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#13843 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#13782 - sig { returns(Prism::Location) } - def opening_loc; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#13776 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13881 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13891 - def type; end - end -end - -# The top level node of any parse tree. -# -# source://prism//lib/prism/node.rb#13897 -class Prism::ProgramNode < ::Prism::Node - # def initialize: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> void - # - # @return [ProgramNode] a new instance of ProgramNode - # - # source://prism//lib/prism/node.rb#13905 - sig { params(locals: T::Array[Symbol], statements: Prism::StatementsNode, location: Prism::Location).void } - def initialize(locals, statements, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#13912 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13917 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#13927 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#13922 - def compact_child_nodes; end - - # def copy: (**params) -> ProgramNode - # - # source://prism//lib/prism/node.rb#13932 - sig { params(params: T.untyped).returns(Prism::ProgramNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#13917 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#13944 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#13949 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#13899 - sig { returns(T::Array[Symbol]) } - def locals; end - - # attr_reader statements: StatementsNode - # - # source://prism//lib/prism/node.rb#13902 - sig { returns(Prism::StatementsNode) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13971 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13981 - def type; end - end -end - -# Flags for range and flip-flop nodes. -# -# source://prism//lib/prism/node.rb#17337 -module Prism::RangeFlags; end - -# ... operator -# -# source://prism//lib/prism/node.rb#17339 -Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) - -# Represents the use of the `..` or `...` operators. -# -# 1..2 -# ^^^^ -# -# c if a =~ /left/ ... b =~ /right/ -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#13993 -class Prism::RangeNode < ::Prism::Node - # def initialize: (flags: Integer, left: Node?, right: Node?, operator_loc: Location, location: Location) -> void - # - # @return [RangeNode] a new instance of RangeNode - # - # source://prism//lib/prism/node.rb#14007 - sig do - params( - flags: Integer, - left: T.nilable(Prism::Node), - right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(flags, left, right, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#14016 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14021 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14034 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14026 - def compact_child_nodes; end - - # def copy: (**params) -> RangeNode - # - # source://prism//lib/prism/node.rb#14039 - sig { params(params: T.untyped).returns(Prism::RangeNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14021 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#14053 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def exclude_end?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14058 - sig { returns(T::Boolean) } - def exclude_end?; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#14068 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader left: Node? - # - # source://prism//lib/prism/node.rb#13998 - sig { returns(T.nilable(Prism::Node)) } - def left; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#14063 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#14004 - sig { returns(Prism::Location) } - def operator_loc; end - - # attr_reader right: Node? - # - # source://prism//lib/prism/node.rb#14001 - sig { returns(T.nilable(Prism::Node)) } - def right; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14102 - def type; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#13995 - 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#14112 - def type; end - end -end - -# Represents a rational number literal. -# -# 1.0r -# ^^^^ -# -# source://prism//lib/prism/node.rb#14121 -class Prism::RationalNode < ::Prism::Node - # def initialize: (numeric: Node, location: Location) -> void - # - # @return [RationalNode] a new instance of RationalNode - # - # source://prism//lib/prism/node.rb#14126 - sig { params(numeric: Prism::Node, location: Prism::Location).void } - def initialize(numeric, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#14132 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14137 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14147 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14142 - def compact_child_nodes; end - - # def copy: (**params) -> RationalNode - # - # source://prism//lib/prism/node.rb#14152 - sig { params(params: T.untyped).returns(Prism::RationalNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14137 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#14163 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#14168 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader numeric: Node - # - # source://prism//lib/prism/node.rb#14123 - sig { returns(Prism::Node) } - def numeric; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14189 - def type; end - - # Returns the value of the node as a Ruby Rational. - # - # source://prism//lib/prism/node_ext.rb#83 - def value; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14199 - def type; end - end -end - -# Represents the use of the `redo` keyword. -# -# redo -# ^^^^ -# -# source://prism//lib/prism/node.rb#14208 -class Prism::RedoNode < ::Prism::Node - # def initialize: (location: Location) -> void - # - # @return [RedoNode] a new instance of RedoNode - # - # source://prism//lib/prism/node.rb#14210 - sig { params(location: Prism::Location).void } - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#14215 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14220 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14230 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14225 - def compact_child_nodes; end - - # def copy: (**params) -> RedoNode - # - # source://prism//lib/prism/node.rb#14235 - sig { params(params: T.untyped).returns(Prism::RedoNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14220 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#14245 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#14250 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14269 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14279 - def type; end - end -end - -# Flags for regular expression and match last line nodes. -# -# source://prism//lib/prism/node.rb#17343 -module Prism::RegularExpressionFlags; end - -# n - forces the ASCII-8BIT encoding -# -# source://prism//lib/prism/node.rb#17360 -Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) - -# e - forces the EUC-JP encoding -# -# source://prism//lib/prism/node.rb#17357 -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#17348 -Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) - -# internal bytes forced the encoding to binary -# -# source://prism//lib/prism/node.rb#17372 -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#17375 -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#17369 -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#17345 -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#17351 -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#17354 -Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) - -# u - forces the UTF-8 encoding -# -# source://prism//lib/prism/node.rb#17366 -Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) - -# s - forces the Windows-31J encoding -# -# source://prism//lib/prism/node.rb#17363 -Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) - -# Represents a regular expression literal with no interpolation. -# -# /foo/i -# ^^^^^^ -# -# source://prism//lib/prism/node.rb#14288 -class Prism::RegularExpressionNode < ::Prism::Node - include ::Prism::RegularExpressionOptions - - # def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void - # - # @return [RegularExpressionNode] a new instance of RegularExpressionNode - # - # source://prism//lib/prism/node.rb#14305 - sig do - params( - flags: Integer, - opening_loc: Prism::Location, - content_loc: Prism::Location, - closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location - ).void - end - def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#14315 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def ascii_8bit?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14380 - sig { returns(T::Boolean) } - def ascii_8bit?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14320 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#14420 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#14299 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14330 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14325 - def compact_child_nodes; end - - # def content: () -> String - # - # source://prism//lib/prism/node.rb#14415 - sig { returns(String) } - def content; end - - # attr_reader content_loc: Location - # - # source://prism//lib/prism/node.rb#14296 - sig { returns(Prism::Location) } - def content_loc; end - - # def copy: (**params) -> RegularExpressionNode - # - # source://prism//lib/prism/node.rb#14335 - sig { params(params: T.untyped).returns(Prism::RegularExpressionNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14320 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#14350 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def euc_jp?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14375 - sig { returns(T::Boolean) } - def euc_jp?; end - - # def extended?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14360 - sig { returns(T::Boolean) } - def extended?; end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14400 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14405 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14395 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def ignore_case?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14355 - sig { returns(T::Boolean) } - def ignore_case?; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#14425 - def inspect(inspector = T.unsafe(nil)); end - - # def multi_line?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14365 - sig { returns(T::Boolean) } - def multi_line?; end - - # def once?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14370 - sig { returns(T::Boolean) } - def once?; end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#14410 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#14293 - sig { returns(Prism::Location) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14450 - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#14302 - sig { returns(String) } - def unescaped; end - - # def utf_8?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14390 - sig { returns(T::Boolean) } - def utf_8?; end - - # def windows_31j?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#14385 - sig { returns(T::Boolean) } - def windows_31j?; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#14290 - 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#14460 - def type; end - end -end - -# source://prism//lib/prism/node_ext.rb#6 -module Prism::RegularExpressionOptions - # Returns a numeric value that represents the flags that were used to create - # the regular expression. - # - # source://prism//lib/prism/node_ext.rb#9 - def options; end -end - -# Represents a required keyword parameter to a method, block, or lambda definition. -# -# def a(b: ) -# ^^ -# end -# -# source://prism//lib/prism/node.rb#14470 -class Prism::RequiredKeywordParameterNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, location: Location) -> void - # - # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode - # - # source://prism//lib/prism/node.rb#14478 - sig { params(name: Symbol, name_loc: Prism::Location, location: Prism::Location).void } - def initialize(name, name_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#14485 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14490 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14500 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14495 - def compact_child_nodes; end - - # def copy: (**params) -> RequiredKeywordParameterNode - # - # source://prism//lib/prism/node.rb#14505 - sig { params(params: T.untyped).returns(Prism::RequiredKeywordParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14490 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#14517 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#14522 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#14472 - sig { returns(Symbol) } - def name; end - - # attr_reader name_loc: Location - # - # source://prism//lib/prism/node.rb#14475 - sig { returns(Prism::Location) } - def name_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14543 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14553 - def type; end - end -end - -# Represents a required parameter to a method, block, or lambda definition. -# -# def a(b) -# ^ -# end -# -# source://prism//lib/prism/node.rb#14563 -class Prism::RequiredParameterNode < ::Prism::Node - # def initialize: (name: Symbol, location: Location) -> void - # - # @return [RequiredParameterNode] a new instance of RequiredParameterNode - # - # source://prism//lib/prism/node.rb#14568 - sig { params(name: Symbol, location: Prism::Location).void } - def initialize(name, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#14574 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14579 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14589 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14584 - def compact_child_nodes; end - - # def copy: (**params) -> RequiredParameterNode - # - # source://prism//lib/prism/node.rb#14594 - sig { params(params: T.untyped).returns(Prism::RequiredParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14579 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#14605 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#14610 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#14565 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14630 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14640 - def type; end - end -end - -# Represents an expression modified with a rescue. -# -# foo rescue nil -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#14649 -class Prism::RescueModifierNode < ::Prism::Node - # def initialize: (expression: Node, keyword_loc: Location, rescue_expression: Node, location: Location) -> void - # - # @return [RescueModifierNode] a new instance of RescueModifierNode - # - # source://prism//lib/prism/node.rb#14660 - sig do - params( - expression: Prism::Node, - keyword_loc: Prism::Location, - rescue_expression: Prism::Node, - location: Prism::Location - ).void - end - def initialize(expression, keyword_loc, rescue_expression, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#14668 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14677 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14687 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14682 - def compact_child_nodes; end - - # def copy: (**params) -> RescueModifierNode - # - # source://prism//lib/prism/node.rb#14692 - sig { params(params: T.untyped).returns(Prism::RescueModifierNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14677 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#14705 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader expression: Node - # - # source://prism//lib/prism/node.rb#14651 - sig { returns(Prism::Node) } - def expression; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#14715 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#14710 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#14654 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader rescue_expression: Node - # - # source://prism//lib/prism/node.rb#14657 - sig { returns(Prism::Node) } - def rescue_expression; end - - # source://prism//lib/prism/node.rb#14672 - def set_newline_flag(newline_marked); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14739 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14749 - def type; end - end -end - -# Represents a rescue statement. -# -# begin -# rescue Foo, *splat, Bar => ex -# foo -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -# end -# -# `Foo, *splat, Bar` are in the `exceptions` field. -# `ex` is in the `exception` field. -# -# source://prism//lib/prism/node.rb#14764 -class Prism::RescueNode < ::Prism::Node - # def initialize: (keyword_loc: Location, exceptions: Array[Node], operator_loc: Location?, reference: Node?, statements: StatementsNode?, consequent: RescueNode?, location: Location) -> void - # - # @return [RescueNode] a new instance of RescueNode - # - # source://prism//lib/prism/node.rb#14784 - 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 - ).void - end - def initialize(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#14795 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14800 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14815 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14805 - def compact_child_nodes; end - - # attr_reader consequent: RescueNode? - # - # source://prism//lib/prism/node.rb#14781 - sig { returns(T.nilable(Prism::RescueNode)) } - def consequent; end - - # def copy: (**params) -> RescueNode - # - # source://prism//lib/prism/node.rb#14820 - sig { params(params: T.untyped).returns(Prism::RescueNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14800 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#14836 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader exceptions: Array[Node] - # - # source://prism//lib/prism/node.rb#14769 - sig { returns(T::Array[Prism::Node]) } - def exceptions; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#14851 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#14841 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#14766 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def operator: () -> String? - # - # source://prism//lib/prism/node.rb#14846 - sig { returns(T.nilable(String)) } - def operator; end - - # attr_reader operator_loc: Location? - # - # source://prism//lib/prism/node.rb#14772 - sig { returns(T.nilable(Prism::Location)) } - def operator_loc; end - - # attr_reader reference: Node? - # - # source://prism//lib/prism/node.rb#14775 - sig { returns(T.nilable(Prism::Node)) } - def reference; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#14778 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14891 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14901 - def type; end - end -end - -# Represents a rest parameter to a method, block, or lambda definition. -# -# def a(*b) -# ^^ -# end -# -# source://prism//lib/prism/node.rb#14911 -class Prism::RestParameterNode < ::Prism::Node - # def initialize: (name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location) -> void - # - # @return [RestParameterNode] a new instance of RestParameterNode - # - # source://prism//lib/prism/node.rb#14922 - sig do - params( - name: T.nilable(Symbol), - name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(name, name_loc, operator_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#14930 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14935 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#14945 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#14940 - def compact_child_nodes; end - - # def copy: (**params) -> RestParameterNode - # - # source://prism//lib/prism/node.rb#14950 - sig { params(params: T.untyped).returns(Prism::RestParameterNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#14935 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#14963 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#14973 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader name: Symbol? - # - # source://prism//lib/prism/node.rb#14913 - sig { returns(T.nilable(Symbol)) } - def name; end - - # attr_reader name_loc: Location? - # - # source://prism//lib/prism/node.rb#14916 - sig { returns(T.nilable(Prism::Location)) } - def name_loc; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#14968 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#14919 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14999 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15009 - def type; end - end -end - -# Represents the use of the `retry` keyword. -# -# retry -# ^^^^^ -# -# source://prism//lib/prism/node.rb#15018 -class Prism::RetryNode < ::Prism::Node - # def initialize: (location: Location) -> void - # - # @return [RetryNode] a new instance of RetryNode - # - # source://prism//lib/prism/node.rb#15020 - sig { params(location: Prism::Location).void } - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#15025 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15030 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15040 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15035 - def compact_child_nodes; end - - # def copy: (**params) -> RetryNode - # - # source://prism//lib/prism/node.rb#15045 - sig { params(params: T.untyped).returns(Prism::RetryNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15030 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#15055 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#15060 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15079 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15089 - def type; end - end -end - -# Represents the use of the `return` keyword. -# -# return 1 -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#15098 -class Prism::ReturnNode < ::Prism::Node - # def initialize: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> void - # - # @return [ReturnNode] a new instance of ReturnNode - # - # source://prism//lib/prism/node.rb#15106 - sig do - params( - keyword_loc: Prism::Location, - arguments: T.nilable(Prism::ArgumentsNode), - location: Prism::Location - ).void - end - def initialize(keyword_loc, arguments, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#15113 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#15103 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15118 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15130 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15123 - def compact_child_nodes; end - - # def copy: (**params) -> ReturnNode - # - # source://prism//lib/prism/node.rb#15135 - sig { params(params: T.untyped).returns(Prism::ReturnNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15118 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#15147 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#15157 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#15152 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#15100 - sig { returns(Prism::Location) } - def keyword_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15183 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15193 - def type; end - end -end - -# Note: This integration is not finished, and therefore still has many -# inconsistencies with Ripper. If you'd like to help out, pull requests would -# be greatly appreciated! -# -# This class is meant to provide a compatibility layer between prism and -# Ripper. It functions by parsing the entire tree first and then walking it -# and executing each of the Ripper callbacks as it goes. -# -# This class is going to necessarily be slower than the native Ripper API. It -# is meant as a stopgap until developers migrate to using prism. It is also -# meant as a test harness for the prism parser. -# -# To use this class, you treat `Prism::RipperCompat` effectively as you would -# treat the `Ripper` class. -# -# source://prism//lib/prism/ripper_compat.rb#20 -class Prism::RipperCompat < ::Prism::Visitor - # Create a new RipperCompat object with the given source. - # - # @return [RipperCompat] a new instance of RipperCompat - # - # source://prism//lib/prism/ripper_compat.rb#74 - def initialize(source); end - - # The current column number of the parser. - # - # source://prism//lib/prism/ripper_compat.rb#71 - def column; end - - # True if the parser encountered an error during parsing. - # - # @return [Boolean] - # - # source://prism//lib/prism/ripper_compat.rb#86 - def error?; end - - # The current line number of the parser. - # - # source://prism//lib/prism/ripper_compat.rb#68 - def lineno; end - - # Parse the source and return the result. - # - # source://prism//lib/prism/ripper_compat.rb#91 - def parse; end - - # The source that is being parsed. - # - # source://prism//lib/prism/ripper_compat.rb#65 - def source; end - - # Visit a CallNode node. - # - # source://prism//lib/prism/ripper_compat.rb#110 - def visit_call_node(node); end - - # Visit a FloatNode node. - # - # source://prism//lib/prism/ripper_compat.rb#123 - def visit_float_node(node); end - - # Visit a ImaginaryNode node. - # - # source://prism//lib/prism/ripper_compat.rb#129 - def visit_imaginary_node(node); end - - # Visit an IntegerNode node. - # - # source://prism//lib/prism/ripper_compat.rb#135 - def visit_integer_node(node); end - - # Visit a ProgramNode node. - # - # source://prism//lib/prism/ripper_compat.rb#155 - def visit_program_node(node); end - - # Visit a RationalNode node. - # - # source://prism//lib/prism/ripper_compat.rb#141 - def visit_rational_node(node); end - - # Visit a StatementsNode node. - # - # source://prism//lib/prism/ripper_compat.rb#147 - def visit_statements_node(node); end - - private - - # source://prism//lib/prism/ripper_compat.rb#192 - def _dispatch0; end - - # source://prism//lib/prism/ripper_compat.rb#193 - def _dispatch1(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def _dispatch2(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def _dispatch3(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#196 - def _dispatch4(_, _, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#197 - def _dispatch5(_, _, _, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#198 - def _dispatch7(_, _, _, _, _, _, _); end - - # This method is responsible for updating lineno and column information - # to reflect the current node. - # - # This method could be drastically improved with some caching on the start - # of every line, but for now it's good enough. - # - # source://prism//lib/prism/ripper_compat.rb#182 - def bounds(location); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_BEGIN(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_CHAR(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_END(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on___end__(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_alias(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_alias_error(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_aref(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_aref_field(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_arg_ambiguous(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_arg_paren(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_args_add(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_args_add_block(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_args_add_star(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_args_forward; end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_args_new; end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_array(_); end - - # source://prism//lib/prism/ripper_compat.rb#196 - def on_aryptn(_, _, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_assign(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_assign_error(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_assoc_new(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_assoc_splat(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_assoclist_from_args(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_backref(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_backtick(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_bare_assoc_hash(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_begin(_); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_binary(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_block_var(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_blockarg(_); end - - # source://prism//lib/prism/ripper_compat.rb#196 - def on_bodystmt(_, _, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_brace_block(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_break(_); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_call(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_case(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_class(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_class_name_error(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_comma(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_command(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#196 - def on_command_call(_, _, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_comment(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_const(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_const_path_field(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_const_path_ref(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_const_ref(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_cvar(_); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_def(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_defined(_); end - - # source://prism//lib/prism/ripper_compat.rb#197 - def on_defs(_, _, _, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_do_block(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_dot2(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_dot3(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_dyna_symbol(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_else(_); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_elsif(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_embdoc(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_embdoc_beg(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_embdoc_end(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_embexpr_beg(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_embexpr_end(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_embvar(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_ensure(_); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_excessed_comma; end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_fcall(_); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_field(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_float(_); end - - # source://prism//lib/prism/ripper_compat.rb#196 - def on_fndptn(_, _, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_for(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_gvar(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_hash(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_heredoc_beg(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_heredoc_dedent(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_heredoc_end(_); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_hshptn(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_ident(_); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_if(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_if_mod(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_ifop(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_ignored_nl(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_ignored_sp(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_imaginary(_); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_in(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_int(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_ivar(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_kw(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_kwrest_param(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_label(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_label_end(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_lambda(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_lbrace(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_lbracket(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_lparen(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_magic_comment(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_massign(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_method_add_arg(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_method_add_block(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_mlhs_add(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_mlhs_add_post(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_mlhs_add_star(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_mlhs_new; end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_mlhs_paren(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_module(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_mrhs_add(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_mrhs_add_star(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_mrhs_new; end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_mrhs_new_from_args(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_next(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_nl(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_nokw_param(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_op(_); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_opassign(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_operator_ambiguous(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_param_error(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#198 - def on_params(_, _, _, _, _, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_paren(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_parse_error(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_period(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_program(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_qsymbols_add(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_qsymbols_beg(_); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_qsymbols_new; end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_qwords_add(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_qwords_beg(_); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_qwords_new; end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_rational(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_rbrace(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_rbracket(_); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_redo; end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_regexp_add(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_regexp_beg(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_regexp_end(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_regexp_literal(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_regexp_new; end - - # source://prism//lib/prism/ripper_compat.rb#196 - def on_rescue(_, _, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_rescue_mod(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_rest_param(_); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_retry; end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_return(_); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_return0; end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_rparen(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_sclass(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_semicolon(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_sp(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_stmts_add(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_stmts_new; end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_string_add(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_string_concat(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_string_content; end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_string_dvar(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_string_embexpr(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_string_literal(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_super(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_symbeg(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_symbol(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_symbol_literal(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_symbols_add(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_symbols_beg(_); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_symbols_new; end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_tlambda(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_tlambeg(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_top_const_field(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_top_const_ref(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_tstring_beg(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_tstring_content(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_tstring_end(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_unary(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_undef(_); end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_unless(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_unless_mod(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_until(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_until_mod(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_var_alias(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_var_field(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_var_ref(_); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_vcall(_); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_void_stmt; end - - # source://prism//lib/prism/ripper_compat.rb#195 - def on_when(_, _, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_while(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_while_mod(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_word_add(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_word_new; end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_words_add(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_words_beg(_); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_words_new; end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_words_sep(_); end - - # source://prism//lib/prism/ripper_compat.rb#194 - def on_xstring_add(_, _); end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_xstring_literal(_); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_xstring_new; end - - # source://prism//lib/prism/ripper_compat.rb#193 - def on_yield(_); end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_yield0; end - - # source://prism//lib/prism/ripper_compat.rb#192 - def on_zsuper; end - - # Lazily initialize the parse result. - # - # source://prism//lib/prism/ripper_compat.rb#188 - def result; end - - class << self - # This is a convenience method that runs the SexpBuilderPP subclass parser. - # - # source://prism//lib/prism/ripper_compat.rb#171 - def sexp(source); end - - # This is a convenience method that runs the SexpBuilder subclass parser. - # - # source://prism//lib/prism/ripper_compat.rb#166 - def sexp_raw(source); end - end -end - -# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that -# returns the arrays of [type, *children]. -# -# source://prism//lib/prism/ripper_compat.rb#23 -class Prism::RipperCompat::SexpBuilder < ::Prism::RipperCompat - private - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_BEGIN(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_CHAR(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_END(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on___end__(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_alias(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_alias_error(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_aref(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_aref_field(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_arg_ambiguous(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_arg_paren(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_args_add(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_args_add_block(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_args_add_star(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_args_forward(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_args_new(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_array(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_aryptn(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_assign(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_assign_error(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_assoc_new(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_assoc_splat(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_assoclist_from_args(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_backref(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_backtick(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_bare_assoc_hash(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_begin(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_binary(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_block_var(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_blockarg(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_bodystmt(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_brace_block(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_break(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_call(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_case(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_class(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_class_name_error(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_comma(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_command(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_command_call(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_comment(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_const(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_const_path_field(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_const_path_ref(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_const_ref(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_cvar(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_def(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_defined(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_defs(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_do_block(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_dot2(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_dot3(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_dyna_symbol(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_else(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_elsif(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_embdoc(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_embdoc_beg(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_embdoc_end(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_embexpr_beg(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_embexpr_end(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_embvar(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_ensure(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_excessed_comma(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_fcall(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_field(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_float(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_fndptn(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_for(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_gvar(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_hash(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_heredoc_beg(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_heredoc_dedent(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_heredoc_end(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_hshptn(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_ident(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_if(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_if_mod(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_ifop(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_ignored_nl(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_ignored_sp(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_imaginary(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_in(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_int(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_ivar(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_kw(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_kwrest_param(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_label(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_label_end(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_lambda(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_lbrace(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_lbracket(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_lparen(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_magic_comment(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_massign(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_method_add_arg(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_method_add_block(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_mlhs_add(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_mlhs_add_post(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_mlhs_add_star(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_mlhs_new(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_mlhs_paren(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_module(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_mrhs_add(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_mrhs_add_star(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_mrhs_new(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_mrhs_new_from_args(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_next(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_nl(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_nokw_param(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_op(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_opassign(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_operator_ambiguous(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_param_error(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_params(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_paren(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_parse_error(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_period(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_program(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_qsymbols_add(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_qsymbols_beg(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_qsymbols_new(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_qwords_add(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_qwords_beg(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_qwords_new(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_rational(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_rbrace(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_rbracket(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_redo(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_regexp_add(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_regexp_beg(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_regexp_end(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_regexp_literal(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_regexp_new(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_rescue(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_rescue_mod(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_rest_param(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_retry(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_return(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_return0(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_rparen(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_sclass(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_semicolon(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_sp(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_stmts_add(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_stmts_new(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_string_add(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_string_concat(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_string_content(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_string_dvar(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_string_embexpr(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_string_literal(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_super(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_symbeg(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_symbol(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_symbol_literal(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_symbols_add(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_symbols_beg(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_symbols_new(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_tlambda(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_tlambeg(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_top_const_field(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_top_const_ref(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_tstring_beg(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_tstring_content(value); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_tstring_end(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_unary(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_undef(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_unless(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_unless_mod(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_until(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_until_mod(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_var_alias(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_var_field(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_var_ref(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_vcall(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_void_stmt(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_when(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_while(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_while_mod(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_word_add(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_word_new(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_words_add(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_words_beg(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_words_new(*args); end - - # source://prism//lib/prism/ripper_compat.rb#33 - def on_words_sep(value); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_xstring_add(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_xstring_literal(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_xstring_new(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_yield(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_yield0(*args); end - - # source://prism//lib/prism/ripper_compat.rb#27 - def on_zsuper(*args); end -end - -# This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that -# returns the same values as ::Ripper::SexpBuilder except with a couple of -# niceties that flatten linked lists into arrays. -# -# source://prism//lib/prism/ripper_compat.rb#42 -class Prism::RipperCompat::SexpBuilderPP < ::Prism::RipperCompat::SexpBuilder - private - - # source://prism//lib/prism/ripper_compat.rb#45 - def _dispatch_event_new; end - - # source://prism//lib/prism/ripper_compat.rb#49 - def _dispatch_event_push(list, item); end - - # source://prism//lib/prism/ripper_compat.rb#49 - def on_args_add(list, item); end - - # source://prism//lib/prism/ripper_compat.rb#45 - def on_args_new; end - - # source://prism//lib/prism/ripper_compat.rb#49 - def on_mlhs_add(list, item); end - - # source://prism//lib/prism/ripper_compat.rb#45 - def on_mlhs_new; end - - # source://prism//lib/prism/ripper_compat.rb#49 - def on_mrhs_add(list, item); end - - # source://prism//lib/prism/ripper_compat.rb#45 - def on_mrhs_new; end - - # source://prism//lib/prism/ripper_compat.rb#49 - def on_qsymbols_add(list, item); end - - # source://prism//lib/prism/ripper_compat.rb#45 - def on_qsymbols_new; end - - # source://prism//lib/prism/ripper_compat.rb#49 - def on_qwords_add(list, item); end - - # source://prism//lib/prism/ripper_compat.rb#45 - def on_qwords_new; end - - # source://prism//lib/prism/ripper_compat.rb#49 - def on_regexp_add(list, item); end - - # source://prism//lib/prism/ripper_compat.rb#45 - def on_regexp_new; end - - # source://prism//lib/prism/ripper_compat.rb#49 - def on_stmts_add(list, item); end - - # source://prism//lib/prism/ripper_compat.rb#45 - def on_stmts_new; end - - # source://prism//lib/prism/ripper_compat.rb#49 - def on_string_add(list, item); end - - # source://prism//lib/prism/ripper_compat.rb#49 - def on_symbols_add(list, item); end - - # source://prism//lib/prism/ripper_compat.rb#45 - def on_symbols_new; end - - # source://prism//lib/prism/ripper_compat.rb#49 - def on_word_add(list, item); end - - # source://prism//lib/prism/ripper_compat.rb#45 - def on_word_new; end - - # source://prism//lib/prism/ripper_compat.rb#49 - def on_words_add(list, item); end - - # source://prism//lib/prism/ripper_compat.rb#45 - def on_words_new; end - - # source://prism//lib/prism/ripper_compat.rb#49 - def on_xstring_add(list, item); end - - # source://prism//lib/prism/ripper_compat.rb#45 - def on_xstring_new; end -end - -# Represents the `self` keyword. -# -# self -# ^^^^ -# -# source://prism//lib/prism/node.rb#15202 -class Prism::SelfNode < ::Prism::Node - # def initialize: (location: Location) -> void - # - # @return [SelfNode] a new instance of SelfNode - # - # source://prism//lib/prism/node.rb#15204 - sig { params(location: Prism::Location).void } - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#15209 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15214 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15224 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15219 - def compact_child_nodes; end - - # def copy: (**params) -> SelfNode - # - # source://prism//lib/prism/node.rb#15229 - sig { params(params: T.untyped).returns(Prism::SelfNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15214 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#15239 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#15244 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15263 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15273 - def type; end - end -end - -# A module responsible for deserializing parse results. -# -# source://prism//lib/prism/serialize.rb#23 -module Prism::Serialize - class << self - # Deserialize the AST represented by the given string into a parse result. - # - # source://prism//lib/prism/serialize.rb#37 - def load(input, serialized); end - - # Deserialize the tokens represented by the given string into a parse - # result. - # - # source://prism//lib/prism/serialize.rb#49 - def load_tokens(source, serialized); end - end -end - -# source://prism//lib/prism/serialize.rb#53 -class Prism::Serialize::Loader - # @return [Loader] a new instance of Loader - # - # source://prism//lib/prism/serialize.rb#58 - def initialize(source, serialized); end - - # Returns the value of attribute constant_pool. - # - # source://prism//lib/prism/serialize.rb#55 - def constant_pool; end - - # Returns the value of attribute constant_pool_offset. - # - # source://prism//lib/prism/serialize.rb#55 - def constant_pool_offset; end - - # Returns the value of attribute encoding. - # - # source://prism//lib/prism/serialize.rb#54 - def encoding; end - - # Returns the value of attribute input. - # - # source://prism//lib/prism/serialize.rb#54 - def input; end - - # Returns the value of attribute io. - # - # source://prism//lib/prism/serialize.rb#54 - def io; end - - # source://prism//lib/prism/serialize.rb#92 - def load_comments; end - - # source://prism//lib/prism/serialize.rb#82 - def load_encoding; end - - # source://prism//lib/prism/serialize.rb#73 - def load_header; end - - # source://prism//lib/prism/serialize.rb#102 - def load_metadata; end - - # source://prism//lib/prism/serialize.rb#135 - def load_nodes; end - - # source://prism//lib/prism/serialize.rb#148 - def load_result; end - - # source://prism//lib/prism/serialize.rb#88 - def load_start_line; end - - # source://prism//lib/prism/serialize.rb#111 - def load_tokens; end - - # source://prism//lib/prism/serialize.rb#124 - def load_tokens_result; end - - # Returns the value of attribute serialized. - # - # source://prism//lib/prism/serialize.rb#54 - def serialized; end - - # Returns the value of attribute source. - # - # source://prism//lib/prism/serialize.rb#55 - def source; end - - # Returns the value of attribute start_line. - # - # source://prism//lib/prism/serialize.rb#56 - def start_line; end - - private - - # source://prism//lib/prism/serialize.rb#211 - def load_constant(index); end - - # source://prism//lib/prism/serialize.rb#187 - def load_embedded_string; end - - # source://prism//lib/prism/serialize.rb#203 - def load_location; end - - # source://prism//lib/prism/serialize.rb#242 - def load_node; end - - # source://prism//lib/prism/serialize.rb#236 - def load_optional_constant; end - - # source://prism//lib/prism/serialize.rb#207 - def load_optional_location; end - - # source://prism//lib/prism/serialize.rb#180 - def load_optional_node; end - - # source://prism//lib/prism/serialize.rb#232 - def load_required_constant; end - - # source://prism//lib/prism/serialize.rb#176 - def load_serialized_length; end - - # source://prism//lib/prism/serialize.rb#191 - def load_string; end - - # source://prism//lib/prism/serialize.rb#171 - 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#157 - def load_varuint; end -end - -# The major version of prism that we are expecting to find in the serialized -# strings. -# -# source://prism//lib/prism/serialize.rb#26 -Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) - -# The minor version of prism that we are expecting to find in the serialized -# strings. -# -# source://prism//lib/prism/serialize.rb#30 -Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) - -# The patch version of prism that we are expecting to find in the serialized -# strings. -# -# source://prism//lib/prism/serialize.rb#34 -Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) - -# The token types that can be indexed by their enum values. -# -# source://prism//lib/prism/serialize.rb#1154 -Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) - -# Represents a singleton class declaration involving the `class` keyword. -# -# class << self end -# ^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#15282 -class Prism::SingletonClassNode < ::Prism::Node - # def initialize: (locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Node, body: Node?, end_keyword_loc: Location, location: Location) -> void - # - # @return [SingletonClassNode] a new instance of SingletonClassNode - # - # source://prism//lib/prism/node.rb#15302 - 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 - ).void - end - def initialize(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#15313 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Node? - # - # source://prism//lib/prism/node.rb#15296 - sig { returns(T.nilable(Prism::Node)) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15318 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def class_keyword: () -> String - # - # source://prism//lib/prism/node.rb#15357 - sig { returns(String) } - def class_keyword; end - - # attr_reader class_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#15287 - sig { returns(Prism::Location) } - def class_keyword_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15331 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15323 - def compact_child_nodes; end - - # def copy: (**params) -> SingletonClassNode - # - # source://prism//lib/prism/node.rb#15336 - sig { params(params: T.untyped).returns(Prism::SingletonClassNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15318 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#15352 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String - # - # source://prism//lib/prism/node.rb#15367 - sig { returns(String) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location - # - # source://prism//lib/prism/node.rb#15299 - sig { returns(Prism::Location) } - def end_keyword_loc; end - - # attr_reader expression: Node - # - # source://prism//lib/prism/node.rb#15293 - sig { returns(Prism::Node) } - def expression; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#15372 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader locals: Array[Symbol] - # - # source://prism//lib/prism/node.rb#15284 - sig { returns(T::Array[Symbol]) } - def locals; end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#15362 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#15290 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15403 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15413 - def type; end - end -end - -# This represents a source of Ruby code that has been parsed. It is used in -# conjunction with locations to allow them to resolve line numbers and source -# ranges. -# -# source://prism//lib/prism/parse_result.rb#7 -class Prism::Source - # Create a new source object with the given source code and newline byte - # offsets. If no newline byte offsets are given, they will be computed from - # the source code. - # - # @return [Source] a new instance of Source - # - # source://prism//lib/prism/parse_result.rb#20 - 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#55 - def character_column(byte_offset); end - - # Return the character offset for the given byte offset. - # - # source://prism//lib/prism/parse_result.rb#50 - def character_offset(byte_offset); end - - # Return the column number for the given byte offset. - # - # source://prism//lib/prism/parse_result.rb#45 - def column(byte_offset); end - - # Binary search through the offsets to find the line number for the given - # byte offset. - # - # source://prism//lib/prism/parse_result.rb#34 - 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#40 - def line_start(byte_offset); end - - # The list of newline byte offsets in the source code. - # - # source://prism//lib/prism/parse_result.rb#15 - sig { returns(T::Array[Integer]) } - def offsets; end - - # Perform a byteslice on the source code using the given byte offset and - # byte length. - # - # source://prism//lib/prism/parse_result.rb#28 - def slice(byte_offset, length); end - - # The source code that this source object represents. - # - # source://prism//lib/prism/parse_result.rb#9 - sig { returns(String) } - def source; end - - # The line number where this source starts. - # - # source://prism//lib/prism/parse_result.rb#12 - def start_line; end - - # The line number where this source starts. - # - # source://prism//lib/prism/parse_result.rb#12 - def start_line=(_arg0); end - - private - - # Find all of the newlines in the source code and return their byte offsets - # from the start of the string an array. - # - # source://prism//lib/prism/parse_result.rb#83 - def compute_offsets(code); end - - # Binary search through the offsets to find the line number for the given - # byte offset. - # - # source://prism//lib/prism/parse_result.rb#63 - def find_line(byte_offset); end -end - -# Represents the use of the `__ENCODING__` keyword. -# -# __ENCODING__ -# ^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#15422 -class Prism::SourceEncodingNode < ::Prism::Node - # def initialize: (location: Location) -> void - # - # @return [SourceEncodingNode] a new instance of SourceEncodingNode - # - # source://prism//lib/prism/node.rb#15424 - sig { params(location: Prism::Location).void } - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#15429 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15434 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15444 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15439 - def compact_child_nodes; end - - # def copy: (**params) -> SourceEncodingNode - # - # source://prism//lib/prism/node.rb#15449 - sig { params(params: T.untyped).returns(Prism::SourceEncodingNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15434 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#15459 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#15464 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15483 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15493 - def type; end - end -end - -# Represents the use of the `__FILE__` keyword. -# -# __FILE__ -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#15502 -class Prism::SourceFileNode < ::Prism::Node - # def initialize: (filepath: String, location: Location) -> void - # - # @return [SourceFileNode] a new instance of SourceFileNode - # - # source://prism//lib/prism/node.rb#15507 - sig { params(filepath: String, location: Prism::Location).void } - def initialize(filepath, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#15513 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15518 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15528 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15523 - def compact_child_nodes; end - - # def copy: (**params) -> SourceFileNode - # - # source://prism//lib/prism/node.rb#15533 - sig { params(params: T.untyped).returns(Prism::SourceFileNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15518 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#15544 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader filepath: String - # - # source://prism//lib/prism/node.rb#15504 - sig { returns(String) } - def filepath; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#15549 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15569 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15579 - def type; end - end -end - -# Represents the use of the `__LINE__` keyword. -# -# __LINE__ -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#15588 -class Prism::SourceLineNode < ::Prism::Node - # def initialize: (location: Location) -> void - # - # @return [SourceLineNode] a new instance of SourceLineNode - # - # source://prism//lib/prism/node.rb#15590 - sig { params(location: Prism::Location).void } - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#15595 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15600 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15610 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15605 - def compact_child_nodes; end - - # def copy: (**params) -> SourceLineNode - # - # source://prism//lib/prism/node.rb#15615 - sig { params(params: T.untyped).returns(Prism::SourceLineNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15600 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#15625 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#15630 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15649 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15659 - def type; end - end -end - -# Represents the use of the splat operator. -# -# [*a] -# ^^ -# -# source://prism//lib/prism/node.rb#15668 -class Prism::SplatNode < ::Prism::Node - # def initialize: (operator_loc: Location, expression: Node?, location: Location) -> void - # - # @return [SplatNode] a new instance of SplatNode - # - # source://prism//lib/prism/node.rb#15676 - sig { params(operator_loc: Prism::Location, expression: T.nilable(Prism::Node), location: Prism::Location).void } - def initialize(operator_loc, expression, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#15683 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15688 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15700 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15693 - def compact_child_nodes; end - - # def copy: (**params) -> SplatNode - # - # source://prism//lib/prism/node.rb#15705 - sig { params(params: T.untyped).returns(Prism::SplatNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15688 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#15717 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # attr_reader expression: Node? - # - # source://prism//lib/prism/node.rb#15673 - sig { returns(T.nilable(Prism::Node)) } - def expression; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#15727 - def inspect(inspector = T.unsafe(nil)); end - - # def operator: () -> String - # - # source://prism//lib/prism/node.rb#15722 - sig { returns(String) } - def operator; end - - # attr_reader operator_loc: Location - # - # source://prism//lib/prism/node.rb#15670 - sig { returns(Prism::Location) } - def operator_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15753 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15763 - def type; end - end -end - -# Represents a set of statements contained within some scope. -# -# foo; bar; baz -# ^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#15772 -class Prism::StatementsNode < ::Prism::Node - # def initialize: (body: Array[Node], location: Location) -> void - # - # @return [StatementsNode] a new instance of StatementsNode - # - # source://prism//lib/prism/node.rb#15777 - sig { params(body: T::Array[Prism::Node], location: Prism::Location).void } - def initialize(body, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#15783 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader body: Array[Node] - # - # source://prism//lib/prism/node.rb#15774 - sig { returns(T::Array[Prism::Node]) } - def body; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15788 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15798 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15793 - def compact_child_nodes; end - - # def copy: (**params) -> StatementsNode - # - # source://prism//lib/prism/node.rb#15803 - sig { params(params: T.untyped).returns(Prism::StatementsNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15788 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#15814 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#15819 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15839 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15849 - def type; end - end -end - -# Flags for string nodes. -# -# source://prism//lib/prism/node.rb#17379 -module Prism::StringFlags; end - -# internal bytes forced the encoding to binary -# -# source://prism//lib/prism/node.rb#17384 -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#17381 -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#17387 -Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) - -# Represents a string literal, a string contained within a `%w` list, or -# plain string content within an interpolated string. -# -# "foo" -# ^^^^^ -# -# %w[foo] -# ^^^ -# -# "foo #{bar} baz" -# ^^^^ ^^^^ -# -# source://prism//lib/prism/node.rb#15865 -class Prism::StringNode < ::Prism::Node - include ::Prism::HeredocQuery - - # def initialize: (flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location) -> void - # - # @return [StringNode] a new instance of StringNode - # - # source://prism//lib/prism/node.rb#15882 - 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 - ).void - end - def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#15892 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15897 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#15957 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#15876 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#15907 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#15902 - def compact_child_nodes; end - - # def content: () -> String - # - # source://prism//lib/prism/node.rb#15952 - sig { returns(String) } - def content; end - - # attr_reader content_loc: Location - # - # source://prism//lib/prism/node.rb#15873 - sig { returns(Prism::Location) } - def content_loc; end - - # def copy: (**params) -> StringNode - # - # source://prism//lib/prism/node.rb#15912 - sig { params(params: T.untyped).returns(Prism::StringNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#15897 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#15927 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15937 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15932 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def frozen?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#15942 - sig { returns(T::Boolean) } - def frozen?; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#15962 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#15947 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#15870 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15987 - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#15879 - sig { returns(String) } - def unescaped; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#15867 - 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#15997 - def type; end - end -end - -# Represents the use of the `super` keyword with parentheses or arguments. -# -# super() -# ^^^^^^^ -# -# super foo, bar -# ^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#16009 -class Prism::SuperNode < ::Prism::Node - # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Node?, location: Location) -> void - # - # @return [SuperNode] a new instance of SuperNode - # - # source://prism//lib/prism/node.rb#16026 - 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 - ).void - end - def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#16036 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#16017 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # attr_reader block: Node? - # - # source://prism//lib/prism/node.rb#16023 - sig { returns(T.nilable(Prism::Node)) } - def block; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16041 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16054 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16046 - def compact_child_nodes; end - - # def copy: (**params) -> SuperNode - # - # source://prism//lib/prism/node.rb#16059 - sig { params(params: T.untyped).returns(Prism::SuperNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16041 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#16074 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#16094 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#16079 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#16011 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#16084 - sig { returns(T.nilable(String)) } - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#16014 - sig { returns(T.nilable(Prism::Location)) } - def lparen_loc; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#16089 - sig { returns(T.nilable(String)) } - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#16020 - sig { returns(T.nilable(Prism::Location)) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16128 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16138 - def type; end - end -end - -# Flags for symbol nodes. -# -# source://prism//lib/prism/node.rb#17391 -module Prism::SymbolFlags; end - -# internal bytes forced the encoding to binary -# -# source://prism//lib/prism/node.rb#17396 -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#17399 -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#17393 -Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) - -# Represents a symbol literal or a symbol contained within a `%i` list. -# -# :foo -# ^^^^ -# -# %i[foo] -# ^^^ -# -# source://prism//lib/prism/node.rb#16150 -class Prism::SymbolNode < ::Prism::Node - # def initialize: (flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void - # - # @return [SymbolNode] a new instance of SymbolNode - # - # source://prism//lib/prism/node.rb#16167 - 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 - ).void - end - def initialize(flags, opening_loc, value_loc, closing_loc, unescaped, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#16177 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16182 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#16242 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#16161 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16192 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16187 - def compact_child_nodes; end - - # def copy: (**params) -> SymbolNode - # - # source://prism//lib/prism/node.rb#16197 - sig { params(params: T.untyped).returns(Prism::SymbolNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16182 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#16212 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16222 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_us_ascii_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16227 - sig { returns(T::Boolean) } - def forced_us_ascii_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16217 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#16247 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String? - # - # source://prism//lib/prism/node.rb#16232 - sig { returns(T.nilable(String)) } - def opening; end - - # attr_reader opening_loc: Location? - # - # source://prism//lib/prism/node.rb#16155 - sig { returns(T.nilable(Prism::Location)) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16272 - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#16164 - sig { returns(String) } - def unescaped; end - - # def value: () -> String? - # - # source://prism//lib/prism/node.rb#16237 - sig { returns(T.nilable(String)) } - def value; end - - # attr_reader value_loc: Location? - # - # source://prism//lib/prism/node.rb#16158 - sig { returns(T.nilable(Prism::Location)) } - def value_loc; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#16152 - 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#16282 - def type; end - end -end - -# This represents a token from the Ruby source. -# -# source://prism//lib/prism/parse_result.rb#416 -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#427 - sig { params(type: T.untyped, value: String, location: Prism::Location).void } - def initialize(type, value, location); end - - # Returns true if the given other token is equal to this token. - # - # source://prism//lib/prism/parse_result.rb#454 - 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#434 - sig { params(keys: T.untyped).returns(T.untyped) } - def deconstruct_keys(keys); end - - # A Location object representing the location of this token in the source. - # - # source://prism//lib/prism/parse_result.rb#424 - sig { returns(Prism::Location) } - def location; end - - # Implement the pretty print interface for Token. - # - # source://prism//lib/prism/parse_result.rb#439 - sig { params(q: T.untyped).returns(T.untyped) } - def pretty_print(q); end - - # The type of token that this token is. - # - # source://prism//lib/prism/parse_result.rb#418 - sig { returns(T.untyped) } - def type; end - - # A byteslice of the source that this token represents. - # - # source://prism//lib/prism/parse_result.rb#421 - sig { returns(String) } - def value; end -end - -# Represents the use of the literal `true` keyword. -# -# true -# ^^^^ -# -# source://prism//lib/prism/node.rb#16291 -class Prism::TrueNode < ::Prism::Node - # def initialize: (location: Location) -> void - # - # @return [TrueNode] a new instance of TrueNode - # - # source://prism//lib/prism/node.rb#16293 - sig { params(location: Prism::Location).void } - def initialize(location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#16298 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16303 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16313 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16308 - def compact_child_nodes; end - - # def copy: (**params) -> TrueNode - # - # source://prism//lib/prism/node.rb#16318 - sig { params(params: T.untyped).returns(Prism::TrueNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16303 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#16328 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#16333 - def inspect(inspector = T.unsafe(nil)); end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16352 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16362 - def type; end - end -end - -# Represents the use of the `undef` keyword. -# -# undef :foo, :bar, :baz -# ^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#16371 -class Prism::UndefNode < ::Prism::Node - # def initialize: (names: Array[Node], keyword_loc: Location, location: Location) -> void - # - # @return [UndefNode] a new instance of UndefNode - # - # source://prism//lib/prism/node.rb#16379 - sig { params(names: T::Array[Prism::Node], keyword_loc: Prism::Location, location: Prism::Location).void } - def initialize(names, keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#16386 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16391 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16401 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16396 - def compact_child_nodes; end - - # def copy: (**params) -> UndefNode - # - # source://prism//lib/prism/node.rb#16406 - sig { params(params: T.untyped).returns(Prism::UndefNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16391 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#16418 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#16428 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#16423 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#16376 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader names: Array[Node] - # - # source://prism//lib/prism/node.rb#16373 - sig { returns(T::Array[Prism::Node]) } - def names; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16449 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16459 - def type; end - end -end - -# Represents the use of the `unless` keyword, either in the block form or the modifier form. -# -# bar unless foo -# ^^^^^^^^^^^^^^ -# -# unless foo then bar end -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#16471 -class Prism::UnlessNode < ::Prism::Node - # def initialize: (keyword_loc: Location, predicate: Node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> void - # - # @return [UnlessNode] a new instance of UnlessNode - # - # source://prism//lib/prism/node.rb#16491 - 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 - ).void - end - def initialize(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#16502 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16511 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16525 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16516 - def compact_child_nodes; end - - # attr_reader consequent: ElseNode? - # - # source://prism//lib/prism/node.rb#16485 - sig { returns(T.nilable(Prism::ElseNode)) } - def consequent; end - - # def copy: (**params) -> UnlessNode - # - # source://prism//lib/prism/node.rb#16530 - sig { params(params: T.untyped).returns(Prism::UnlessNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16511 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#16546 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def end_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#16561 - sig { returns(T.nilable(String)) } - def end_keyword; end - - # attr_reader end_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#16488 - sig { returns(T.nilable(Prism::Location)) } - def end_keyword_loc; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#16566 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#16551 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#16473 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader predicate: Node - # - # source://prism//lib/prism/node.rb#16476 - sig { returns(Prism::Node) } - def predicate; end - - # source://prism//lib/prism/node.rb#16506 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#16482 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # def then_keyword: () -> String? - # - # source://prism//lib/prism/node.rb#16556 - sig { returns(T.nilable(String)) } - def then_keyword; end - - # attr_reader then_keyword_loc: Location? - # - # source://prism//lib/prism/node.rb#16479 - sig { returns(T.nilable(Prism::Location)) } - def then_keyword_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16602 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16612 - def type; end - end -end - -# Represents the use of the `until` keyword, either in the block form or the modifier form. -# -# bar until foo -# ^^^^^^^^^^^^^ -# -# until foo do bar end -# ^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#16624 -class Prism::UntilNode < ::Prism::Node - # def initialize: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> void - # - # @return [UntilNode] a new instance of UntilNode - # - # source://prism//lib/prism/node.rb#16641 - 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 - ).void - end - def initialize(flags, keyword_loc, closing_loc, predicate, statements, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#16651 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def begin_modifier?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16698 - sig { returns(T::Boolean) } - def begin_modifier?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16660 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#16708 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#16632 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16673 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16665 - def compact_child_nodes; end - - # def copy: (**params) -> UntilNode - # - # source://prism//lib/prism/node.rb#16678 - sig { params(params: T.untyped).returns(Prism::UntilNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16660 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#16693 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#16713 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#16703 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#16629 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader predicate: Node - # - # source://prism//lib/prism/node.rb#16635 - sig { returns(Prism::Node) } - def predicate; end - - # source://prism//lib/prism/node.rb#16655 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#16638 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16744 - def type; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#16626 - 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#16754 - def type; end - end -end - -# The version constant is set by reading the result of calling pm_version. -Prism::VERSION = T.let(T.unsafe(nil), String) - -# A visitor is a class that provides a default implementation for every accept -# method defined on the nodes. This means it can walk a tree without the -# caller needing to define any special handling. This allows you to handle a -# subset of the tree, while still walking the whole tree. -# -# For example, to find all of the method calls that call the `foo` method, you -# could write: -# -# class FooCalls < Prism::Visitor -# def visit_call_node(node) -# if node.name == "foo" -# # Do something with the node -# end -# -# # Call super so that the visitor continues walking the tree -# super -# end -# end -# -# source://prism//lib/prism/visitor.rb#50 -class Prism::Visitor < ::Prism::BasicVisitor - # Visit a AliasGlobalVariableNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::AliasGlobalVariableNode).void } - def visit_alias_global_variable_node(node); end - - # Visit a AliasMethodNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::AliasMethodNode).void } - def visit_alias_method_node(node); end - - # Visit a AlternationPatternNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::AlternationPatternNode).void } - def visit_alternation_pattern_node(node); end - - # Visit a AndNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::AndNode).void } - def visit_and_node(node); end - - # Visit a ArgumentsNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ArgumentsNode).void } - def visit_arguments_node(node); end - - # Visit a ArrayNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ArrayNode).void } - def visit_array_node(node); end - - # Visit a ArrayPatternNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ArrayPatternNode).void } - def visit_array_pattern_node(node); end - - # Visit a AssocNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::AssocNode).void } - def visit_assoc_node(node); end - - # Visit a AssocSplatNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::AssocSplatNode).void } - def visit_assoc_splat_node(node); end - - # Visit a BackReferenceReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BackReferenceReadNode).void } - def visit_back_reference_read_node(node); end - - # Visit a BeginNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BeginNode).void } - def visit_begin_node(node); end - - # Visit a BlockArgumentNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BlockArgumentNode).void } - def visit_block_argument_node(node); end - - # Visit a BlockLocalVariableNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BlockLocalVariableNode).void } - def visit_block_local_variable_node(node); end - - # Visit a BlockNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BlockNode).void } - def visit_block_node(node); end - - # Visit a BlockParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BlockParameterNode).void } - def visit_block_parameter_node(node); end - - # Visit a BlockParametersNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BlockParametersNode).void } - def visit_block_parameters_node(node); end - - # Visit a BreakNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::BreakNode).void } - def visit_break_node(node); end - - # Visit a CallAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CallAndWriteNode).void } - def visit_call_and_write_node(node); end - - # Visit a CallNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CallNode).void } - def visit_call_node(node); end - - # Visit a CallOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CallOperatorWriteNode).void } - def visit_call_operator_write_node(node); end - - # Visit a CallOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CallOrWriteNode).void } - def visit_call_or_write_node(node); end - - # Visit a CallTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CallTargetNode).void } - def visit_call_target_node(node); end - - # Visit a CapturePatternNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CapturePatternNode).void } - def visit_capture_pattern_node(node); end - - # Visit a CaseMatchNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CaseMatchNode).void } - def visit_case_match_node(node); end - - # Visit a CaseNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::CaseNode).void } - def visit_case_node(node); end - - # Visit a ClassNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassNode).void } - def visit_class_node(node); end - - # Visit a ClassVariableAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassVariableAndWriteNode).void } - def visit_class_variable_and_write_node(node); end - - # Visit a ClassVariableOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassVariableOperatorWriteNode).void } - def visit_class_variable_operator_write_node(node); end - - # Visit a ClassVariableOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassVariableOrWriteNode).void } - def visit_class_variable_or_write_node(node); end - - # Visit a ClassVariableReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassVariableReadNode).void } - def visit_class_variable_read_node(node); end - - # Visit a ClassVariableTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassVariableTargetNode).void } - def visit_class_variable_target_node(node); end - - # Visit a ClassVariableWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ClassVariableWriteNode).void } - def visit_class_variable_write_node(node); end - - # Visit a ConstantAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantAndWriteNode).void } - def visit_constant_and_write_node(node); end - - # Visit a ConstantOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantOperatorWriteNode).void } - def visit_constant_operator_write_node(node); end - - # Visit a ConstantOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantOrWriteNode).void } - def visit_constant_or_write_node(node); end - - # Visit a ConstantPathAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantPathAndWriteNode).void } - def visit_constant_path_and_write_node(node); end - - # Visit a ConstantPathNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantPathNode).void } - def visit_constant_path_node(node); end - - # Visit a ConstantPathOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantPathOperatorWriteNode).void } - def visit_constant_path_operator_write_node(node); end - - # Visit a ConstantPathOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantPathOrWriteNode).void } - def visit_constant_path_or_write_node(node); end - - # Visit a ConstantPathTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantPathTargetNode).void } - def visit_constant_path_target_node(node); end - - # Visit a ConstantPathWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantPathWriteNode).void } - def visit_constant_path_write_node(node); end - - # Visit a ConstantReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantReadNode).void } - def visit_constant_read_node(node); end - - # Visit a ConstantTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantTargetNode).void } - def visit_constant_target_node(node); end - - # Visit a ConstantWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ConstantWriteNode).void } - def visit_constant_write_node(node); end - - # Visit a DefNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::DefNode).void } - def visit_def_node(node); end - - # Visit a DefinedNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::DefinedNode).void } - def visit_defined_node(node); end - - # Visit a ElseNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ElseNode).void } - def visit_else_node(node); end - - # Visit a EmbeddedStatementsNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::EmbeddedStatementsNode).void } - def visit_embedded_statements_node(node); end - - # Visit a EmbeddedVariableNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::EmbeddedVariableNode).void } - def visit_embedded_variable_node(node); end - - # Visit a EnsureNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::EnsureNode).void } - def visit_ensure_node(node); end - - # Visit a FalseNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::FalseNode).void } - def visit_false_node(node); end - - # Visit a FindPatternNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::FindPatternNode).void } - def visit_find_pattern_node(node); end - - # Visit a FlipFlopNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::FlipFlopNode).void } - def visit_flip_flop_node(node); end - - # Visit a FloatNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::FloatNode).void } - def visit_float_node(node); end - - # Visit a ForNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ForNode).void } - def visit_for_node(node); end - - # Visit a ForwardingArgumentsNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ForwardingArgumentsNode).void } - def visit_forwarding_arguments_node(node); end - - # Visit a ForwardingParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ForwardingParameterNode).void } - def visit_forwarding_parameter_node(node); end - - # Visit a ForwardingSuperNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ForwardingSuperNode).void } - def visit_forwarding_super_node(node); end - - # Visit a GlobalVariableAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::GlobalVariableAndWriteNode).void } - def visit_global_variable_and_write_node(node); end - - # Visit a GlobalVariableOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } - def visit_global_variable_operator_write_node(node); end - - # Visit a GlobalVariableOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::GlobalVariableOrWriteNode).void } - def visit_global_variable_or_write_node(node); end - - # Visit a GlobalVariableReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::GlobalVariableReadNode).void } - def visit_global_variable_read_node(node); end - - # Visit a GlobalVariableTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::GlobalVariableTargetNode).void } - def visit_global_variable_target_node(node); end - - # Visit a GlobalVariableWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::GlobalVariableWriteNode).void } - def visit_global_variable_write_node(node); end - - # Visit a HashNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::HashNode).void } - def visit_hash_node(node); end - - # Visit a HashPatternNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::HashPatternNode).void } - def visit_hash_pattern_node(node); end - - # Visit a IfNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::IfNode).void } - def visit_if_node(node); end - - # Visit a ImaginaryNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ImaginaryNode).void } - def visit_imaginary_node(node); end - - # Visit a ImplicitNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ImplicitNode).void } - def visit_implicit_node(node); end - - # Visit a ImplicitRestNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ImplicitRestNode).void } - def visit_implicit_rest_node(node); end - - # Visit a InNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InNode).void } - def visit_in_node(node); end - - # Visit a IndexAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::IndexAndWriteNode).void } - def visit_index_and_write_node(node); end - - # Visit a IndexOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::IndexOperatorWriteNode).void } - def visit_index_operator_write_node(node); end - - # Visit a IndexOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::IndexOrWriteNode).void } - def visit_index_or_write_node(node); end - - # Visit a IndexTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::IndexTargetNode).void } - def visit_index_target_node(node); end - - # Visit a InstanceVariableAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InstanceVariableAndWriteNode).void } - def visit_instance_variable_and_write_node(node); end - - # Visit a InstanceVariableOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } - def visit_instance_variable_operator_write_node(node); end - - # Visit a InstanceVariableOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InstanceVariableOrWriteNode).void } - def visit_instance_variable_or_write_node(node); end - - # Visit a InstanceVariableReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InstanceVariableReadNode).void } - def visit_instance_variable_read_node(node); end - - # Visit a InstanceVariableTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InstanceVariableTargetNode).void } - def visit_instance_variable_target_node(node); end - - # Visit a InstanceVariableWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InstanceVariableWriteNode).void } - def visit_instance_variable_write_node(node); end - - # Visit a IntegerNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::IntegerNode).void } - def visit_integer_node(node); end - - # Visit a InterpolatedMatchLastLineNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InterpolatedMatchLastLineNode).void } - def visit_interpolated_match_last_line_node(node); end - - # Visit a InterpolatedRegularExpressionNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InterpolatedRegularExpressionNode).void } - def visit_interpolated_regular_expression_node(node); end - - # Visit a InterpolatedStringNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InterpolatedStringNode).void } - def visit_interpolated_string_node(node); end - - # Visit a InterpolatedSymbolNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InterpolatedSymbolNode).void } - def visit_interpolated_symbol_node(node); end - - # Visit a InterpolatedXStringNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::InterpolatedXStringNode).void } - def visit_interpolated_x_string_node(node); end - - # Visit a KeywordHashNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::KeywordHashNode).void } - def visit_keyword_hash_node(node); end - - # Visit a KeywordRestParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::KeywordRestParameterNode).void } - def visit_keyword_rest_parameter_node(node); end - - # Visit a LambdaNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LambdaNode).void } - def visit_lambda_node(node); end - - # Visit a LocalVariableAndWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LocalVariableAndWriteNode).void } - def visit_local_variable_and_write_node(node); end - - # Visit a LocalVariableOperatorWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LocalVariableOperatorWriteNode).void } - def visit_local_variable_operator_write_node(node); end - - # Visit a LocalVariableOrWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LocalVariableOrWriteNode).void } - def visit_local_variable_or_write_node(node); end - - # Visit a LocalVariableReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LocalVariableReadNode).void } - def visit_local_variable_read_node(node); end - - # Visit a LocalVariableTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LocalVariableTargetNode).void } - def visit_local_variable_target_node(node); end - - # Visit a LocalVariableWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::LocalVariableWriteNode).void } - def visit_local_variable_write_node(node); end - - # Visit a MatchLastLineNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MatchLastLineNode).void } - def visit_match_last_line_node(node); end - - # Visit a MatchPredicateNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MatchPredicateNode).void } - def visit_match_predicate_node(node); end - - # Visit a MatchRequiredNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MatchRequiredNode).void } - def visit_match_required_node(node); end - - # Visit a MatchWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MatchWriteNode).void } - def visit_match_write_node(node); end - - # Visit a MissingNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MissingNode).void } - def visit_missing_node(node); end - - # Visit a ModuleNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ModuleNode).void } - def visit_module_node(node); end - - # Visit a MultiTargetNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MultiTargetNode).void } - def visit_multi_target_node(node); end - - # Visit a MultiWriteNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::MultiWriteNode).void } - def visit_multi_write_node(node); end - - # Visit a NextNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::NextNode).void } - def visit_next_node(node); end - - # Visit a NilNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::NilNode).void } - def visit_nil_node(node); end - - # Visit a NoKeywordsParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::NoKeywordsParameterNode).void } - def visit_no_keywords_parameter_node(node); end - - # Visit a NumberedParametersNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::NumberedParametersNode).void } - def visit_numbered_parameters_node(node); end - - # Visit a NumberedReferenceReadNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::NumberedReferenceReadNode).void } - def visit_numbered_reference_read_node(node); end - - # Visit a OptionalKeywordParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::OptionalKeywordParameterNode).void } - def visit_optional_keyword_parameter_node(node); end - - # Visit a OptionalParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::OptionalParameterNode).void } - def visit_optional_parameter_node(node); end - - # Visit a OrNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::OrNode).void } - def visit_or_node(node); end - - # Visit a ParametersNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ParametersNode).void } - def visit_parameters_node(node); end - - # Visit a ParenthesesNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ParenthesesNode).void } - def visit_parentheses_node(node); end - - # Visit a PinnedExpressionNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::PinnedExpressionNode).void } - def visit_pinned_expression_node(node); end - - # Visit a PinnedVariableNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::PinnedVariableNode).void } - def visit_pinned_variable_node(node); end - - # Visit a PostExecutionNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::PostExecutionNode).void } - def visit_post_execution_node(node); end - - # Visit a PreExecutionNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::PreExecutionNode).void } - def visit_pre_execution_node(node); end - - # Visit a ProgramNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ProgramNode).void } - def visit_program_node(node); end - - # Visit a RangeNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RangeNode).void } - def visit_range_node(node); end - - # Visit a RationalNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RationalNode).void } - def visit_rational_node(node); end - - # Visit a RedoNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RedoNode).void } - def visit_redo_node(node); end - - # Visit a RegularExpressionNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RegularExpressionNode).void } - def visit_regular_expression_node(node); end - - # Visit a RequiredKeywordParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RequiredKeywordParameterNode).void } - def visit_required_keyword_parameter_node(node); end - - # Visit a RequiredParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RequiredParameterNode).void } - def visit_required_parameter_node(node); end - - # Visit a RescueModifierNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RescueModifierNode).void } - def visit_rescue_modifier_node(node); end - - # Visit a RescueNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RescueNode).void } - def visit_rescue_node(node); end - - # Visit a RestParameterNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RestParameterNode).void } - def visit_rest_parameter_node(node); end - - # Visit a RetryNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::RetryNode).void } - def visit_retry_node(node); end - - # Visit a ReturnNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::ReturnNode).void } - def visit_return_node(node); end - - # Visit a SelfNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SelfNode).void } - def visit_self_node(node); end - - # Visit a SingletonClassNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SingletonClassNode).void } - def visit_singleton_class_node(node); end - - # Visit a SourceEncodingNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SourceEncodingNode).void } - def visit_source_encoding_node(node); end - - # Visit a SourceFileNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SourceFileNode).void } - def visit_source_file_node(node); end - - # Visit a SourceLineNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SourceLineNode).void } - def visit_source_line_node(node); end - - # Visit a SplatNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SplatNode).void } - def visit_splat_node(node); end - - # Visit a StatementsNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::StatementsNode).void } - def visit_statements_node(node); end - - # Visit a StringNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::StringNode).void } - def visit_string_node(node); end - - # Visit a SuperNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SuperNode).void } - def visit_super_node(node); end - - # Visit a SymbolNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::SymbolNode).void } - def visit_symbol_node(node); end - - # Visit a TrueNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::TrueNode).void } - def visit_true_node(node); end - - # Visit a UndefNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::UndefNode).void } - def visit_undef_node(node); end - - # Visit a UnlessNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::UnlessNode).void } - def visit_unless_node(node); end - - # Visit a UntilNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::UntilNode).void } - def visit_until_node(node); end - - # Visit a WhenNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::WhenNode).void } - def visit_when_node(node); end - - # Visit a WhileNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::WhileNode).void } - def visit_while_node(node); end - - # Visit a XStringNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::XStringNode).void } - def visit_x_string_node(node); end - - # Visit a YieldNode node - # - # source://prism//lib/prism/visitor.rb#26 - sig { params(node: Prism::YieldNode).void } - def visit_yield_node(node); end -end - -# Represents the use of the `when` keyword within a case statement. -# -# case true -# when true -# ^^^^^^^^^ -# end -# -# source://prism//lib/prism/node.rb#16765 -class Prism::WhenNode < ::Prism::Node - # def initialize: (keyword_loc: Location, conditions: Array[Node], statements: StatementsNode?, location: Location) -> void - # - # @return [WhenNode] a new instance of WhenNode - # - # source://prism//lib/prism/node.rb#16776 - sig do - params( - keyword_loc: Prism::Location, - conditions: T::Array[Prism::Node], - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location - ).void - end - def initialize(keyword_loc, conditions, statements, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#16784 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16789 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16802 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16794 - def compact_child_nodes; end - - # attr_reader conditions: Array[Node] - # - # source://prism//lib/prism/node.rb#16770 - sig { returns(T::Array[Prism::Node]) } - def conditions; end - - # def copy: (**params) -> WhenNode - # - # source://prism//lib/prism/node.rb#16807 - sig { params(params: T.untyped).returns(Prism::WhenNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16789 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#16820 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#16830 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#16825 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#16767 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#16773 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16857 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16867 - def type; end - end -end - -# Represents the use of the `while` keyword, either in the block form or the modifier form. -# -# bar while foo -# ^^^^^^^^^^^^^ -# -# while foo do bar end -# ^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#16879 -class Prism::WhileNode < ::Prism::Node - # def initialize: (flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, location: Location) -> void - # - # @return [WhileNode] a new instance of WhileNode - # - # source://prism//lib/prism/node.rb#16896 - 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 - ).void - end - def initialize(flags, keyword_loc, closing_loc, predicate, statements, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#16906 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def begin_modifier?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16953 - sig { returns(T::Boolean) } - def begin_modifier?; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16915 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String? - # - # source://prism//lib/prism/node.rb#16963 - sig { returns(T.nilable(String)) } - def closing; end - - # attr_reader closing_loc: Location? - # - # source://prism//lib/prism/node.rb#16887 - sig { returns(T.nilable(Prism::Location)) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#16928 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#16920 - def compact_child_nodes; end - - # def copy: (**params) -> WhileNode - # - # source://prism//lib/prism/node.rb#16933 - sig { params(params: T.untyped).returns(Prism::WhileNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#16915 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#16948 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#16968 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#16958 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#16884 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader predicate: Node - # - # source://prism//lib/prism/node.rb#16890 - sig { returns(Prism::Node) } - def predicate; end - - # source://prism//lib/prism/node.rb#16910 - def set_newline_flag(newline_marked); end - - # attr_reader statements: StatementsNode? - # - # source://prism//lib/prism/node.rb#16893 - sig { returns(T.nilable(Prism::StatementsNode)) } - def statements; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16999 - def type; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#16881 - 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#17009 - def type; end - end -end - -# Represents an xstring literal with no interpolation. -# -# `foo` -# ^^^^^ -# -# source://prism//lib/prism/node.rb#17018 -class Prism::XStringNode < ::Prism::Node - include ::Prism::HeredocQuery - - # def initialize: (flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void - # - # @return [XStringNode] a new instance of XStringNode - # - # source://prism//lib/prism/node.rb#17035 - sig do - params( - flags: Integer, - opening_loc: Prism::Location, - content_loc: Prism::Location, - closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location - ).void - end - def initialize(flags, opening_loc, content_loc, closing_loc, unescaped, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#17045 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17050 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def closing: () -> String - # - # source://prism//lib/prism/node.rb#17105 - sig { returns(String) } - def closing; end - - # attr_reader closing_loc: Location - # - # source://prism//lib/prism/node.rb#17029 - sig { returns(Prism::Location) } - def closing_loc; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#17060 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#17055 - def compact_child_nodes; end - - # def content: () -> String - # - # source://prism//lib/prism/node.rb#17100 - sig { returns(String) } - def content; end - - # attr_reader content_loc: Location - # - # source://prism//lib/prism/node.rb#17026 - sig { returns(Prism::Location) } - def content_loc; end - - # def copy: (**params) -> XStringNode - # - # source://prism//lib/prism/node.rb#17065 - sig { params(params: T.untyped).returns(Prism::XStringNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17050 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#17080 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17090 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17085 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#17110 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String - # - # source://prism//lib/prism/node.rb#17095 - sig { returns(String) } - def opening; end - - # attr_reader opening_loc: Location - # - # source://prism//lib/prism/node.rb#17023 - sig { returns(Prism::Location) } - def opening_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17135 - def type; end - - # attr_reader unescaped: String - # - # source://prism//lib/prism/node.rb#17032 - sig { returns(String) } - def unescaped; end - - private - - # Returns the value of attribute flags. - # - # source://prism//lib/prism/node.rb#17020 - 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#17145 - def type; end - end -end - -# Represents the use of the `yield` keyword. -# -# yield 1 -# ^^^^^^^ -# -# source://prism//lib/prism/node.rb#17154 -class Prism::YieldNode < ::Prism::Node - # def initialize: (keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location) -> void - # - # @return [YieldNode] a new instance of YieldNode - # - # source://prism//lib/prism/node.rb#17168 - 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 - ).void - end - def initialize(keyword_loc, lparen_loc, arguments, rparen_loc, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://prism//lib/prism/node.rb#17177 - sig { params(visitor: Prism::Visitor).void } - def accept(visitor); end - - # attr_reader arguments: ArgumentsNode? - # - # source://prism//lib/prism/node.rb#17162 - sig { returns(T.nilable(Prism::ArgumentsNode)) } - def arguments; end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17182 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism//lib/prism/node.rb#17194 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism//lib/prism/node.rb#17187 - def compact_child_nodes; end - - # def copy: (**params) -> YieldNode - # - # source://prism//lib/prism/node.rb#17199 - sig { params(params: T.untyped).returns(Prism::YieldNode) } - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17182 - sig { returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] - # - # source://prism//lib/prism/node.rb#17213 - sig do - params( - keys: T::Array[Symbol] - ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) - end - def deconstruct_keys(keys); end - - # def inspect(inspector: NodeInspector) -> String - # - # source://prism//lib/prism/node.rb#17233 - def inspect(inspector = T.unsafe(nil)); end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#17218 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#17156 - sig { returns(Prism::Location) } - def keyword_loc; end - - # def lparen: () -> String? - # - # source://prism//lib/prism/node.rb#17223 - sig { returns(T.nilable(String)) } - def lparen; end - - # attr_reader lparen_loc: Location? - # - # source://prism//lib/prism/node.rb#17159 - sig { returns(T.nilable(Prism::Location)) } - def lparen_loc; end - - # def rparen: () -> String? - # - # source://prism//lib/prism/node.rb#17228 - sig { returns(T.nilable(String)) } - def rparen; end - - # attr_reader rparen_loc: Location? - # - # source://prism//lib/prism/node.rb#17165 - sig { returns(T.nilable(Prism::Location)) } - def rparen_loc; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17261 - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # Note that like #type, it will still be slower than using == for a single - # class, but should be faster in a case statement or an array comparison. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17271 - def type; end - end -end diff --git a/sorbet/rbi/gems/prism@0.27.0.rbi b/sorbet/rbi/gems/prism@0.27.0.rbi new file mode 100644 index 00000000..36267480 --- /dev/null +++ b/sorbet/rbi/gems/prism@0.27.0.rbi @@ -0,0 +1,36983 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `prism` gem. +# Please instead update this file by running `bin/tapioca gem prism`. + +# typed: strict + +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/node.rbi.erb +# if you are looking to modify the template +# =end +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/visitor.rbi.erb +# if you are looking to modify the template +# =end + +# We keep these shims in here because our client libraries might not have +# 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!" +# - You, hopefully +# +# source://prism//lib/prism.rb#8 +module Prism + class << self + # Mirror the Prism.dump API by using the serialization API. + def dump(*_arg0); end + + # Mirror the Prism.dump_file API by using the serialization API. + def dump_file(*_arg0); end + + # Mirror the Prism.lex API by using the serialization API. + def lex(*_arg0); end + + # :call-seq: + # Prism::lex_compat(source, **options) -> LexCompat::Result + # + # Returns a parse result whose value is an array of tokens that closely + # resembles the return value of Ripper::lex. The main difference is that the + # `:on_sp` token is not emitted. + # + # For supported options, see Prism::parse. + # + # source://prism//lib/prism.rb#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. + def lex_file(*_arg0); end + + # :call-seq: + # Prism::lex_ripper(source) -> Array + # + # This lexes with the Ripper lex. It drops any space events but otherwise + # returns the same tokens. Raises SyntaxError if the syntax in source is + # invalid. + # + # source://prism//lib/prism.rb#57 + sig { params(source: String).returns(T::Array[T.untyped]) } + def lex_ripper(source); end + + # :call-seq: + # Prism::load(source, serialized) -> ParseResult + # + # Load the serialized AST using the source as a reference into a tree. + # + # source://prism//lib/prism.rb#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. + def parse(*_arg0); end + + # Mirror the Prism.parse_comments API by using the serialization API. + def parse_comments(*_arg0); end + + # Mirror the Prism.parse_failure? API by using the serialization API. + # + # @return [Boolean] + def parse_failure?(*_arg0); end + + # Mirror the Prism.parse_file API by using the serialization API. This uses + # native strings instead of Ruby strings because it allows us to use mmap + # when it is available. + def parse_file(*_arg0); end + + # Mirror the Prism.parse_file_comments API by using the serialization + # API. This uses native strings instead of Ruby strings because it allows us + # to use mmap when it is available. + def parse_file_comments(*_arg0); end + + # Mirror the Prism.parse_file_failure? API by using the serialization API. + # + # @return [Boolean] + def parse_file_failure?(*_arg0); end + + # Mirror the Prism.parse_file_success? API by using the serialization API. + # + # @return [Boolean] + def parse_file_success?(*_arg0); end + + # Mirror the Prism.parse_lex API by using the serialization API. + def parse_lex(*_arg0); end + + # Mirror the Prism.parse_lex_file API by using the serialization API. + def parse_lex_file(*_arg0); end + + # Mirror the Prism.parse_stream API by using the serialization API. + def parse_stream(*_arg0); end + + # Mirror the Prism.parse_success? API by using the serialization API. + # + # @return [Boolean] + def parse_success?(*_arg0); end + end +end + +# Represents the use of the `alias` keyword to alias a global variable. +# +# alias $foo $bar +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#135 +class Prism::AliasGlobalVariableNode < ::Prism::Node + # 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#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#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#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#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#157 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasGlobalVariableNode + # + # 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#152 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#207 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#202 + sig { returns(String) } + def keyword; end + + # The location of the `alias` keyword. + # + # alias $foo $bar + # ^^^^^ + # + # source://prism//lib/prism/node.rb#195 + sig { returns(Prism::Location) } + def keyword_loc; end + + # 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. + # + # alias $foo $bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#183 + sig { returns(Prism::Node) } + def new_name; end + + # 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#189 + sig { returns(Prism::Node) } + def old_name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#231 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#241 + def type; end + end +end + +# Represents the use of the `alias` keyword to alias a method. +# +# alias foo bar +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#259 +class Prism::AliasMethodNode < ::Prism::Node + # 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#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#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#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#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#281 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasMethodNode + # + # 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#276 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#322 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#317 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#310 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader new_name: Prism::node + # + # source://prism//lib/prism/node.rb#304 + sig { returns(Prism::Node) } + def new_name; end + + # attr_reader old_name: Prism::node + # + # source://prism//lib/prism/node.rb#307 + sig { returns(Prism::Node) } + def old_name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#346 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#356 + def type; end + end +end + +# Represents an alternation pattern in pattern matching. +# +# foo => bar | baz +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#374 +class Prism::AlternationPatternNode < ::Prism::Node + # 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#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#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#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#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#396 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AlternationPatternNode + # + # 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#391 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # + # 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#437 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Prism::node + # + # source://prism//lib/prism/node.rb#419 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#432 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#425 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Prism::node + # + # source://prism//lib/prism/node.rb#422 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#461 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#471 + def type; end + end +end + +# Represents the use of the `&&` operator or the `and` keyword. +# +# left and right +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#489 +class Prism::AndNode < ::Prism::Node + # 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#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#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#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#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#511 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AndNode + # + # 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#506 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # + # 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#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). + # + # left and right + # ^^^^ + # + # 1 && 2 + # ^ + # + # source://prism//lib/prism/node.rb#540 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#562 + sig { returns(String) } + def operator; end + + # The location of the `and` keyword or the `&&` operator. + # + # left and right + # ^^^ + # + # source://prism//lib/prism/node.rb#555 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left && right + # ^^^^^ + # + # 1 and 2 + # ^ + # + # source://prism//lib/prism/node.rb#549 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#591 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#601 + def type; end + end +end + +# Represents a set of arguments to a method or a keyword. +# +# return foo, bar, baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#619 +class Prism::ArgumentsNode < ::Prism::Node + # def initialize: (Integer flags, Array[Prism::node] arguments, Location location) -> void + # + # @return [ArgumentsNode] a new instance of ArgumentsNode + # + # 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#630 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#667 + sig { returns(T::Array[Prism::Node]) } + def arguments; end + + # def child_nodes: () -> Array[nil | 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#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#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#670 + sig { returns(T::Boolean) } + def contains_keyword_splat?; end + + # def copy: (?flags: Integer, ?arguments: Array[Prism::node], ?location: Location) -> ArgumentsNode + # + # 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#635 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Prism::node], location: Location } + # + # 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#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 + # 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#697 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#663 + 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#707 + def type; end + end +end + +# Flags for arguments nodes. +# +# source://prism//lib/prism/node.rb#20337 +module Prism::ArgumentsNodeFlags; end + +# if arguments contain keyword splat +# +# 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. +# +# [1, 2, 3] +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#725 +class Prism::ArrayNode < ::Prism::Node + # 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#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#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#743 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#824 + sig { returns(T.nilable(String)) } + def closing; end + + # Represents the optional source location for the closing token. + # + # [1,2,3] # "]" + # %w[foo bar baz] # "]" + # %I(apple orange banana) # ")" + # foo = 1, 2, 3 # nil + # + # source://prism//lib/prism/node.rb#801 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # 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#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#814 + sig { returns(T::Boolean) } + def contains_splat?; end + + # def copy: (?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayNode + # + # 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#743 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#766 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # Represent the list of zero or more [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression) within the array. + # + # source://prism//lib/prism/node.rb#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#829 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # source://prism//lib/prism/node.rb#819 + sig { returns(T.nilable(String)) } + def opening; end + + # Represents the optional source location for the opening token. + # + # [1,2,3] # "[" + # %w[foo bar baz] # "%w[" + # %I(apple orange banana) # "%I(" + # foo = 1, 2, 3 # nil + # + # source://prism//lib/prism/node.rb#783 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#853 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#771 + 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#863 + def type; end + end +end + +# Flags for array nodes. +# +# source://prism//lib/prism/node.rb#20343 +module Prism::ArrayNodeFlags; end + +# if array contains splat nodes +# +# source://prism//lib/prism/node.rb#20345 +Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) + +# Represents an array pattern in pattern matching. +# +# foo in 1, 2 +# ^^^^^^^^^^^ +# +# foo in [1, 2] +# ^^^^^^^^^^^^^ +# +# foo in *1 +# ^^^^^^^^^ +# +# foo in Bar[] +# ^^^^^^^^^^^^ +# +# foo in Bar[1, 2, 3] +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#895 +class Prism::ArrayPatternNode < ::Prism::Node + # 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#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#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#915 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # 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#973 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # 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#920 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: Prism::node? + # + # source://prism//lib/prism/node.rb#948 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # 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#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#915 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#996 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # 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#960 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader posts: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#957 + sig { returns(T::Array[Prism::Node]) } + def posts; end + + # attr_reader requireds: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#951 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader rest: Prism::node? + # + # source://prism//lib/prism/node.rb#954 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1031 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1041 + def type; end + end +end + +# Represents a hash key/value pair. +# +# { a => b } +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#1064 +class Prism::AssocNode < ::Prism::Node + # 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#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#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#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#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#1086 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?, ?location: Location) -> AssocNode + # + # 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#1081 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { key: Prism::node, value: Prism::node, operator_loc: Location?, location: Location } + # + # 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#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). + # + # { a: b } + # ^ + # + # { foo => bar } + # ^^^ + # + # { def a; end => 1 } + # ^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#1118 + sig { returns(Prism::Node) } + def key; end + + # def operator: () -> String? + # + # source://prism//lib/prism/node.rb#1146 + sig { returns(T.nilable(String)) } + def operator; end + + # The location of the `=>` operator, if present. + # + # { foo => bar } + # ^^ + # + # source://prism//lib/prism/node.rb#1133 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#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). + # + # { foo => bar } + # ^^^ + # + # { x: 1 } + # ^ + # + # source://prism//lib/prism/node.rb#1127 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1185 + def type; end + end +end + +# Represents a splat in a hash literal. +# +# { **foo } +# ^^^^^ +# +# source://prism//lib/prism/node.rb#1203 +class Prism::AssocSplatNode < ::Prism::Node + # def initialize: (Prism::node? value, Location operator_loc, Location location) -> void + # + # @return [AssocSplatNode] a new instance of AssocSplatNode + # + # 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#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#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#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#1224 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node?, ?operator_loc: Location, ?location: Location) -> AssocSplatNode + # + # 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#1219 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node?, operator_loc: Location, location: Location } + # + # 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#1270 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1265 + sig { returns(String) } + def operator; end + + # The location of the `**` operator. + # + # { **x } + # ^^ + # + # source://prism//lib/prism/node.rb#1258 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#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. + # + # { **foo } + # ^^^ + # + # source://prism//lib/prism/node.rb#1252 + sig { returns(T.nilable(Prism::Node)) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#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. +# +# $' +# ^^ +# +# 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#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#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#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#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#1343 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> BackReferenceReadNode + # + # 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#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#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#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 `$`. + # + # $& # name `:$&` + # + # $+ # name `:$+` + # + # source://prism//lib/prism/node.rb#1370 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1393 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1403 + def type; end + end +end + +# A class that knows how to walk down the tree. None of the individual visit +# methods are implemented on this visitor, so it forces the consumer to +# implement each one that they need. For a default implementation that +# continues walking the tree, see the Visitor class. +# +# source://prism//lib/prism/visitor.rb#14 +class Prism::BasicVisitor + # Calls `accept` on the given node if it is not `nil`, which in turn should + # call back into this visitor by calling the appropriate `visit_*` method. + # + # source://prism//lib/prism/visitor.rb#17 + sig { params(node: T.nilable(Prism::Node)).void } + def visit(node); end + + # Visits each node in `nodes` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#23 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).void } + def visit_all(nodes); end + + # Visits the child nodes of `node` by calling `accept` on each one. + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::Node).void } + def visit_child_nodes(node); end +end + +# Represents a begin statement. +# +# begin +# foo +# end +# ^^^^^ +# +# source://prism//lib/prism/node.rb#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#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#1436 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def begin_keyword: () -> String? + # + # 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#1478 + sig { returns(T.nilable(Prism::Location)) } + def begin_keyword_loc; end + + # def child_nodes: () -> Array[nil | 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#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#1450 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#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#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#1497 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + + # def end_keyword: () -> String? + # + # 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#1503 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # attr_reader ensure_clause: EnsureNode? + # + # 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#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#1494 + sig { returns(T.nilable(Prism::RescueNode)) } + def rescue_clause; end + + # source://prism//lib/prism/node.rb#1440 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#1491 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1571 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1581 + def type; end + end +end + +# Represents block method arguments. +# +# bar(&args) +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1602 +class Prism::BlockArgumentNode < ::Prism::Node + # def initialize: (Prism::node? expression, Location operator_loc, Location location) -> void + # + # @return [BlockArgumentNode] a new instance of BlockArgumentNode + # + # 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#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#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#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#1623 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?expression: Prism::node?, ?operator_loc: Location, ?location: Location) -> BlockArgumentNode + # + # 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#1618 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node?, operator_loc: Location, location: Location } + # + # 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: Prism::node? + # + # 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#1663 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#1658 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#1651 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1689 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1699 + def type; end + end +end + +# Represents a block local variable. +# +# a { |; b| } +# ^ +# +# 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#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#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#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#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#1737 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> BlockLocalVariableNode + # + # 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#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#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#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#1764 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#1767 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1794 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#1760 + 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#1804 + def type; end + end +end + +# Represents a block of ruby code. +# +# [1, 2, 3].each { |i| puts x } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#1821 +class Prism::BlockNode < ::Prism::Node + # 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#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#1835 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # 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#1840 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#1899 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#1845 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#1840 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#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#1871 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#1894 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#1880 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parameters: Prism::node? + # + # source://prism//lib/prism/node.rb#1874 + sig { returns(T.nilable(Prism::Node)) } + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1938 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#1948 + def type; end + end +end + +# Represents a block parameter to a method, block, or lambda definition. +# +# def a(&b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#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#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#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#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#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#1993 + 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) -> BlockParameterNode + # + # 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#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#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#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#2020 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # 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#2048 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#2036 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2043 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2081 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2016 + 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#2091 + def type; end + end +end + +# Represents a block's parameters declaration. +# +# -> (a, b = 1; local) { } +# ^^^^^^^^^^^^^^^^^ +# +# foo do |a, b = 1; local| +# ^^^^^^^^^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#2114 +class Prism::BlockParametersNode < ::Prism::Node + # 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#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#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#2132 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # 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#2182 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # 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#2137 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> BlockParametersNode + # + # 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#2132 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#2205 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader locals: Array[BlockLocalVariableNode] + # + # 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#2195 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # 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#2163 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2233 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2243 + def type; end + end +end + +# Represents the use of the `break` keyword. +# +# break foo +# ^^^^^^^^^ +# +# 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#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#2274 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # The arguments to the break statement, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # break foo + # ^^^ + # + # source://prism//lib/prism/node.rb#2312 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def child_nodes: () -> Array[nil | 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#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#2284 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> BreakNode + # + # 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#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#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#2330 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#2325 + sig { returns(String) } + def keyword; end + + # The location of the `break` keyword. + # + # break foo + # ^^^^^ + # + # source://prism//lib/prism/node.rb#2318 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2356 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2366 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call. +# +# foo.bar &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2383 +class Prism::CallAndWriteNode < ::Prism::Node + # 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#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#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#2495 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # 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#2443 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | 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#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#2410 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#2405 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#2500 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # 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#2510 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # 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#2515 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # 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#2469 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2440 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2485 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2554 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2482 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # 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#2472 + sig { returns(Symbol) } + def write_name; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2436 + 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#2564 + def type; end + end +end + +# Represents a method call, in all of the various forms that can take. +# +# foo +# ^^^ +# +# foo() +# ^^^^^ +# +# +foo +# ^^^^ +# +# foo + bar +# ^^^^^^^^^ +# +# foo.bar +# ^^^^^^^ +# +# foo&.bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2602 +class Prism::CallNode < ::Prism::Node + # 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#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#2620 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#2715 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2744 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Prism::node? + # + # 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#2754 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # 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#2625 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # 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#2718 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # 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#2630 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#2625 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#2749 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # 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#2759 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # 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#2686 + sig { returns(Symbol) } + def name; end + + # def opening: () -> String? + # + # 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#2702 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # The object that the method is being called on. This can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo.bar + # ^^^ + # + # +foo + # ^^^ + # + # foo + bar + # ^^^ + # + # source://prism//lib/prism/node.rb#2670 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2734 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#2818 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2739 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2657 + 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#2828 + def type; end + end +end + +# Flags for call nodes. +# +# 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#20357 +Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) + +# a call that ignores method visibility +# +# source://prism//lib/prism/node.rb#20360 +Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) + +# &. operator +# +# 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#20354 +Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) + +# Represents the use of an assignment operator on a call. +# +# foo.bar += baz +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#2852 +class Prism::CallOperatorWriteNode < ::Prism::Node + # 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#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#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#2968 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # 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#2913 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | 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#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#2880 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#2875 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#2973 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # 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#2983 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # 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#2945 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # 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#2939 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#2910 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#2958 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3023 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#2955 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # 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#2942 + sig { returns(Symbol) } + def write_name; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#2906 + 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#3033 + def type; end + end +end + +# Represents the use of the `||=` operator on a call. +# +# foo.bar ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3057 +class Prism::CallOrWriteNode < ::Prism::Node + # 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#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#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#3169 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String? + # + # 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#3117 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | 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#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#3084 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#3079 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#3174 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # 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#3184 + sig { returns(T.nilable(String)) } + def message; end + + # attr_reader message_loc: Location? + # + # 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#3189 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # 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#3143 + sig { returns(Symbol) } + def read_name; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#3114 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3159 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3228 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3156 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # 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#3146 + sig { returns(Symbol) } + def write_name; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#3110 + 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#3238 + def type; end + end +end + +# Represents assigning to a method call. +# +# foo.bar, = 1 +# ^^^^^^^ +# +# begin +# rescue => foo.bar +# ^^^^^^^ +# end +# +# for foo.bar in baz do end +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#3269 +class Prism::CallTargetNode < ::Prism::Node + # 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#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#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#3350 + sig { returns(T::Boolean) } + def attribute_write?; end + + # def call_operator: () -> String + # + # 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#3323 + sig { returns(Prism::Location) } + def call_operator_loc; end + + # def child_nodes: () -> Array[nil | 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#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#3293 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#3288 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#3355 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # 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#3365 + sig { returns(String) } + def message; end + + # attr_reader message_loc: Location + # + # 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#3330 + sig { returns(Symbol) } + def name; end + + # attr_reader receiver: Prism::node + # + # source://prism//lib/prism/node.rb#3320 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3340 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3396 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#3345 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#3316 + 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#3406 + def type; end + end +end + +# Represents assigning to a local variable in pattern matching. +# +# foo => [bar => baz] +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3426 +class Prism::CapturePatternNode < ::Prism::Node + # 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#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#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#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#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#3448 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node, ?target: Prism::node, ?operator_loc: Location, ?location: Location) -> CapturePatternNode + # + # 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#3443 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, target: Prism::node, operator_loc: Location, location: Location } + # + # 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#3489 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#3484 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#3477 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: Prism::node + # + # source://prism//lib/prism/node.rb#3474 + sig { returns(Prism::Node) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3513 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#3471 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3523 + def type; end + end +end + +# Represents the use of a case statement for pattern matching. +# +# case true +# in false +# end +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3543 +class Prism::CaseMatchNode < ::Prism::Node + # 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#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#3557 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # 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#3603 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | 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#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#3567 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[Prism::node] + # + # 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#3600 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # 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#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#3562 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#3622 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # 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#3627 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Prism::node? + # + # source://prism//lib/prism/node.rb#3594 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3661 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3671 + def type; end + end +end + +# Represents the use of a case statement. +# +# case true +# when false +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3694 +class Prism::CaseNode < ::Prism::Node + # 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#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#3708 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def case_keyword: () -> String + # + # 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#3754 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | 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#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#3718 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[Prism::node] + # + # 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#3751 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # 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#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#3713 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#3773 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # 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#3778 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Prism::node? + # + # source://prism//lib/prism/node.rb#3745 + sig { returns(T.nilable(Prism::Node)) } + def predicate; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3812 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3822 + def type; end + end +end + +# Represents a class declaration involving the `class` keyword. +# +# class Foo end +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#3843 +class Prism::ClassNode < ::Prism::Node + # 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#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#3860 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # 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#3865 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def class_keyword: () -> String + # + # 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#3900 + sig { returns(Prism::Location) } + def class_keyword_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # 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#3870 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: Prism::node + # + # source://prism//lib/prism/node.rb#3907 + sig { returns(Prism::Node) } + def constant_path; end + + # 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#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#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: 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#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#3949 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # 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#3944 + sig { returns(T.nilable(String)) } + def inheritance_operator; end + + # attr_reader inheritance_operator_loc: Location? + # + # 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#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#3897 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#3936 + sig { returns(Symbol) } + def name; end + + # attr_reader superclass: Prism::node? + # + # source://prism//lib/prism/node.rb#3923 + sig { returns(T.nilable(Prism::Node)) } + def superclass; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#3992 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4002 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a class variable. +# +# @@target &&= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4026 +class Prism::ClassVariableAndWriteNode < ::Prism::Node + # 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#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#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#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#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#4049 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableAndWriteNode + # + # 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#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: Prism::node, location: Location } + # + # 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#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#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#4072 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4075 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4092 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4082 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4121 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4089 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4131 + def type; end + end +end + +# Represents assigning to a class variable using an operator that isn't `=`. +# +# @@target += value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4150 +class Prism::ClassVariableOperatorWriteNode < ::Prism::Node + # 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#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#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#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#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#4174 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ClassVariableOperatorWriteNode + # + # 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#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: Prism::node, operator: Symbol, location: Location } + # + # 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#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#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#4197 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # 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#4217 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4207 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4245 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4214 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4255 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a class variable. +# +# @@target ||= value +# ^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4275 +class Prism::ClassVariableOrWriteNode < ::Prism::Node + # 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#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#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#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#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#4298 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableOrWriteNode + # + # 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#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: Prism::node, location: Location } + # + # 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#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#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#4321 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4324 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4341 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4331 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4370 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4338 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4380 + def type; end + end +end + +# Represents referencing a class variable. +# +# @@foo +# ^^^^^ +# +# 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#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#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#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#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#4419 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> ClassVariableReadNode + # + # 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#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#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#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). + # + # @@abc # name `:@@abc` + # + # @@_test # name `:@@_test` + # + # source://prism//lib/prism/node.rb#4446 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4469 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4479 + def type; end + end +end + +# Represents writing to a class variable in a context that doesn't have an explicit value. +# +# @@foo, @@bar = baz +# ^^^^^ ^^^^^ +# +# source://prism//lib/prism/node.rb#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#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#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#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#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#4515 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> ClassVariableTargetNode + # + # 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#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#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#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#4538 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4561 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4571 + def type; end + end +end + +# Represents writing to a class variable. +# +# @@foo = 1 +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4587 +class Prism::ClassVariableWriteNode < ::Prism::Node + # 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#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#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#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#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#4610 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ClassVariableWriteNode + # + # 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#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: Prism::node, operator_loc: Location, location: Location } + # + # 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#4674 + 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). + # + # @@abc = 123 # name `@@abc` + # + # @@_test = :test # name `@@_test` + # + # source://prism//lib/prism/node.rb#4637 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @@foo = :bar + # ^^^^^ + # + # source://prism//lib/prism/node.rb#4643 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4669 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @@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 + # 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#4698 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the class variable. This can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @@foo = :bar + # ^^^^ + # + # @@_xyz = 123 + # ^^^ + # + # source://prism//lib/prism/node.rb#4656 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4708 + def type; end + end +end + +# This represents a comment that was encountered during parsing. It is the +# base class for all comment types. +# +# source://prism//lib/prism/parse_result.rb#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#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#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#290 + sig { returns(Prism::Location) } + def location; end + + # Returns the content of the comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#303 + sig { returns(String) } + def slice; end + + sig { abstract.returns(T::Boolean) } + def trailing?; end +end + +# A compiler is a visitor that returns the value of each node as it visits. +# This is as opposed to a visitor which will only walk the tree. This can be +# useful when you are trying to compile a tree into a different format. +# +# For example, to build a representation of the tree as s-expressions, you +# could write: +# +# class SExpressions < Prism::Compiler +# def visit_arguments_node(node) = [:arguments, super] +# def visit_call_node(node) = [:call, super] +# def visit_integer_node(node) = [:integer] +# def visit_program_node(node) = [:program, super] +# end +# +# Prism.parse("1 + 2").value.accept(SExpressions.new) +# # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] +# +# source://prism//lib/prism/compiler.rb#27 +class Prism::Compiler < ::Prism::Visitor + # Visit an individual node. + # + # source://prism//lib/prism/compiler.rb#29 + sig { params(node: T.nilable(Prism::Node)).returns(T.nilable(Result)) } + def visit(node); end + + # Visit the child nodes of the given node. + # Compile a AliasGlobalVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_alias_global_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a AliasMethodNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_alias_method_node(node); end + + # Visit a list of nodes. + # + # source://prism//lib/prism/compiler.rb#34 + sig { params(nodes: T::Array[T.nilable(Prism::Node)]).returns(T::Array[T.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#39 + def visit_alternation_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AndNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_and_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_array_node(node); end + + # Visit the child nodes of the given node. + # Compile a ArrayPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_array_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_assoc_node(node); end + + # Visit the child nodes of the given node. + # Compile a AssocSplatNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_assoc_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a BackReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_back_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a BeginNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_begin_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockArgumentNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_argument_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockLocalVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_local_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a BlockParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_block_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a BreakNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_break_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a CallTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_call_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a CapturePatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_capture_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseMatchNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_case_match_node(node); end + + # Visit the child nodes of the given node. + # Compile a CaseNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_case_node(node); end + + # Visit the child nodes of the given node. + # + # source://prism//lib/prism/compiler.rb#39 + sig { params(node: Prism::Node).returns(T::Array[T.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#39 + def visit_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ClassVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_class_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantPathWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_path_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a ConstantWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_constant_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_def_node(node); end + + # Visit the child nodes of the given node. + # Compile a DefinedNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_defined_node(node); end + + # Visit the child nodes of the given node. + # Compile a ElseNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_else_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedStatementsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_embedded_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a EmbeddedVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_embedded_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a EnsureNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_ensure_node(node); end + + # Visit the child nodes of the given node. + # Compile a FalseNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_false_node(node); end + + # Visit the child nodes of the given node. + # Compile a FindPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_find_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a FlipFlopNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_flip_flop_node(node); end + + # Visit the child nodes of the given node. + # Compile a FloatNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_float_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_for_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingArgumentsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_forwarding_arguments_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_forwarding_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a ForwardingSuperNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_forwarding_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a GlobalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_global_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a HashPatternNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_hash_pattern_node(node); end + + # Visit the child nodes of the given node. + # Compile a IfNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_if_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImaginaryNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_imaginary_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImplicitNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_implicit_node(node); end + + # Visit the child nodes of the given node. + # Compile a ImplicitRestNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_implicit_rest_node(node); end + + # Visit the child nodes of the given node. + # Compile a InNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_in_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IndexTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_index_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a InstanceVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_instance_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a IntegerNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_integer_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedStringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedSymbolNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a InterpolatedXStringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_interpolated_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a ItParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_it_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordHashNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_keyword_hash_node(node); end + + # Visit the child nodes of the given node. + # Compile a KeywordRestParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_keyword_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a LambdaNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_lambda_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_and_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_operator_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_or_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a LocalVariableWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_local_variable_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchLastLineNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_last_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchPredicateNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_predicate_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchRequiredNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_required_node(node); end + + # Visit the child nodes of the given node. + # Compile a MatchWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_match_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a MissingNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_missing_node(node); end + + # Visit the child nodes of the given node. + # Compile a ModuleNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_module_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiTargetNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_multi_target_node(node); end + + # Visit the child nodes of the given node. + # Compile a MultiWriteNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_multi_write_node(node); end + + # Visit the child nodes of the given node. + # Compile a NextNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_next_node(node); end + + # Visit the child nodes of the given node. + # Compile a NilNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_nil_node(node); end + + # Visit the child nodes of the given node. + # Compile a NoKeywordsParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_no_keywords_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a NumberedParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_numbered_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a NumberedReferenceReadNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_numbered_reference_read_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_optional_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OptionalParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_optional_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a OrNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_or_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParametersNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_parameters_node(node); end + + # Visit the child nodes of the given node. + # Compile a ParenthesesNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_parentheses_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedExpressionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_pinned_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a PinnedVariableNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_pinned_variable_node(node); end + + # Visit the child nodes of the given node. + # Compile a PostExecutionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_post_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a PreExecutionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_pre_execution_node(node); end + + # Visit the child nodes of the given node. + # Compile a ProgramNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_program_node(node); end + + # Visit the child nodes of the given node. + # Compile a RangeNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_range_node(node); end + + # Visit the child nodes of the given node. + # Compile a RationalNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rational_node(node); end + + # Visit the child nodes of the given node. + # Compile a RedoNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_redo_node(node); end + + # Visit the child nodes of the given node. + # Compile a RegularExpressionNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_regular_expression_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_required_keyword_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RequiredParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_required_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueModifierNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rescue_modifier_node(node); end + + # Visit the child nodes of the given node. + # Compile a RescueNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rescue_node(node); end + + # Visit the child nodes of the given node. + # Compile a RestParameterNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_rest_parameter_node(node); end + + # Visit the child nodes of the given node. + # Compile a RetryNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_retry_node(node); end + + # Visit the child nodes of the given node. + # Compile a ReturnNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_return_node(node); end + + # Visit the child nodes of the given node. + # Compile a SelfNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_self_node(node); end + + # Visit the child nodes of the given node. + # Compile a ShareableConstantNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_shareable_constant_node(node); end + + # Visit the child nodes of the given node. + # Compile a SingletonClassNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_singleton_class_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceEncodingNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_source_encoding_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceFileNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_source_file_node(node); end + + # Visit the child nodes of the given node. + # Compile a SourceLineNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_source_line_node(node); end + + # Visit the child nodes of the given node. + # Compile a SplatNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_splat_node(node); end + + # Visit the child nodes of the given node. + # Compile a StatementsNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_statements_node(node); end + + # Visit the child nodes of the given node. + # Compile a StringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a SuperNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_super_node(node); end + + # Visit the child nodes of the given node. + # Compile a SymbolNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_symbol_node(node); end + + # Visit the child nodes of the given node. + # Compile a TrueNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_true_node(node); end + + # Visit the child nodes of the given node. + # Compile a UndefNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_undef_node(node); end + + # Visit the child nodes of the given node. + # Compile a UnlessNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_unless_node(node); end + + # Visit the child nodes of the given node. + # Compile a UntilNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_until_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhenNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_when_node(node); end + + # Visit the child nodes of the given node. + # Compile a WhileNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_while_node(node); end + + # Visit the child nodes of the given node. + # Compile a XStringNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_x_string_node(node); end + + # Visit the child nodes of the given node. + # Compile a YieldNode node + # + # source://prism//lib/prism/compiler.rb#39 + def visit_yield_node(node); end + + Result = type_member +end + +# Represents the use of the `&&=` operator for assignment to a constant. +# +# Target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4727 +class Prism::ConstantAndWriteNode < ::Prism::Node + # 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#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#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#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#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#4750 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantAndWriteNode + # + # 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#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: Prism::node, location: Location } + # + # 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#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#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#4773 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#4776 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#4793 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4783 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4822 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4790 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4832 + def type; end + end +end + +# Represents assigning to a constant using an operator that isn't `=`. +# +# Target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4851 +class Prism::ConstantOperatorWriteNode < ::Prism::Node + # 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#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#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#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#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#4875 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ConstantOperatorWriteNode + # + # 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#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: Prism::node, operator: Symbol, location: Location } + # + # 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#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#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#4898 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # 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#4918 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#4908 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4946 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#4915 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4956 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant. +# +# Target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#4976 +class Prism::ConstantOrWriteNode < ::Prism::Node + # 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#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#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#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#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#4999 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantOrWriteNode + # + # 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#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: Prism::node, location: Location } + # + # 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#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#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#5022 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#5025 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5042 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5032 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5071 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5039 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5081 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a constant path. +# +# Parent::Child &&= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5100 +class Prism::ConstantPathAndWriteNode < ::Prism::Node + # 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#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#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#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#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#5122 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathAndWriteNode + # + # 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#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: Prism::node, location: Location } + # + # 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#5163 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5158 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # 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#5145 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5187 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5155 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5197 + def type; end + end +end + +# Represents accessing a constant through a path of `::` operators. +# +# Foo::Bar +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5215 +class Prism::ConstantPathNode < ::Prism::Node + # 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#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#5227 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # The right-hand node of the path. Always a `ConstantReadNode` in a + # valid Ruby syntax tree. + # + # ::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#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#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#5237 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?parent: Prism::node?, ?child: ConstantReadNode | MissingNode, ?delimiter_loc: Location, ?location: Location) -> ConstantPathNode + # + # 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#5232 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, child: ConstantReadNode | MissingNode, delimiter_loc: Location, location: Location } + # + # 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#5301 + sig { returns(String) } + def delimiter; end + + # The location of the `::` delimiter. + # + # ::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#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#141 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#5306 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # The left-hand node of the path, if present. It can be `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It will be `nil` when the constant lookup is at the root of the module tree. + # + # Foo::Bar + # ^^^ + # + # self::Test + # ^^^^ + # + # a.b::C + # ^^^ + # + # source://prism//lib/prism/node.rb#5272 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5334 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5344 + def type; end + end +end + +# An error class raised when dynamic parts are found while computing a +# constant path's full name. For example: +# Foo::Bar::Baz -> does not raise because all parts of the constant path are +# simple constants +# var::Bar::Baz -> raises because the first part of the constant path is a +# local variable +# +# source://prism//lib/prism/node_ext.rb#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#5362 +class Prism::ConstantPathOperatorWriteNode < ::Prism::Node + # 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#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#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#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#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#5385 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> ConstantPathOperatorWriteNode + # + # 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#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: Prism::node, operator: Symbol, location: Location } + # + # 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#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#5421 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # 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#5408 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5449 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5418 + sig { returns(Prism::Node) } + def value; end + + class << self + # 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#5459 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a constant path. +# +# Parent::Child ||= value +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5478 +class Prism::ConstantPathOrWriteNode < ::Prism::Node + # 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#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#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#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#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#5500 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathOrWriteNode + # + # 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#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: Prism::node, location: Location } + # + # 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#5541 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5536 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#5526 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader target: ConstantPathNode + # + # source://prism//lib/prism/node.rb#5523 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5565 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#5533 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5575 + def type; end + end +end + +# Represents writing to a constant path in a context that doesn't have an explicit value. +# +# Foo::Foo, Bar::Bar = baz +# ^^^^^^^^ ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5593 +class Prism::ConstantPathTargetNode < ::Prism::Node + # 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#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#5605 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader child: ConstantReadNode | MissingNode + # + # 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#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#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#5615 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?parent: Prism::node?, ?child: ConstantReadNode | MissingNode, ?delimiter_loc: Location, ?location: Location) -> ConstantPathTargetNode + # + # 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#5610 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, child: ConstantReadNode | MissingNode, delimiter_loc: Location, location: Location } + # + # 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#5654 + sig { returns(String) } + def delimiter; end + + # attr_reader delimiter_loc: Location + # + # 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#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#170 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#5659 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader parent: Prism::node? + # + # source://prism//lib/prism/node.rb#5641 + sig { returns(T.nilable(Prism::Node)) } + def parent; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5687 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5697 + def type; end + end +end + +# Represents writing to a constant path. +# +# ::Foo = 1 +# ^^^^^^^^^ +# +# Foo::Bar = 1 +# ^^^^^^^^^^^^ +# +# ::Foo::Bar = 1 +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#5721 +class Prism::ConstantPathWriteNode < ::Prism::Node + # 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#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 + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # 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#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#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#5743 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathWriteNode + # + # 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#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: Prism::node, location: Location } + # + # 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#5796 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#5791 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # ::ABC = 123 + # ^ + # + # source://prism//lib/prism/node.rb#5778 + sig { returns(Prism::Location) } + def operator_loc; end + + # A node representing the constant path being written to. + # + # Foo::Bar = 1 + # ^^^^^^^^ + # + # ::Foo = :abc + # ^^^^^ + # + # source://prism//lib/prism/node.rb#5772 + sig { returns(Prism::ConstantPathNode) } + def target; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5820 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the constant path. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # FOO::BAR = :abc + # ^^^^ + # + # source://prism//lib/prism/node.rb#5788 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5830 + def type; end + end +end + +# Represents referencing a constant. +# +# Foo +# ^^^ +# +# 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#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#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#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#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#5868 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> ConstantReadNode + # + # 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#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#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#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#102 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect(NodeInspector inspector) -> String + # + # 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). + # + # X # name `:X` + # + # SOME_CONSTANT # name `:SOME_CONSTANT` + # + # source://prism//lib/prism/node.rb#5895 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5918 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5928 + def type; end + end +end + +# Represents writing to a constant in a context that doesn't have an explicit value. +# +# Foo, Bar = baz +# ^^^ ^^^ +# +# source://prism//lib/prism/node.rb#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#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#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#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#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#5964 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> ConstantTargetNode + # + # 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#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#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#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#198 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect(NodeInspector inspector) -> String + # + # 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#5987 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6010 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6020 + def type; end + end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#6036 +class Prism::ConstantWriteNode < ::Prism::Node + # 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#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#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#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#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#6059 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ConstantWriteNode + # + # 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#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: Prism::node, operator_loc: Location, location: Location } + # + # 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#6123 + 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). + # + # Foo = :bar # name `:Foo` + # + # XYZ = 1 # name `:XYZ` + # + # source://prism//lib/prism/node.rb#6086 + sig { returns(Symbol) } + def name; end + + # The location of the constant name. + # + # FOO = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#6092 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6118 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # FOO = :bar + # ^ + # + # source://prism//lib/prism/node.rb#6111 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6147 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the constant. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # FOO = :bar + # ^^^^ + # + # MyClass = Class.new + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#6105 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6157 + def type; end + end +end + +# The DSL module provides a set of methods that can be used to create prism +# nodes in a more concise manner. For example, instead of writing: +# +# source = Prism::Source.new("[1]") +# +# Prism::ArrayNode.new( +# [ +# Prism::IntegerNode.new( +# Prism::IntegerBaseFlags::DECIMAL, +# 1, +# Prism::Location.new(source, 1, 1), +# source +# ) +# ], +# Prism::Location.new(source, 0, 1), +# Prism::Location.new(source, 2, 1), +# source +# ) +# +# you could instead write: +# +# source = Prism::Source.new("[1]") +# +# ArrayNode( +# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, 1, Location(source, 1, 1)), source), +# Location(source, 0, 1), +# Location(source, 2, 1), +# source +# ) +# +# This is mostly helpful in the context of writing tests, but can also be used +# to generate trees programmatically. +# +# source://prism//lib/prism/dsl.rb#42 +module Prism::DSL + private + + # Create a new AliasGlobalVariableNode node + # + # 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#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#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#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#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#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#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#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#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#96 + def BackReferenceReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new BeginNode node + # + # 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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#196 + def ClassVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ClassVariableTargetNode node + # + # 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#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#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#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#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#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#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#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#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#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#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#256 + def ConstantReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ConstantTargetNode node + # + # 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#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#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#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#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#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#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#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#301 + def FalseNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new FindPatternNode node + # + # 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#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#316 + def FloatNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ForNode node + # + # 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#326 + def ForwardingArgumentsNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ForwardingParameterNode node + # + # 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#336 + def ForwardingSuperNode(block, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableAndWriteNode node + # + # 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#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#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#356 + def GlobalVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new GlobalVariableTargetNode node + # + # 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#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#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#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#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#386 + def ImaginaryNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ImplicitNode node + # + # 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#396 + def ImplicitRestNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InNode node + # + # 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#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#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#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#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#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#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#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#441 + def InstanceVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new InstanceVariableTargetNode node + # + # 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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#556 + def MissingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ModuleNode node + # + # 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#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#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#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#581 + def NilNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NoKeywordsParameterNode node + # + # 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#591 + def NumberedParametersNode(maximum, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new NumberedReferenceReadNode node + # + # 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#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#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#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#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#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#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#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#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#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#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#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#656 + def RationalNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new RedoNode node + # + # 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#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#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#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#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#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#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#696 + def RetryNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new ReturnNode node + # + # 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#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#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#721 + def SourceEncodingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SourceFileNode node + # + # 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#731 + def SourceLineNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new SplatNode node + # + # 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#741 + def StatementsNode(body, source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new StringNode node + # + # 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#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#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#761 + def TrueNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + + # Create a new UndefNode node + # + # 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#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#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#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#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#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#796 + def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end +end + +# This module is used for testing and debugging and is not meant to be used by +# consumers of this library. +# +# source://prism//lib/prism/debug.rb#6 +module Prism::Debug + class << self + # :call-seq: + # Debug::cruby_locals(source) -> Array + # + # For the given source, compiles with CRuby and returns a list of all of the + # sets of local variables that were encountered. + # + # source://prism//lib/prism/debug.rb#54 + def cruby_locals(source); end + + def format_errors(_arg0, _arg1); end + def inspect_node(_arg0); end + def integer_parse(_arg0); end + def memsize(_arg0); end + def named_captures(_arg0); end + + # :call-seq: + # Debug::newlines(source) -> Array + # + # For the given source string, return the byte offsets of every newline in + # the source. + # + # source://prism//lib/prism/debug.rb#202 + def newlines(source); end + + # :call-seq: + # Debug::prism_locals(source) -> Array + # + # For the given source, parses with prism and returns a list of all of the + # sets of local variables that were encountered. + # + # source://prism//lib/prism/debug.rb#98 + def prism_locals(source); end + + def profile_file(_arg0); end + def static_inspect(*_arg0); end + end +end + +# Used to hold the place of a local that will be in the local table but +# cannot be accessed directly from the source code. For example, the +# iteration variable in a for loop or the positional parameter on a method +# definition that is destructured. +# +# source://prism//lib/prism/debug.rb#90 +Prism::Debug::AnonymousLocal = T.let(T.unsafe(nil), Object) + +# A 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. +# +# source://prism//lib/prism/debug.rb#9 +class Prism::Debug::ISeq + # @return [ISeq] a new instance of ISeq + # + # source://prism//lib/prism/debug.rb#12 + def initialize(parts); end + + # source://prism//lib/prism/debug.rb#28 + def each_child; end + + # source://prism//lib/prism/debug.rb#24 + def instructions; end + + # source://prism//lib/prism/debug.rb#20 + def local_table; end + + # source://prism//lib/prism/debug.rb#10 + def parts; end + + # source://prism//lib/prism/debug.rb#16 + def type; end +end + +# Represents a method definition. +# +# def method +# end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6177 +class Prism::DefNode < ::Prism::Node + # 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#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#6198 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # 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#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#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#6208 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#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: 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#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#6329 + sig { returns(String) } + def def_keyword; end + + # attr_reader def_keyword_loc: Location + # + # 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#6354 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # 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#6349 + sig { returns(T.nilable(String)) } + def equal; end + + # attr_reader equal_loc: Location? + # + # 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#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#6254 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def lparen: () -> String? + # + # 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#6277 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6235 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6238 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String? + # + # 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#6264 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader parameters: ParametersNode? + # + # source://prism//lib/prism/node.rb#6248 + sig { returns(T.nilable(Prism::ParametersNode)) } + def parameters; end + + # attr_reader receiver: Prism::node? + # + # 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#6344 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#6290 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6405 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6415 + def type; end + end +end + +# Represents the use of the `defined?` keyword. +# +# defined?(a) +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#6443 +class Prism::DefinedNode < ::Prism::Node + # 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#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#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#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#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#6466 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location, ?location: Location) -> DefinedNode + # + # 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#6461 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#6540 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#6535 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#6518 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # 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#6489 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # 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#6505 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6564 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#6502 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6574 + def type; end + end +end + +# source://prism//lib/prism/desugar_compiler.rb#4 +class Prism::DesugarAndWriteNode + # @return [DesugarAndWriteNode] a new instance of DesugarAndWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#7 + def initialize(node, source, read_class, write_class, *arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def arguments; end + + # Desugar `x &&= y` to `x && x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#16 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def read_class; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def source; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#5 + def write_class; end +end + +# DesugarCompiler is a compiler that desugars Ruby code into a more primitive +# form. This is useful for consumers that want to deal with fewer node types. +# +# source://prism//lib/prism/desugar_compiler.rb#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#224 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # + # becomes + # + # @@foo = @@foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#242 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # + # becomes + # + # defined?(@@foo) ? @@foo : @@foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#233 + def visit_class_variable_or_write_node(node); end + + # Foo &&= bar + # + # becomes + # + # Foo && Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#251 + def visit_constant_and_write_node(node); end + + # Foo += bar + # + # becomes + # + # Foo = Foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#269 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # + # becomes + # + # defined?(Foo) ? Foo : Foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#260 + def visit_constant_or_write_node(node); end + + # $foo &&= bar + # + # becomes + # + # $foo && $foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#278 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # + # becomes + # + # $foo = $foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#296 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # + # becomes + # + # defined?($foo) ? $foo : $foo = bar + # + # 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#305 + def visit_instance_variable_and_write_node(node); end + + # becomes + # + # 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#314 + def visit_instance_variable_or_write_node(node); end + + # foo &&= bar + # + # becomes + # + # foo && foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#332 + def visit_local_variable_and_write_node(node); end + + # foo += bar + # + # becomes + # + # foo = foo + bar + # + # source://prism//lib/prism/desugar_compiler.rb#350 + def visit_local_variable_operator_write_node(node); end + + # foo ||= bar + # + # becomes + # + # foo || foo = bar + # + # source://prism//lib/prism/desugar_compiler.rb#341 + def visit_local_variable_or_write_node(node); end +end + +# source://prism//lib/prism/desugar_compiler.rb#63 +class Prism::DesugarOperatorWriteNode + # @return [DesugarOperatorWriteNode] a new instance of DesugarOperatorWriteNode + # + # source://prism//lib/prism/desugar_compiler.rb#66 + def initialize(node, source, read_class, write_class, *arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def arguments; end + + # Desugar `x += y` to `x = x + y` + # + # source://prism//lib/prism/desugar_compiler.rb#75 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def read_class; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def source; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#64 + def write_class; end +end + +# source://prism//lib/prism/desugar_compiler.rb#27 +class Prism::DesugarOrWriteDefinedNode + # @return [DesugarOrWriteDefinedNode] a new instance of DesugarOrWriteDefinedNode + # + # source://prism//lib/prism/desugar_compiler.rb#30 + def initialize(node, source, read_class, write_class, *arguments); end + + # Returns the value of attribute arguments. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def arguments; end + + # Desugar `x ||= y` to `defined?(x) ? x : x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#39 + def compile; end + + # Returns the value of attribute node. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def node; end + + # Returns the value of attribute read_class. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def read_class; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def source; end + + # Returns the value of attribute write_class. + # + # source://prism//lib/prism/desugar_compiler.rb#28 + def write_class; end +end + +# source://prism//lib/prism/desugar_compiler.rb#101 +class Prism::DesugarOrWriteNode + # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode + # + # 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#102 + def arguments; end + + # Desugar `x ||= y` to `x || x = y` + # + # source://prism//lib/prism/desugar_compiler.rb#113 + def compile; end + + # Returns the value of attribute node. + # + # 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#102 + def read_class; end + + # Returns the value of attribute source. + # + # 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#102 + def write_class; end +end + +# The dispatcher class fires events for nodes that are found while walking an +# AST to all registered listeners. It's useful for performing different types +# of analysis on the AST while only having to walk the tree once. +# +# To use the dispatcher, you would first instantiate it and register listeners +# for the events you're interested in: +# +# class OctalListener +# def on_integer_node_enter(node) +# if node.octal? && !node.slice.start_with?("0o") +# warn("Octal integers should be written with the 0o prefix") +# end +# end +# end +# +# dispatcher = Dispatcher.new +# dispatcher.register(listener, :on_integer_node_enter) +# +# Then, you can walk any number of trees and dispatch events to the listeners: +# +# result = Prism.parse("001 + 002 + 003") +# dispatcher.dispatch(result.value) +# +# Optionally, you can also use `#dispatch_once` to dispatch enter and leave +# events for a single node without recursing further down the tree. This can +# be useful in circumstances where you want to reuse the listeners you already +# have registers but want to stop walking the tree at a certain point. +# +# integer = result.value.statements.body.first.receiver.receiver +# dispatcher.dispatch_once(integer) +# +# source://prism//lib/prism/dispatcher.rb#41 +class Prism::Dispatcher < ::Prism::Visitor + # Initialize a new dispatcher. + # + # @return [Dispatcher] a new instance of Dispatcher + # + # 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#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#65 + def dispatch_once(node); end + + # attr_reader listeners: Hash[Symbol, Array[Listener]] + # + # 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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#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#1263 + def visit_yield_node(node); end +end + +# 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#1272 + def initialize(listeners); end + + # Returns the value of attribute listeners. + # + # source://prism//lib/prism/dispatcher.rb#1270 + def listeners; end + + # Dispatch enter and leave events for AliasGlobalVariableNode nodes. + # + # 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#1283 + def visit_alias_method_node(node); end + + # Dispatch enter and leave events for AlternationPatternNode nodes. + # + # 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#1295 + def visit_and_node(node); end + + # Dispatch enter and leave events for ArgumentsNode nodes. + # + # 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#1307 + def visit_array_node(node); end + + # Dispatch enter and leave events for ArrayPatternNode nodes. + # + # 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#1319 + def visit_assoc_node(node); end + + # Dispatch enter and leave events for AssocSplatNode nodes. + # + # 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#1331 + def visit_back_reference_read_node(node); end + + # Dispatch enter and leave events for BeginNode nodes. + # + # 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#1343 + def visit_block_argument_node(node); end + + # Dispatch enter and leave events for BlockLocalVariableNode nodes. + # + # 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#1355 + def visit_block_node(node); end + + # Dispatch enter and leave events for BlockParameterNode nodes. + # + # 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#1367 + def visit_block_parameters_node(node); end + + # Dispatch enter and leave events for BreakNode nodes. + # + # 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#1379 + def visit_call_and_write_node(node); end + + # Dispatch enter and leave events for CallNode nodes. + # + # 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#1391 + def visit_call_operator_write_node(node); end + + # Dispatch enter and leave events for CallOrWriteNode nodes. + # + # 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#1403 + def visit_call_target_node(node); end + + # Dispatch enter and leave events for CapturePatternNode nodes. + # + # 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#1415 + def visit_case_match_node(node); end + + # Dispatch enter and leave events for CaseNode nodes. + # + # 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#1427 + def visit_class_node(node); end + + # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. + # + # 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#1439 + def visit_class_variable_operator_write_node(node); end + + # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. + # + # 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#1451 + def visit_class_variable_read_node(node); end + + # Dispatch enter and leave events for ClassVariableTargetNode nodes. + # + # 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#1463 + def visit_class_variable_write_node(node); end + + # Dispatch enter and leave events for ConstantAndWriteNode nodes. + # + # 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#1475 + def visit_constant_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantOrWriteNode nodes. + # + # 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#1487 + def visit_constant_path_and_write_node(node); end + + # Dispatch enter and leave events for ConstantPathNode nodes. + # + # 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#1499 + def visit_constant_path_operator_write_node(node); end + + # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. + # + # 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#1511 + def visit_constant_path_target_node(node); end + + # Dispatch enter and leave events for ConstantPathWriteNode nodes. + # + # 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#1523 + def visit_constant_read_node(node); end + + # Dispatch enter and leave events for ConstantTargetNode nodes. + # + # 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#1535 + def visit_constant_write_node(node); end + + # Dispatch enter and leave events for DefNode nodes. + # + # 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#1547 + def visit_defined_node(node); end + + # Dispatch enter and leave events for ElseNode nodes. + # + # 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#1559 + def visit_embedded_statements_node(node); end + + # Dispatch enter and leave events for EmbeddedVariableNode nodes. + # + # 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#1571 + def visit_ensure_node(node); end + + # Dispatch enter and leave events for FalseNode nodes. + # + # 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#1583 + def visit_find_pattern_node(node); end + + # Dispatch enter and leave events for FlipFlopNode nodes. + # + # 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#1595 + def visit_float_node(node); end + + # Dispatch enter and leave events for ForNode nodes. + # + # 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#1607 + def visit_forwarding_arguments_node(node); end + + # Dispatch enter and leave events for ForwardingParameterNode nodes. + # + # 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#1619 + def visit_forwarding_super_node(node); end + + # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. + # + # 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#1631 + def visit_global_variable_operator_write_node(node); end + + # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. + # + # 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#1643 + def visit_global_variable_read_node(node); end + + # Dispatch enter and leave events for GlobalVariableTargetNode nodes. + # + # 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#1655 + def visit_global_variable_write_node(node); end + + # Dispatch enter and leave events for HashNode nodes. + # + # 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#1667 + def visit_hash_pattern_node(node); end + + # Dispatch enter and leave events for IfNode nodes. + # + # 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#1679 + def visit_imaginary_node(node); end + + # Dispatch enter and leave events for ImplicitNode nodes. + # + # 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#1691 + def visit_implicit_rest_node(node); end + + # Dispatch enter and leave events for InNode nodes. + # + # 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#1703 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes. + # + # 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#1715 + def visit_index_or_write_node(node); end + + # Dispatch enter and leave events for IndexTargetNode nodes. + # + # 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#1727 + def visit_instance_variable_and_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. + # + # 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#1739 + def visit_instance_variable_or_write_node(node); end + + # Dispatch enter and leave events for InstanceVariableReadNode nodes. + # + # 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#1751 + def visit_instance_variable_target_node(node); end + + # Dispatch enter and leave events for InstanceVariableWriteNode nodes. + # + # 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#1763 + def visit_integer_node(node); end + + # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. + # + # 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#1775 + def visit_interpolated_regular_expression_node(node); end + + # Dispatch enter and leave events for InterpolatedStringNode nodes. + # + # 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#1787 + def visit_interpolated_symbol_node(node); end + + # Dispatch enter and leave events for InterpolatedXStringNode nodes. + # + # 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#1805 + def visit_keyword_hash_node(node); end + + # Dispatch enter and leave events for KeywordRestParameterNode nodes. + # + # 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#1817 + def visit_lambda_node(node); end + + # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. + # + # 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#1829 + def visit_local_variable_operator_write_node(node); end + + # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. + # + # 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#1841 + def visit_local_variable_read_node(node); end + + # Dispatch enter and leave events for LocalVariableTargetNode nodes. + # + # 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#1853 + def visit_local_variable_write_node(node); end + + # Dispatch enter and leave events for MatchLastLineNode nodes. + # + # 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#1865 + def visit_match_predicate_node(node); end + + # Dispatch enter and leave events for MatchRequiredNode nodes. + # + # 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#1877 + def visit_match_write_node(node); end + + # Dispatch enter and leave events for MissingNode nodes. + # + # 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#1889 + def visit_module_node(node); end + + # Dispatch enter and leave events for MultiTargetNode nodes. + # + # 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#1901 + def visit_multi_write_node(node); end + + # Dispatch enter and leave events for NextNode nodes. + # + # 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#1913 + def visit_nil_node(node); end + + # Dispatch enter and leave events for NoKeywordsParameterNode nodes. + # + # 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#1925 + def visit_numbered_parameters_node(node); end + + # Dispatch enter and leave events for NumberedReferenceReadNode nodes. + # + # 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#1937 + def visit_optional_keyword_parameter_node(node); end + + # Dispatch enter and leave events for OptionalParameterNode nodes. + # + # 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#1949 + def visit_or_node(node); end + + # Dispatch enter and leave events for ParametersNode nodes. + # + # 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#1961 + def visit_parentheses_node(node); end + + # Dispatch enter and leave events for PinnedExpressionNode nodes. + # + # 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#1973 + def visit_pinned_variable_node(node); end + + # Dispatch enter and leave events for PostExecutionNode nodes. + # + # 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#1985 + def visit_pre_execution_node(node); end + + # Dispatch enter and leave events for ProgramNode nodes. + # + # 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#1997 + def visit_range_node(node); end + + # Dispatch enter and leave events for RationalNode nodes. + # + # 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#2009 + def visit_redo_node(node); end + + # Dispatch enter and leave events for RegularExpressionNode nodes. + # + # 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#2021 + def visit_required_keyword_parameter_node(node); end + + # Dispatch enter and leave events for RequiredParameterNode nodes. + # + # 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#2033 + def visit_rescue_modifier_node(node); end + + # Dispatch enter and leave events for RescueNode nodes. + # + # 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#2045 + def visit_rest_parameter_node(node); end + + # Dispatch enter and leave events for RetryNode nodes. + # + # 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#2057 + def visit_return_node(node); end + + # Dispatch enter and leave events for SelfNode nodes. + # + # 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#2075 + def visit_singleton_class_node(node); end + + # Dispatch enter and leave events for SourceEncodingNode nodes. + # + # 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#2087 + def visit_source_file_node(node); end + + # Dispatch enter and leave events for SourceLineNode nodes. + # + # 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#2099 + def visit_splat_node(node); end + + # Dispatch enter and leave events for StatementsNode nodes. + # + # 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#2111 + def visit_string_node(node); end + + # Dispatch enter and leave events for SuperNode nodes. + # + # 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#2123 + def visit_symbol_node(node); end + + # Dispatch enter and leave events for TrueNode nodes. + # + # 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#2135 + def visit_undef_node(node); end + + # Dispatch enter and leave events for UnlessNode nodes. + # + # 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#2147 + def visit_until_node(node); end + + # Dispatch enter and leave events for WhenNode nodes. + # + # 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#2159 + def visit_while_node(node); end + + # Dispatch enter and leave events for XStringNode nodes. + # + # 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#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#14 +class Prism::DotVisitor < ::Prism::Visitor + # Initialize a new dot visitor. + # + # @return [DotVisitor] a new instance of DotVisitor + # + # source://prism//lib/prism/dot_visitor.rb#106 + def initialize; end + + # The digraph that is being built. + # + # source://prism//lib/prism/dot_visitor.rb#103 + def digraph; end + + # Convert this visitor into a graphviz dot graph string. + # + # source://prism//lib/prism/dot_visitor.rb#111 + def to_dot; end + + # Visit a AliasGlobalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#116 + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node. + # + # source://prism//lib/prism/dot_visitor.rb#141 + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#166 + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node. + # + # source://prism//lib/prism/dot_visitor.rb#191 + def visit_and_node(node); end + + # Visit a ArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#216 + def visit_arguments_node(node); end + + # Visit a ArrayNode node. + # + # source://prism//lib/prism/dot_visitor.rb#246 + def visit_array_node(node); end + + # Visit a ArrayPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#286 + def visit_array_pattern_node(node); end + + # Visit a AssocNode node. + # + # source://prism//lib/prism/dot_visitor.rb#348 + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#375 + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#398 + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node. + # + # source://prism//lib/prism/dot_visitor.rb#415 + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node. + # + # source://prism//lib/prism/dot_visitor.rb#463 + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#486 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node. + # + # source://prism//lib/prism/dot_visitor.rb#506 + def visit_block_node(node); end + + # Visit a BlockParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#541 + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#569 + def visit_block_parameters_node(node); end + + # Visit a BreakNode node. + # + # source://prism//lib/prism/dot_visitor.rb#612 + def visit_break_node(node); end + + # Visit a CallAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#635 + def visit_call_and_write_node(node); end + + # Visit a CallNode node. + # + # source://prism//lib/prism/dot_visitor.rb#681 + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#739 + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#788 + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#834 + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#864 + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node. + # + # source://prism//lib/prism/dot_visitor.rb#889 + def visit_case_match_node(node); end + + # Visit a CaseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#934 + def visit_case_node(node); end + + # Visit a ClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#979 + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1026 + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1053 + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1083 + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1110 + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1127 + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1144 + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1171 + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1198 + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1228 + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1255 + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1280 + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1307 + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node. + # + # 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#1360 + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node. + # + # 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#1412 + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node. + # + # 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#1446 + def visit_constant_write_node(node); end + + # Visit a DefNode node. + # + # 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#1542 + def visit_defined_node(node); end + + # Visit a ElseNode node. + # + # 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#1601 + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node. + # + # 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#1648 + def visit_ensure_node(node); end + + # Visit a FalseNode node. + # + # 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#1688 + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node. + # + # 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#1771 + def visit_float_node(node); end + + # Visit a ForNode node. + # + # 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#1830 + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node. + # + # 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#1858 + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node. + # + # 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#1905 + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node. + # + # 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#1962 + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node. + # + # 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#1996 + def visit_global_variable_write_node(node); end + + # Visit a HashNode node. + # + # 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#2056 + def visit_hash_pattern_node(node); end + + # Visit a IfNode node. + # + # 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#2150 + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node. + # + # 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#2186 + def visit_implicit_rest_node(node); end + + # Visit a InNode node. + # + # 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#2232 + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node. + # + # 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#2341 + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node. + # + # 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#2433 + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node. + # + # 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#2490 + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node. + # + # 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#2534 + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node. + # + # 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#2578 + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node. + # + # 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#2634 + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node. + # + # 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#2710 + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node. + # + # 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#2794 + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node. + # + # 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#2852 + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node. + # + # 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#2920 + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node. + # + # 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#2983 + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node. + # + # 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#3023 + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node. + # + # 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#3082 + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node. + # + # 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#3132 + def visit_match_write_node(node); end + + # Visit a MissingNode node. + # + # 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#3177 + def visit_module_node(node); end + + # Visit a MultiTargetNode node. + # + # 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#3269 + def visit_multi_write_node(node); end + + # Visit a NextNode node. + # + # 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#3355 + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node. + # + # 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#3389 + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node. + # + # 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#3423 + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node. + # + # 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#3480 + def visit_or_node(node); end + + # Visit a ParametersNode node. + # + # 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#3589 + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node. + # + # 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#3642 + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node. + # + # 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#3692 + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node. + # + # 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#3742 + def visit_range_node(node); end + + # Visit a RationalNode node. + # + # 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#3792 + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node. + # + # 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#3835 + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node. + # + # 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#3878 + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node. + # + # 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#3956 + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node. + # + # 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#3998 + def visit_return_node(node); end + + # Visit a SelfNode node. + # + # 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#4056 + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node. + # + # 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#4106 + def visit_source_file_node(node); end + + # Visit a SourceLineNode node. + # + # 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#4140 + def visit_splat_node(node); end + + # Visit a StatementsNode node. + # + # 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#4190 + def visit_string_node(node); end + + # Visit a SuperNode node. + # + # 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#4262 + def visit_symbol_node(node); end + + # Visit a TrueNode node. + # + # 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#4311 + def visit_undef_node(node); end + + # Visit a UnlessNode node. + # + # 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#4384 + def visit_until_node(node); end + + # Visit a WhenNode node. + # + # 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#4460 + def visit_while_node(node); end + + # Visit a XStringNode node. + # + # 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#4524 + def visit_yield_node(node); end + + private + + # Inspect a node that has arguments_node_flags flags to display the flags as a + # comma-separated list. + # + # source://prism//lib/prism/dot_visitor.rb#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#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#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#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#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#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#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#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#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#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#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#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#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#4697 + def symbol_flags_inspect(node); end +end + +# source://prism//lib/prism/dot_visitor.rb#59 +class Prism::DotVisitor::Digraph + # @return [Digraph] a new instance of Digraph + # + # source://prism//lib/prism/dot_visitor.rb#62 + def initialize; end + + # source://prism//lib/prism/dot_visitor.rb#76 + def edge(value); end + + # Returns the value of attribute edges. + # + # source://prism//lib/prism/dot_visitor.rb#60 + def edges; end + + # source://prism//lib/prism/dot_visitor.rb#68 + def node(value); end + + # Returns the value of attribute nodes. + # + # source://prism//lib/prism/dot_visitor.rb#60 + def nodes; end + + # source://prism//lib/prism/dot_visitor.rb#80 + def to_dot; end + + # source://prism//lib/prism/dot_visitor.rb#72 + def waypoint(value); end + + # Returns the value of attribute waypoints. + # + # source://prism//lib/prism/dot_visitor.rb#60 + def waypoints; end +end + +# source://prism//lib/prism/dot_visitor.rb#15 +class Prism::DotVisitor::Field + # @return [Field] a new instance of Field + # + # source://prism//lib/prism/dot_visitor.rb#18 + def initialize(name, value, port); end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#16 + def name; end + + # Returns the value of attribute port. + # + # source://prism//lib/prism/dot_visitor.rb#16 + def port; end + + # source://prism//lib/prism/dot_visitor.rb#24 + def to_dot; end + + # Returns the value of attribute value. + # + # source://prism//lib/prism/dot_visitor.rb#16 + def value; end +end + +# source://prism//lib/prism/dot_visitor.rb#33 +class Prism::DotVisitor::Table + # @return [Table] a new instance of Table + # + # source://prism//lib/prism/dot_visitor.rb#36 + def initialize(name); end + + # source://prism//lib/prism/dot_visitor.rb#41 + def field(name, value = T.unsafe(nil), port: T.unsafe(nil)); end + + # Returns the value of attribute fields. + # + # source://prism//lib/prism/dot_visitor.rb#34 + def fields; end + + # Returns the value of attribute name. + # + # source://prism//lib/prism/dot_visitor.rb#34 + def name; end + + # source://prism//lib/prism/dot_visitor.rb#45 + def to_dot; end +end + +# Represents an `else` clause in a `case`, `if`, or `unless` statement. +# +# if a then b else c end +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#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#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#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#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#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#6615 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?, ?location: Location) -> ElseNode + # + # 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#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#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#6663 + sig { returns(String) } + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # 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#6668 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # 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#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#6647 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6700 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6710 + def type; end + end +end + +# EmbDocComment objects correspond to comments that are surrounded by =begin +# and =end. +# +# 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#332 + sig { returns(String) } + def inspect; end + + # This can only be true for inline comments. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#327 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# 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#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#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#6745 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#6797 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#6750 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location, ?location: Location) -> EmbeddedStatementsNode + # + # 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#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#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#6802 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#6792 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # 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#6782 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6829 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6839 + def type; end + end +end + +# Represents an interpolated variable. +# +# "foo #@bar" +# ^^^^^ +# +# source://prism//lib/prism/node.rb#6857 +class Prism::EmbeddedVariableNode < ::Prism::Node + # def initialize: (Location operator_loc, Prism::node variable, Location location) -> void + # + # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode + # + # 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#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#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#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#6878 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?operator_loc: Location, ?variable: Prism::node, ?location: Location) -> EmbeddedVariableNode + # + # 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#6873 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Prism::node, location: Location } + # + # 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#6916 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6911 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6901 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6938 + sig { override.returns(Symbol) } + def type; end + + # attr_reader variable: Prism::node + # + # source://prism//lib/prism/node.rb#6908 + sig { returns(Prism::Node) } + def variable; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#6948 + def type; end + end +end + +# Flags for nodes that have unescaped content. +# +# source://prism//lib/prism/node.rb#20364 +module Prism::EncodingFlags; end + +# internal bytes forced the encoding to binary +# +# 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#20366 +Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents an `ensure` clause in a `begin` statement. +# +# begin +# foo +# ensure +# ^^^^^^ +# bar +# end +# +# source://prism//lib/prism/node.rb#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#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#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#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#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#6991 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location, ?location: Location) -> EnsureNode + # + # 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#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#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#7038 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # 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#7033 + sig { returns(String) } + def ensure_keyword; end + + # attr_reader ensure_keyword_loc: Location + # + # 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#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#7023 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7070 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7080 + def type; end + end +end + +# Represents the use of the literal `false` keyword. +# +# false +# ^^^^^ +# +# 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#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#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#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#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#7117 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> FalseNode + # + # 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#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#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#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 + # 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#7159 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7169 + def type; end + end +end + +# Represents a find pattern in pattern matching. +# +# foo in *bar, baz, *qux +# ^^^^^^^^^^^^^^^ +# +# foo in [*bar, baz, *qux] +# ^^^^^^^^^^^^^^^^^ +# +# foo in Foo(*bar, baz, *qux) +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7190 +class Prism::FindPatternNode < ::Prism::Node + # 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#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#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#7210 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # 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#7268 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # 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#7215 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: Prism::node? + # + # source://prism//lib/prism/node.rb#7243 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # 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#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#7210 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#7291 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Prism::node + # + # source://prism//lib/prism/node.rb#7246 + sig { returns(Prism::Node) } + def left; end + + # def opening: () -> String? + # + # 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#7255 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader requireds: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#7249 + sig { returns(T::Array[Prism::Node]) } + def requireds; end + + # attr_reader right: Prism::node + # + # source://prism//lib/prism/node.rb#7252 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7323 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7333 + def type; end + end +end + +# Represents the use of the `..` or `...` operators to create flip flops. +# +# baz if foo .. bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7355 +class Prism::FlipFlopNode < ::Prism::Node + # 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#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#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#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#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#7378 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> FlipFlopNode + # + # 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#7373 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#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#7431 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader left: Prism::node? + # + # 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#7426 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7414 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader right: Prism::node? + # + # source://prism//lib/prism/node.rb#7411 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7465 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#7404 + 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#7475 + def type; end + end +end + +# Represents a floating point number literal. +# +# 1.0 +# ^^^ +# +# source://prism//lib/prism/node.rb#7494 +class Prism::FloatNode < ::Prism::Node + # def initialize: (Float value, Location location) -> void + # + # @return [FloatNode] a new instance of FloatNode + # + # 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#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#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#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#7514 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Float, ?location: Location) -> FloatNode + # + # 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#7509 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Float, location: Location } + # + # 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#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 + # 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#7560 + sig { override.returns(Symbol) } + def type; end + + # The value of the floating point number as a Float. + # + # source://prism//lib/prism/node.rb#7537 + sig { returns(Float) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7570 + def type; end + end +end + +# Represents the use of the `for` keyword. +# +# for i in a end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7586 +class Prism::ForNode < ::Prism::Node + # 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#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#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#7607 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # attr_reader collection: Prism::node + # + # 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#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#7612 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#7607 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#7692 + sig { returns(T.nilable(String)) } + def do_keyword; end + + # attr_reader do_keyword_loc: Location? + # + # 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#7697 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # 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#7682 + sig { returns(String) } + def for_keyword; end + + # attr_reader for_keyword_loc: Location + # + # 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#7687 + sig { returns(String) } + def in_keyword; end + + # attr_reader in_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#7655 + sig { returns(Prism::Location) } + def in_keyword_loc; end + + # attr_reader index: Prism::node + # + # 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#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#7645 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7735 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7745 + def type; end + end +end + +# Represents forwarding all arguments to this method to another method. +# +# def foo(...) +# bar(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#7769 +class Prism::ForwardingArgumentsNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode + # + # 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#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#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#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#7788 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ForwardingArgumentsNode + # + # 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#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#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#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 + # 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#7830 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7840 + def type; end + end +end + +# Represents the use of the forwarding parameter in a method, block, or lambda declaration. +# +# def foo(...) +# ^^^ +# end +# +# source://prism//lib/prism/node.rb#7856 +class Prism::ForwardingParameterNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # + # 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#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#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#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#7875 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ForwardingParameterNode + # + # 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#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#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#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 + # 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#7917 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#7927 + def type; end + end +end + +# Represents the use of the `super` keyword without parentheses or arguments. +# +# super +# ^^^^^ +# +# 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#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#7952 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader block: BlockNode? + # + # 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#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#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#7962 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?block: BlockNode?, ?location: Location) -> ForwardingSuperNode + # + # 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#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#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#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 + # 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#8015 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8025 + def type; end + end +end + +# Represents the use of the `&&=` operator for assignment to a global variable. +# +# $target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8041 +class Prism::GlobalVariableAndWriteNode < ::Prism::Node + # 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#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#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#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#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#8064 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableAndWriteNode + # + # 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#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: Prism::node, location: Location } + # + # 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#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#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#8087 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8090 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8107 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8097 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8136 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8104 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8146 + def type; end + end +end + +# Represents assigning to a global variable using an operator that isn't `=`. +# +# $target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8165 +class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node + # 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#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#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#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#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#8189 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> GlobalVariableOperatorWriteNode + # + # 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#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: Prism::node, operator: Symbol, location: Location } + # + # 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#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#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#8212 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # 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#8232 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8222 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8260 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8229 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8270 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a global variable. +# +# $target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8290 +class Prism::GlobalVariableOrWriteNode < ::Prism::Node + # 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#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#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#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#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#8313 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableOrWriteNode + # + # 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#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: Prism::node, location: Location } + # + # 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#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#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#8336 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#8339 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8356 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8346 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8385 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#8353 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8395 + def type; end + end +end + +# Represents referencing a global variable. +# +# $foo +# ^^^^ +# +# 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#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#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#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#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#8434 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableReadNode + # + # 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#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#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#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. + # + # $foo # name `:$foo` + # + # $_Test # name `:$_Test` + # + # source://prism//lib/prism/node.rb#8461 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8484 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8494 + def type; end + end +end + +# Represents writing to a global variable in a context that doesn't have an explicit value. +# +# $foo, $bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#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#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#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#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#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#8530 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableTargetNode + # + # 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#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#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#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#8553 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8576 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8586 + def type; end + end +end + +# Represents writing to a global variable. +# +# $foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8602 +class Prism::GlobalVariableWriteNode < ::Prism::Node + # 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#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#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#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#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#8625 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> GlobalVariableWriteNode + # + # 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#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: Prism::node, operator_loc: Location, location: Location } + # + # 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#8689 + 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. + # + # $foo = :bar # name `:$foo` + # + # $_Test = 123 # name `:$_Test` + # + # source://prism//lib/prism/node.rb#8652 + sig { returns(Symbol) } + def name; end + + # The location of the global variable's name. + # + # $foo = :bar + # ^^^^ + # + # source://prism//lib/prism/node.rb#8658 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8684 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # $foo = :bar + # ^ + # + # source://prism//lib/prism/node.rb#8677 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8713 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the global variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # $foo = :bar + # ^^^^ + # + # $-xyz = 123 + # ^^^ + # + # source://prism//lib/prism/node.rb#8671 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8723 + def type; end + end +end + +# Represents a hash literal. +# +# { a => b } +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8742 +class Prism::HashNode < ::Prism::Node + # 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#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#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#8759 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8821 + sig { returns(String) } + def closing; end + + # The location of the closing brace. + # + # { a => b } + # ^ + # + # 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#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#8764 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location, ?location: Location) -> HashNode + # + # 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#8759 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location, location: Location } + # + # 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. + # + # { a: b } + # ^^^^ + # + # { **foo } + # ^^^^^ + # + # 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#8826 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8816 + sig { returns(String) } + def opening; end + + # The location of the opening brace. + # + # { a => b } + # ^ + # + # source://prism//lib/prism/node.rb#8790 + sig { returns(Prism::Location) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8848 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8858 + def type; end + end +end + +# Represents a hash pattern in pattern matching. +# +# foo => { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ +# +# foo => { a: 1, b: 2, **c } +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#8880 +class Prism::HashPatternNode < ::Prism::Node + # 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#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#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#8899 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # 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#8953 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # 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#8904 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant: Prism::node? + # + # source://prism//lib/prism/node.rb#8931 + sig { returns(T.nilable(Prism::Node)) } + def constant; end + + # 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#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#8899 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#8926 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader elements: Array[AssocNode] + # + # source://prism//lib/prism/node.rb#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#8976 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # 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#8940 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil + # + # 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 + # 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#9010 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9020 + def type; end + end +end + +# source://prism//lib/prism/node_ext.rb#35 +module Prism::HeredocQuery + # Returns true if this node was represented as a heredoc in the source code. + # + # @return [Boolean] + # + # source://prism//lib/prism/node_ext.rb#37 + def heredoc?; end +end + +# Represents the use of the `if` keyword, either in the block form or the modifier form, or a ternary expression. +# +# bar if foo +# ^^^^^^^^^^ +# +# if foo then bar end +# ^^^^^^^^^^^^^^^^^^^ +# +# foo ? bar : baz +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9047 +class Prism::IfNode < ::Prism::Node + # 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#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#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#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#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#9076 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. + # + # if foo + # bar + # elsif baz + # ^^^^^^^^^ + # qux + # ^^^ + # end + # ^^^ + # + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#9176 + sig { returns(T.nilable(Prism::Node)) } + def consequent; end + + # 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#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#9071 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#9207 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword if present, `nil` otherwise. + # + # if foo + # bar + # end + # ^^^ + # + # source://prism//lib/prism/node.rb#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#9197 + sig { returns(T.nilable(String)) } + def if_keyword; end + + # The location of the `if` keyword if present. + # + # bar if foo + # ^^ + # + # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. + # + # source://prism//lib/prism/node.rb#9108 + sig { returns(T.nilable(Prism::Location)) } + def if_keyword_loc; end + + # def inspect(NodeInspector inspector) -> String + # + # source://prism//lib/prism/node.rb#9212 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # The node for the condition the `IfNode` is testing. + # + # if foo + # ^^^ + # bar + # end + # + # bar if foo + # ^^^ + # + # foo ? bar : baz + # ^^^ + # + # source://prism//lib/prism/node.rb#9132 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#9066 + def set_newline_flag(newline_marked); end + + # Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. + # + # if foo + # bar + # ^^^ + # baz + # ^^^ + # end + # + # source://prism//lib/prism/node.rb#9161 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#9202 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword (if present) or the `?` in a ternary expression, `nil` otherwise. + # + # if foo then bar end + # ^^^^ + # + # a ? b : c + # ^ + # + # source://prism//lib/prism/node.rb#9141 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9248 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9258 + def type; end + end +end + +# Represents an imaginary number literal. +# +# 1.0i +# ^^^^ +# +# source://prism//lib/prism/node.rb#9279 +class Prism::ImaginaryNode < ::Prism::Node + # def initialize: (FloatNode | IntegerNode | RationalNode numeric, Location location) -> void + # + # @return [ImaginaryNode] a new instance of ImaginaryNode + # + # 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#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#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#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#9299 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?numeric: FloatNode | IntegerNode | RationalNode, ?location: Location) -> ImaginaryNode + # + # 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#9294 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: FloatNode | IntegerNode | RationalNode, location: Location } + # + # 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#9325 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader numeric: FloatNode | IntegerNode | RationalNode + # + # 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 + # 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#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#87 + sig { returns(Complex) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9356 + def type; end + end +end + +# Represents a node that is implicitly being added to the tree but doesn't correspond directly to a node in the source. +# +# { foo: } +# ^^^^ +# +# { Foo: } +# ^^^^ +# +# foo in { bar: } +# ^^^^ +# +# source://prism//lib/prism/node.rb#9378 +class Prism::ImplicitNode < ::Prism::Node + # def initialize: (Prism::node value, Location location) -> void + # + # @return [ImplicitNode] a new instance of ImplicitNode + # + # 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#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#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#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#9398 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node, ?location: Location) -> ImplicitNode + # + # 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#9393 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, location: Location } + # + # 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#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 + # 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#9445 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#9421 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9455 + def type; end + end +end + +# Represents using a trailing comma to indicate an implicit rest parameter. +# +# foo { |bar,| } +# ^ +# +# foo in [bar,] +# ^ +# +# for foo, in bar do end +# ^ +# +# foo, = bar +# ^ +# +# source://prism//lib/prism/node.rb#9480 +class Prism::ImplicitRestNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ImplicitRestNode] a new instance of ImplicitRestNode + # + # 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#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#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#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#9499 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ImplicitRestNode + # + # 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#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#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#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 + # 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#9541 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9551 + def type; end + end +end + +# Represents the use of the `in` keyword in a case statement. +# +# case a; in b then c end +# ^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9566 +class Prism::InNode < ::Prism::Node + # 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#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#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#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#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#9589 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?, ?location: Location) -> InNode + # + # 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#9584 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#9641 + sig { returns(String) } + def in; end + + # attr_reader in_loc: Location + # + # 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#9651 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#9615 + sig { returns(Prism::Node) } + def pattern; end + + # attr_reader statements: StatementsNode? + # + # 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#9646 + sig { returns(T.nilable(String)) } + def then; end + + # attr_reader then_loc: Location? + # + # source://prism//lib/prism/node.rb#9628 + sig { returns(T.nilable(Prism::Location)) } + def then_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9680 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9690 + def type; end + end +end + +# Represents the use of the `&&=` operator on a call to the `[]` method. +# +# foo.bar[baz] &&= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9709 +class Prism::IndexAndWriteNode < ::Prism::Node + # 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#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#9727 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#9792 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9825 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Prism::node? + # + # 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#9835 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # 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#9732 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#9845 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#9737 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#9732 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#9830 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # 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#9840 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#9785 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#9850 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#9805 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#9769 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9815 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#9900 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#9812 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#9820 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9765 + 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#9910 + def type; end + end +end + +# Represents the use of an assignment operator on a call to `[]`. +# +# foo.bar[baz] += value +# ^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#9934 +class Prism::IndexOperatorWriteNode < ::Prism::Node + # 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#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#9953 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#10018 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10054 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Prism::node? + # + # 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#10064 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # 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#9958 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10074 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#9963 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#9958 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#10059 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # 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#10069 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # 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#10031 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10034 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#9995 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10044 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10125 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10041 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10049 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#9991 + 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#10135 + def type; end + end +end + +# Represents the use of the `||=` operator on a call to `[]`. +# +# foo.bar[baz] ||= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10160 +class Prism::IndexOrWriteNode < ::Prism::Node + # 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#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#10178 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#10243 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10276 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Prism::node? + # + # 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#10286 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # 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#10183 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10296 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#10188 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#10183 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#10281 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # 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#10291 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10236 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10301 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10256 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Prism::node? + # + # source://prism//lib/prism/node.rb#10220 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10266 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10351 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10263 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10271 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#10216 + 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#10361 + def type; end + end +end + +# Represents assigning to an index. +# +# foo[bar], = 1 +# ^^^^^^^^ +# +# begin +# rescue => foo[bar] +# ^^^^^^^^ +# end +# +# for foo[bar] in baz do end +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10393 +class Prism::IndexTargetNode < ::Prism::Node + # 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#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#10408 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#10459 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # def attribute_write?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10482 + sig { returns(T::Boolean) } + def attribute_write?; end + + # attr_reader block: Prism::node? + # + # 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#10413 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#10497 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#10418 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#10413 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#10487 + sig { returns(T::Boolean) } + def ignore_visibility?; end + + # def inspect(NodeInspector inspector) -> String + # + # 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#10492 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#10452 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader receiver: Prism::node + # + # source://prism//lib/prism/node.rb#10449 + sig { returns(Prism::Node) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10472 + sig { returns(T::Boolean) } + def safe_navigation?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10539 + sig { override.returns(Symbol) } + def type; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#10477 + sig { returns(T::Boolean) } + def variable_call?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#10445 + 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#10549 + def type; end + end +end + +# InlineComment objects are the most common. They correspond to comments in +# the source file like this one that start with #. +# +# source://prism//lib/prism/parse_result.rb#310 +class Prism::InlineComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # 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 + # false if the comment is by itself. + # + # @return [Boolean] + # + # source://prism//lib/prism/parse_result.rb#313 + sig { override.returns(T::Boolean) } + def trailing?; end +end + +# Represents the use of the `&&=` operator for assignment to an instance variable. +# +# @target &&= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10570 +class Prism::InstanceVariableAndWriteNode < ::Prism::Node + # 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#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#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#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#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#10593 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableAndWriteNode + # + # 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#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: Prism::node, location: Location } + # + # 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#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#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#10616 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10619 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10636 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10626 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10665 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10633 + sig { returns(Prism::Node) } + def value; end + + class << self + # 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#10675 + def type; end + end +end + +# Represents assigning to an instance variable using an operator that isn't `=`. +# +# @target += value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10694 +class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node + # 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#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#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#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#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#10718 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?operator: Symbol, ?location: Location) -> InstanceVariableOperatorWriteNode + # + # 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#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: Prism::node, operator: Symbol, location: Location } + # + # 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#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#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#10741 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # 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#10761 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10751 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10789 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10758 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10799 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to an instance variable. +# +# @target ||= value +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#10819 +class Prism::InstanceVariableOrWriteNode < ::Prism::Node + # 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#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#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#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#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#10842 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableOrWriteNode + # + # 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#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: Prism::node, location: Location } + # + # 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#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#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#10865 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#10868 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#10885 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#10875 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10914 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#10882 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#10924 + def type; end + end +end + +# Represents referencing an instance variable. +# +# @foo +# ^^^^ +# +# 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#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#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#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#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#10963 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableReadNode + # + # 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#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#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#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). + # + # @x # name `:@x` + # + # @_test # name `:@_test` + # + # source://prism//lib/prism/node.rb#10990 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11013 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11023 + def type; end + end +end + +# Represents writing to an instance variable in a context that doesn't have an explicit value. +# +# @foo, @bar = baz +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#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#11041 + 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#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#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#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#11059 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableTargetNode + # + # 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#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#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#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#11082 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11105 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11115 + def type; end + end +end + +# Represents writing to an instance variable. +# +# @foo = 1 +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11131 +class Prism::InstanceVariableWriteNode < ::Prism::Node + # 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#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#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#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#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#11154 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> InstanceVariableWriteNode + # + # 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#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: Prism::node, operator_loc: Location, location: Location } + # + # 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#11218 + 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). + # + # @x = :y # name `:@x` + # + # @_foo = "bar" # name `@_foo` + # + # source://prism//lib/prism/node.rb#11181 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # @_x = 1 + # ^^^ + # + # source://prism//lib/prism/node.rb#11187 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#11213 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # @x = y + # ^ + # + # source://prism//lib/prism/node.rb#11206 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11242 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the instance variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # @foo = :bar + # ^^^^ + # + # @_x = 1234 + # ^^^^ + # + # source://prism//lib/prism/node.rb#11200 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11252 + def type; end + end +end + +# Flags for integer nodes that correspond to the base of the integer. +# +# source://prism//lib/prism/node.rb#20373 +module Prism::IntegerBaseFlags; end + +# 0b prefix +# +# 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#20378 +Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) + +# 0x prefix +# +# 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#20381 +Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) + +# Represents an integer number literal. +# +# 1 +# ^ +# +# source://prism//lib/prism/node.rb#11271 +class Prism::IntegerNode < ::Prism::Node + # def initialize: (Integer flags, Integer value, Location location) -> void + # + # @return [IntegerNode] a new instance of IntegerNode + # + # 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#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#11322 + sig { returns(T::Boolean) } + def binary?; end + + # def child_nodes: () -> Array[nil | 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#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#11292 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?value: Integer, ?location: Location) -> IntegerNode + # + # 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#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#11287 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, value: Integer, location: Location } + # + # 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#11337 + sig { returns(T::Boolean) } + def hexadecimal?; end + + # def inspect(NodeInspector inspector) -> String + # + # 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#11332 + sig { returns(T::Boolean) } + def octal?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#11364 + sig { override.returns(Symbol) } + def type; end + + # The value of the integer literal as a number. + # + # source://prism//lib/prism/node.rb#11319 + sig { returns(Integer) } + def value; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#11315 + 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#11374 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation that is being used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo #{bar} baz/ then end +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11391 +class Prism::InterpolatedMatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # 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#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#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#11488 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | 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#11523 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#11419 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedMatchLastLineNode + # + # 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#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[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # + # 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#11483 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # 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#11508 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11513 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11503 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # 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#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#11473 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11478 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11518 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11446 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#11453 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # 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 + # 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#11552 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11498 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11493 + sig { returns(T::Boolean) } + def windows_31j?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#11442 + 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#11562 + def type; end + end +end + +# Represents a regular expression literal that contains interpolation. +# +# /foo #{bar} baz/ +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11582 +class Prism::InterpolatedRegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # 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#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#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#11679 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | 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#11714 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#11610 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedRegularExpressionNode + # + # 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#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[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # + # 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#11674 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # 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#11699 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11704 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11694 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # 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#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#11664 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11669 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#11709 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#11637 + sig { returns(Prism::Location) } + def opening_loc; end + + sig { returns(Integer) } + def options; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # source://prism//lib/prism/node.rb#11644 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } + def parts; end + + # 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 + # 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#11743 + sig { override.returns(Symbol) } + def type; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11689 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#11684 + sig { returns(T::Boolean) } + def windows_31j?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#11633 + 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#11753 + def type; end + end +end + +# Represents a string literal that contains interpolation. +# +# "foo #{bar} baz" +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#11773 +class Prism::InterpolatedStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # 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#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#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#11796 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # 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#11844 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # 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#11801 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#11796 + 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[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location?, location: Location } + # + # 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#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#11867 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#11828 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] + # + # 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#11790 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#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. + # 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#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#11931 +class Prism::InterpolatedSymbolNode < ::Prism::Node + # 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#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#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#11953 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # 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#11997 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # 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#11958 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedSymbolNode + # + # 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#11953 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#12020 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # 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#11981 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # 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#11947 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12042 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12052 + def type; end + end +end + +# Represents an xstring literal that contains interpolation. +# +# `foo #{bar} baz` +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12071 +class Prism::InterpolatedXStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # 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#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#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#12093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#12143 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#12098 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedXStringNode + # + # 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#12093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#12148 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#12138 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#12121 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] + # + # 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#12087 + def set_newline_flag(newline_marked); end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12170 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12180 + def type; end + end +end + +# Represents an implicit set of parameters through the use of the `it` keyword within a block or lambda. +# +# -> { it + it } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12199 +class Prism::ItParametersNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [ItParametersNode] a new instance of ItParametersNode + # + # 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#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#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#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#12218 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> ItParametersNode + # + # 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#12213 + 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#12236 + 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#12241 + 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 + # 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#12260 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12270 + def type; end + end +end + +# Represents a hash literal without opening and closing braces. +# +# foo(a: b) +# ^^^^ +# +# source://prism//lib/prism/node.rb#12285 +class Prism::KeywordHashNode < ::Prism::Node + # def initialize: (Integer flags, Array[AssocNode | AssocSplatNode] elements, Location location) -> void + # + # @return [KeywordHashNode] a new instance of KeywordHashNode + # + # 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#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#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#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#12306 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode], ?location: Location) -> KeywordHashNode + # + # 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#12301 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[AssocNode | AssocSplatNode], location: Location } + # + # 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( + 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#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#12442 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # 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#12470 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12458 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#12465 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12503 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#12438 + 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#12513 + def type; end + end +end + +# Represents using a lambda literal (not the lambda method call). +# +# ->(value) { value * 2 } +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# 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, Prism::node? parameters, Prism::node? body, Location location) -> void + # + # @return [LambdaNode] a new instance of LambdaNode + # + # 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#12547 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # 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#12552 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#12623 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#12557 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#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: Prism::node?, body: Prism::node?, location: Location } + # + # 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#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#12583 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#12618 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#12593 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12613 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12586 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader parameters: Prism::node? + # + # source://prism//lib/prism/node.rb#12607 + sig { returns(T.nilable(Prism::Node)) } + def parameters; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12663 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12673 + def type; end + end +end + +# This class is responsible for lexing the source using prism and then +# converting those tokens to be compatible with Ripper. In the vast majority +# of cases, this is a one-to-one mapping of the token type. Everything else +# generally lines up. However, there are a few cases that require special +# handling. +# +# source://prism//lib/prism/lex_compat.rb#12 +class Prism::LexCompat + # @return [LexCompat] a new instance of LexCompat + # + # source://prism//lib/prism/lex_compat.rb#619 + def initialize(source, **options); end + + # Returns the value of attribute options. + # + # source://prism//lib/prism/lex_compat.rb#617 + def options; end + + # source://prism//lib/prism/lex_compat.rb#624 + def result; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/lex_compat.rb#617 + def source; end +end + +# Ripper doesn't include the rest of the token in the event, so we need to +# trim it down to just the content on the first line when comparing. +# +# source://prism//lib/prism/lex_compat.rb#230 +class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#231 + def ==(other); end +end + +# A heredoc in this case is a list of tokens that belong to the body of the +# heredoc that should be appended onto the list of tokens when the heredoc +# closes. +# +# source://prism//lib/prism/lex_compat.rb#291 +module Prism::LexCompat::Heredoc + class << self + # Here we will split between the two types of heredocs and return the + # object that will store their tokens. + # + # source://prism//lib/prism/lex_compat.rb#603 + def build(opening); end + end +end + +# Dash heredocs are a little more complicated. They are a list of tokens +# that need to be split on "\\\n" to mimic Ripper's behavior. We also need +# to keep track of the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#315 +class Prism::LexCompat::Heredoc::DashHeredoc + # @return [DashHeredoc] a new instance of DashHeredoc + # + # source://prism//lib/prism/lex_compat.rb#318 + def initialize(split); end + + # source://prism//lib/prism/lex_compat.rb#323 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#316 + def split; end + + # source://prism//lib/prism/lex_compat.rb#327 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#316 + def tokens; end +end + +# Heredocs that are dedenting heredocs are a little more complicated. +# Ripper outputs on_ignored_sp tokens for the whitespace that is being +# removed from the output. prism only modifies the node itself and keeps +# the token the same. This simplifies prism, but makes comparing against +# Ripper much harder because there is a length mismatch. +# +# Fortunately, we already have to pull out the heredoc tokens in order to +# insert them into the stream in the correct order. As such, we can do +# some extra manipulation on the tokens to make them match Ripper's +# output by mirroring the dedent logic that Ripper uses. +# +# source://prism//lib/prism/lex_compat.rb#374 +class Prism::LexCompat::Heredoc::DedentingHeredoc + # @return [DedentingHeredoc] a new instance of DedentingHeredoc + # + # source://prism//lib/prism/lex_compat.rb#379 + def initialize; end + + # As tokens are coming in, we track the minimum amount of common leading + # whitespace on plain string content tokens. This allows us to later + # remove that amount of whitespace from the beginning of each line. + # + # source://prism//lib/prism/lex_compat.rb#390 + def <<(token); end + + # Returns the value of attribute dedent. + # + # source://prism//lib/prism/lex_compat.rb#377 + def dedent; end + + # Returns the value of attribute dedent_next. + # + # source://prism//lib/prism/lex_compat.rb#377 + def dedent_next; end + + # Returns the value of attribute embexpr_balance. + # + # source://prism//lib/prism/lex_compat.rb#377 + def embexpr_balance; end + + # source://prism//lib/prism/lex_compat.rb#427 + def to_a; end + + # Returns the value of attribute tokens. + # + # source://prism//lib/prism/lex_compat.rb#377 + def tokens; end +end + +# source://prism//lib/prism/lex_compat.rb#375 +Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), Integer) + +# Heredocs that are no dash or tilde heredocs are just a list of tokens. +# We need to keep them around so that we can insert them in the correct +# order back into the token stream and set the state of the last token to +# the state that the heredoc was opened in. +# +# source://prism//lib/prism/lex_compat.rb#296 +class Prism::LexCompat::Heredoc::PlainHeredoc + # @return [PlainHeredoc] a new instance of PlainHeredoc + # + # source://prism//lib/prism/lex_compat.rb#299 + def initialize; end + + # source://prism//lib/prism/lex_compat.rb#303 + def <<(token); end + + # source://prism//lib/prism/lex_compat.rb#307 + def to_a; end + + # source://prism//lib/prism/lex_compat.rb#297 + def tokens; end +end + +# Ident tokens for the most part are exactly the same, except sometimes we +# know an ident is a local when ripper doesn't (when they are introduced +# through named captures in regular expressions). In that case we don't +# compare the state. +# +# source://prism//lib/prism/lex_compat.rb#248 +class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#249 + def ==(other); end +end + +# Tokens where state should be ignored +# used for :on_comment, :on_heredoc_end, :on_embexpr_end +# +# source://prism//lib/prism/lex_compat.rb#238 +class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#239 + def ==(other); end +end + +# Ignored newlines can occasionally have a LABEL state attached to them, so +# we compare the state differently here. +# +# source://prism//lib/prism/lex_compat.rb#259 +class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#260 + def ==(other); end +end + +# If we have an identifier that follows a method name like: +# +# def foo bar +# +# then Ripper will mark bar as END|LABEL if there is a local in a parent +# scope named bar because it hasn't pushed the local table yet. We do this +# more accurately, so we need to allow comparing against both END and +# END|LABEL. +# +# source://prism//lib/prism/lex_compat.rb#279 +class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token + # source://prism//lib/prism/lex_compat.rb#280 + def ==(other); end +end + +# This is a mapping of prism token types to Ripper token types. This is a +# many-to-one mapping because we split up our token types, whereas Ripper +# tends to group them. +# +# source://prism//lib/prism/lex_compat.rb#33 +Prism::LexCompat::RIPPER = T.let(T.unsafe(nil), Hash) + +# A result class specialized for holding tokens produced by the lexer. +# +# source://prism//lib/prism/lex_compat.rb#14 +class Prism::LexCompat::Result < ::Prism::Result + # Create a new lex compat result object with the given values. + # + # @return [Result] a new instance of Result + # + # source://prism//lib/prism/lex_compat.rb#19 + def initialize(value, comments, magic_comments, data_loc, errors, warnings, source); end + + # Implement the hash pattern matching interface for Result. + # + # source://prism//lib/prism/lex_compat.rb#25 + def deconstruct_keys(keys); end + + # The list of tokens that were produced by the lexer. + # + # source://prism//lib/prism/lex_compat.rb#16 + def value; end +end + +# When we produce tokens, we produce the same arrays that Ripper does. +# However, we add a couple of convenience methods onto them to make them a +# little easier to work with. We delegate all other methods to the array. +# +# source://prism//lib/prism/lex_compat.rb#204 +class Prism::LexCompat::Token < ::SimpleDelegator + # The type of the token. + # + # source://prism//lib/prism/lex_compat.rb#213 + def event; end + + # The location of the token in the source. + # + # source://prism//lib/prism/lex_compat.rb#208 + def location; end + + # The state of the lexer when this token was produced. + # + # source://prism//lib/prism/lex_compat.rb#223 + def state; end + + # The slice of the source that this token represents. + # + # source://prism//lib/prism/lex_compat.rb#218 + def value; end +end + +# This is a result specific to the `lex` and `lex_file` methods. +# +# source://prism//lib/prism/parse_result.rb#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#872 +class Prism::LexRipper + # @return [LexRipper] a new instance of LexRipper + # + # source://prism//lib/prism/lex_compat.rb#875 + def initialize(source); end + + # source://prism//lib/prism/lex_compat.rb#879 + def result; end + + # source://prism//lib/prism/lex_compat.rb#873 + def source; end + + private + + # source://prism//lib/prism/lex_compat.rb#913 + def lex(source); end +end + +# Represents the use of the `&&=` operator for assignment to a local variable. +# +# target &&= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12695 +class Prism::LocalVariableAndWriteNode < ::Prism::Node + # 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#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#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#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#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#12719 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableAndWriteNode + # + # 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#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: Prism::node, name: Symbol, depth: Integer, location: Location } + # + # 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#12762 + sig { returns(Integer) } + def depth; end + + # 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#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#12759 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12742 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#12765 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12749 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12795 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12756 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12805 + def type; end + end +end + +# Represents assigning to a local variable using an operator that isn't `=`. +# +# target += value +# ^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12825 +class Prism::LocalVariableOperatorWriteNode < ::Prism::Node + # 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#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#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#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#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#12850 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#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: Prism::node, name: Symbol, operator: Symbol, depth: Integer, location: Location } + # + # 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#12896 + sig { returns(Integer) } + def depth; end + + # 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#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#12890 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # 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#12893 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#12880 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12925 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#12887 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#12935 + def type; end + end +end + +# Represents the use of the `||=` operator for assignment to a local variable. +# +# target ||= value +# ^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#12956 +class Prism::LocalVariableOrWriteNode < ::Prism::Node + # 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#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#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#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#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#12980 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOrWriteNode + # + # 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#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: Prism::node, name: Symbol, depth: Integer, location: Location } + # + # 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#13023 + sig { returns(Integer) } + def depth; end + + # 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#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#13020 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#13003 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13026 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13010 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13056 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#13017 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13066 + def type; end + end +end + +# Represents reading a local variable. Note that this requires that a local variable of the same name has already been written to in the same scope, otherwise it is parsed as a method call. +# +# foo +# ^^^ +# +# source://prism//lib/prism/node.rb#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#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#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#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#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#13107 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableReadNode + # + # 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#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#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. + # + # foo = 1; foo # depth 0 + # + # bar = 2; tap { bar } # depth 1 + # + # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). + # + # source://prism//lib/prism/node.rb#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#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). + # + # x # name `:x` + # + # _Test # name `:_Test` + # + # Note that this can also be an underscore followed by a number for the default block parameters. + # + # _1 # name `:_1` + # + # Finally, for the default `it` block parameter, the name is `0it`. This is to distinguish it from an `it` local variable that is explicitly declared. + # + # it # name `:0it` + # + # source://prism//lib/prism/node.rb#13142 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13175 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13185 + def type; end + end +end + +# Represents writing to a local variable in a context that doesn't have an explicit value. +# +# foo, bar = baz +# ^^^ ^^^ +# +# source://prism//lib/prism/node.rb#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#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#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#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#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#13223 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableTargetNode + # + # 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#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#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#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#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#13246 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13273 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13283 + def type; end + end +end + +# Represents writing to a local variable. +# +# foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#13300 +class Prism::LocalVariableWriteNode < ::Prism::Node + # 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#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#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#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#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#13324 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> LocalVariableWriteNode + # + # 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#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: Prism::node, operator_loc: Location, location: Location } + # + # 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 + + # 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#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#13401 + 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). + # + # foo = :bar # name `:foo` + # + # abc = 123 # name `:abc` + # + # source://prism//lib/prism/node.rb#13351 + sig { returns(Symbol) } + def name; end + + # The location of the variable name. + # + # 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#13396 + sig { returns(String) } + def operator; end + + # The location of the `=` operator. + # + # x = :y + # ^ + # + # source://prism//lib/prism/node.rb#13389 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13426 + sig { override.returns(Symbol) } + def type; end + + # The value to write to the local variable. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # foo = :bar + # ^^^^ + # + # abc = 1234 + # ^^^^ + # + # Note that since the name of a local variable is known before the value is parsed, it is valid for a local variable to appear within the value of its own write. + # + # foo = foo + # + # source://prism//lib/prism/node.rb#13383 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13436 + def type; end + end +end + +# This represents a location in the source. +# +# 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#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#269 + sig { params(other: T.untyped).returns(T::Boolean) } + def ==(other); end + + # Returns a new location that is the result of chopping off the last byte. + # + # 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#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#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#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#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#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#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#242 + sig { returns(Integer) } + def end_column; end + + # The line number where this location ends. + # + # 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#191 + sig { returns(Integer) } + def end_offset; end + + # Returns a string representation of this location. + # + # 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#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#115 + sig { returns(Integer) } + def length; end + + # Implement the pretty print interface for Location. + # + # 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#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#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#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#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#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#224 + sig { returns(Integer) } + def start_column; end + + # The line number where this location starts. + # + # 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#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#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#107 + sig { returns(Prism::Source) } + def source; end +end + +# Flags for while and until loop nodes. +# +# 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#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#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#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#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#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#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#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#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#343 + sig { returns(Prism::Location) } + def value_loc; end +end + +# Represents a regular expression literal used in the predicate of a conditional to implicitly match against the last line read by an IO object. +# +# if /foo/i then end +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#13456 +class Prism::MatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # + # @return [MatchLastLineNode] a new instance of MatchLastLineNode + # + # source://prism//lib/prism/node.rb#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#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#13556 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | 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#13596 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#13480 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#13591 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#13514 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> MatchLastLineNode + # + # 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#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#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#13551 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # 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#13576 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13581 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13571 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # 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#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#13541 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13546 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#13586 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # 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 + # 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#13626 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#13528 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13566 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#13561 + sig { returns(T::Boolean) } + def windows_31j?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#13503 + 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#13636 + def type; end + end +end + +# Represents the use of the modifier `in` operator. +# +# foo in bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13656 +class Prism::MatchPredicateNode < ::Prism::Node + # 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#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#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#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#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#13678 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchPredicateNode + # + # 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#13673 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } + # + # 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#13719 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13714 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13707 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#13704 + sig { returns(Prism::Node) } + def pattern; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13743 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#13701 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13753 + def type; end + end +end + +# Represents the use of the `=>` operator. +# +# foo => bar +# ^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13771 +class Prism::MatchRequiredNode < ::Prism::Node + # 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#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#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#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#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#13793 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchRequiredNode + # + # 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#13788 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } + # + # 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#13834 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#13829 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#13822 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader pattern: Prism::node + # + # source://prism//lib/prism/node.rb#13819 + sig { returns(Prism::Node) } + def pattern; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13858 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#13816 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#13868 + def type; end + end +end + +# Represents writing local variables using a regular expression match with named capture groups. +# +# /(?bar)/ =~ baz +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#13886 +class Prism::MatchWriteNode < ::Prism::Node + # def initialize: (CallNode call, Array[LocalVariableTargetNode] targets, Location location) -> void + # + # @return [MatchWriteNode] a new instance of MatchWriteNode + # + # 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#13897 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader call: CallNode + # + # 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#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#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#13907 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?call: CallNode, ?targets: Array[LocalVariableTargetNode], ?location: Location) -> MatchWriteNode + # + # 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#13902 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[LocalVariableTargetNode], location: Location } + # + # 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#13936 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader targets: Array[LocalVariableTargetNode] + # + # 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 + # 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#13958 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#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#13983 +class Prism::MissingNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [MissingNode] a new instance of MissingNode + # + # 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#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#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#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#14002 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> MissingNode + # + # 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#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#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#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 + # 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#14044 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14054 + def type; end + end +end + +# Represents a module declaration involving the `module` keyword. +# +# module Foo end +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14069 +class Prism::ModuleNode < ::Prism::Node + # 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#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#14084 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # 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#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#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#14094 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader constant_path: Prism::node + # + # source://prism//lib/prism/node.rb#14130 + sig { returns(Prism::Node) } + def constant_path; end + + # 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#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#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: Prism::node, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location } + # + # 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#14151 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # 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#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#14120 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def module_keyword: () -> String + # + # 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#14123 + sig { returns(Prism::Location) } + def module_keyword_loc; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#14143 + sig { returns(Symbol) } + def name; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14187 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14197 + def type; end + end +end + +# Represents a multi-target expression. +# +# a, (b, c) = 1, 2, 3 +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#14219 +class Prism::MultiTargetNode < ::Prism::Node + # 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#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#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#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#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#14243 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#14238 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#14315 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] + # + # 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#14305 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # source://prism//lib/prism/node.rb#14279 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # attr_reader rest: Prism::node? + # + # source://prism//lib/prism/node.rb#14273 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] + # + # 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#14310 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#14292 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14344 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14354 + def type; end + end +end + +# Represents a write to a multi-target expression. +# +# a, b, c = 1, 2, 3 +# ^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#14376 +class Prism::MultiWriteNode < ::Prism::Node + # 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#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#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#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#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#14402 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#14397 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#14490 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] + # + # 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#14475 + sig { returns(T.nilable(String)) } + def lparen; end + + # attr_reader lparen_loc: Location? + # + # 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#14485 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14465 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader rest: Prism::node? + # + # source://prism//lib/prism/node.rb#14433 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] + # + # 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#14480 + sig { returns(T.nilable(String)) } + def rparen; end + + # attr_reader rparen_loc: Location? + # + # source://prism//lib/prism/node.rb#14452 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14522 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#14472 + sig { returns(Prism::Node) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14532 + def type; end + end +end + +# This visitor walks through the tree and copies each node as it is being +# visited. This is useful for consumers that want to mutate the tree, as you +# can change subtrees in place without effecting the rest of the tree. +# +# source://prism//lib/prism/mutation_compiler.rb#13 +class Prism::MutationCompiler < ::Prism::Compiler + # Copy a AliasGlobalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#15 + def visit_alias_global_variable_node(node); end + + # Copy a AliasMethodNode node + # + # source://prism//lib/prism/mutation_compiler.rb#20 + def visit_alias_method_node(node); end + + # Copy a AlternationPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#25 + def visit_alternation_pattern_node(node); end + + # Copy a AndNode node + # + # source://prism//lib/prism/mutation_compiler.rb#30 + def visit_and_node(node); end + + # Copy a ArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#35 + def visit_arguments_node(node); end + + # Copy a ArrayNode node + # + # source://prism//lib/prism/mutation_compiler.rb#40 + def visit_array_node(node); end + + # Copy a ArrayPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#45 + def visit_array_pattern_node(node); end + + # Copy a AssocNode node + # + # source://prism//lib/prism/mutation_compiler.rb#50 + def visit_assoc_node(node); end + + # Copy a AssocSplatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#55 + def visit_assoc_splat_node(node); end + + # Copy a BackReferenceReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#60 + def visit_back_reference_read_node(node); end + + # Copy a BeginNode node + # + # source://prism//lib/prism/mutation_compiler.rb#65 + def visit_begin_node(node); end + + # Copy a BlockArgumentNode node + # + # source://prism//lib/prism/mutation_compiler.rb#70 + def visit_block_argument_node(node); end + + # Copy a BlockLocalVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#75 + def visit_block_local_variable_node(node); end + + # Copy a BlockNode node + # + # source://prism//lib/prism/mutation_compiler.rb#80 + def visit_block_node(node); end + + # Copy a BlockParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#85 + def visit_block_parameter_node(node); end + + # Copy a BlockParametersNode node + # + # source://prism//lib/prism/mutation_compiler.rb#90 + def visit_block_parameters_node(node); end + + # Copy a BreakNode node + # + # source://prism//lib/prism/mutation_compiler.rb#95 + def visit_break_node(node); end + + # Copy a CallAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#100 + def visit_call_and_write_node(node); end + + # Copy a CallNode node + # + # source://prism//lib/prism/mutation_compiler.rb#105 + def visit_call_node(node); end + + # Copy a CallOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#110 + def visit_call_operator_write_node(node); end + + # Copy a CallOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#115 + def visit_call_or_write_node(node); end + + # Copy a CallTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#120 + def visit_call_target_node(node); end + + # Copy a CapturePatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#125 + def visit_capture_pattern_node(node); end + + # Copy a CaseMatchNode node + # + # source://prism//lib/prism/mutation_compiler.rb#130 + def visit_case_match_node(node); end + + # Copy a CaseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#135 + def visit_case_node(node); end + + # Copy a ClassNode node + # + # source://prism//lib/prism/mutation_compiler.rb#140 + def visit_class_node(node); end + + # Copy a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#145 + def visit_class_variable_and_write_node(node); end + + # Copy a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#150 + def visit_class_variable_operator_write_node(node); end + + # Copy a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#155 + def visit_class_variable_or_write_node(node); end + + # Copy a ClassVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#160 + def visit_class_variable_read_node(node); end + + # Copy a ClassVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#165 + def visit_class_variable_target_node(node); end + + # Copy a ClassVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#170 + def visit_class_variable_write_node(node); end + + # Copy a ConstantAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#175 + def visit_constant_and_write_node(node); end + + # Copy a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#180 + def visit_constant_operator_write_node(node); end + + # Copy a ConstantOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#185 + def visit_constant_or_write_node(node); end + + # Copy a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#190 + def visit_constant_path_and_write_node(node); end + + # Copy a ConstantPathNode node + # + # source://prism//lib/prism/mutation_compiler.rb#195 + def visit_constant_path_node(node); end + + # Copy a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#200 + def visit_constant_path_operator_write_node(node); end + + # Copy a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#205 + def visit_constant_path_or_write_node(node); end + + # Copy a ConstantPathTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#210 + def visit_constant_path_target_node(node); end + + # Copy a ConstantPathWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#215 + def visit_constant_path_write_node(node); end + + # Copy a ConstantReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#220 + def visit_constant_read_node(node); end + + # Copy a ConstantTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#225 + def visit_constant_target_node(node); end + + # Copy a ConstantWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#230 + def visit_constant_write_node(node); end + + # Copy a DefNode node + # + # source://prism//lib/prism/mutation_compiler.rb#235 + def visit_def_node(node); end + + # Copy a DefinedNode node + # + # source://prism//lib/prism/mutation_compiler.rb#240 + def visit_defined_node(node); end + + # Copy a ElseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#245 + def visit_else_node(node); end + + # Copy a EmbeddedStatementsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#250 + def visit_embedded_statements_node(node); end + + # Copy a EmbeddedVariableNode node + # + # source://prism//lib/prism/mutation_compiler.rb#255 + def visit_embedded_variable_node(node); end + + # Copy a EnsureNode node + # + # source://prism//lib/prism/mutation_compiler.rb#260 + def visit_ensure_node(node); end + + # Copy a FalseNode node + # + # source://prism//lib/prism/mutation_compiler.rb#265 + def visit_false_node(node); end + + # Copy a FindPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#270 + def visit_find_pattern_node(node); end + + # Copy a FlipFlopNode node + # + # source://prism//lib/prism/mutation_compiler.rb#275 + def visit_flip_flop_node(node); end + + # Copy a FloatNode node + # + # source://prism//lib/prism/mutation_compiler.rb#280 + def visit_float_node(node); end + + # Copy a ForNode node + # + # source://prism//lib/prism/mutation_compiler.rb#285 + def visit_for_node(node); end + + # Copy a ForwardingArgumentsNode node + # + # source://prism//lib/prism/mutation_compiler.rb#290 + def visit_forwarding_arguments_node(node); end + + # Copy a ForwardingParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#295 + def visit_forwarding_parameter_node(node); end + + # Copy a ForwardingSuperNode node + # + # source://prism//lib/prism/mutation_compiler.rb#300 + def visit_forwarding_super_node(node); end + + # Copy a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#305 + def visit_global_variable_and_write_node(node); end + + # Copy a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#310 + def visit_global_variable_operator_write_node(node); end + + # Copy a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#315 + def visit_global_variable_or_write_node(node); end + + # Copy a GlobalVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#320 + def visit_global_variable_read_node(node); end + + # Copy a GlobalVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#325 + def visit_global_variable_target_node(node); end + + # Copy a GlobalVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#330 + def visit_global_variable_write_node(node); end + + # Copy a HashNode node + # + # source://prism//lib/prism/mutation_compiler.rb#335 + def visit_hash_node(node); end + + # Copy a HashPatternNode node + # + # source://prism//lib/prism/mutation_compiler.rb#340 + def visit_hash_pattern_node(node); end + + # Copy a IfNode node + # + # source://prism//lib/prism/mutation_compiler.rb#345 + def visit_if_node(node); end + + # Copy a ImaginaryNode node + # + # source://prism//lib/prism/mutation_compiler.rb#350 + def visit_imaginary_node(node); end + + # Copy a ImplicitNode node + # + # source://prism//lib/prism/mutation_compiler.rb#355 + def visit_implicit_node(node); end + + # Copy a ImplicitRestNode node + # + # source://prism//lib/prism/mutation_compiler.rb#360 + def visit_implicit_rest_node(node); end + + # Copy a InNode node + # + # source://prism//lib/prism/mutation_compiler.rb#365 + def visit_in_node(node); end + + # Copy a IndexAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#370 + def visit_index_and_write_node(node); end + + # Copy a IndexOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#375 + def visit_index_operator_write_node(node); end + + # Copy a IndexOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#380 + def visit_index_or_write_node(node); end + + # Copy a IndexTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#385 + def visit_index_target_node(node); end + + # Copy a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#390 + def visit_instance_variable_and_write_node(node); end + + # Copy a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#395 + def visit_instance_variable_operator_write_node(node); end + + # Copy a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#400 + def visit_instance_variable_or_write_node(node); end + + # Copy a InstanceVariableReadNode node + # + # source://prism//lib/prism/mutation_compiler.rb#405 + def visit_instance_variable_read_node(node); end + + # Copy a InstanceVariableTargetNode node + # + # source://prism//lib/prism/mutation_compiler.rb#410 + def visit_instance_variable_target_node(node); end + + # Copy a InstanceVariableWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#415 + def visit_instance_variable_write_node(node); end + + # Copy a IntegerNode node + # + # source://prism//lib/prism/mutation_compiler.rb#420 + def visit_integer_node(node); end + + # Copy a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/mutation_compiler.rb#425 + def visit_interpolated_match_last_line_node(node); end + + # Copy a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/mutation_compiler.rb#430 + def visit_interpolated_regular_expression_node(node); end + + # Copy a InterpolatedStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#435 + def visit_interpolated_string_node(node); end + + # Copy a InterpolatedSymbolNode node + # + # source://prism//lib/prism/mutation_compiler.rb#440 + def visit_interpolated_symbol_node(node); end + + # Copy a InterpolatedXStringNode node + # + # source://prism//lib/prism/mutation_compiler.rb#445 + def visit_interpolated_x_string_node(node); end + + # Copy a 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#455 + def visit_keyword_hash_node(node); end + + # Copy a KeywordRestParameterNode node + # + # 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#465 + def visit_lambda_node(node); end + + # Copy a LocalVariableAndWriteNode node + # + # 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#475 + def visit_local_variable_operator_write_node(node); end + + # Copy a LocalVariableOrWriteNode node + # + # 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#485 + def visit_local_variable_read_node(node); end + + # Copy a LocalVariableTargetNode node + # + # 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#495 + def visit_local_variable_write_node(node); end + + # Copy a MatchLastLineNode node + # + # 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#505 + def visit_match_predicate_node(node); end + + # Copy a MatchRequiredNode node + # + # 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#515 + def visit_match_write_node(node); end + + # Copy a MissingNode node + # + # 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#525 + def visit_module_node(node); end + + # Copy a MultiTargetNode node + # + # 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#535 + def visit_multi_write_node(node); end + + # Copy a NextNode node + # + # 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#545 + def visit_nil_node(node); end + + # Copy a NoKeywordsParameterNode node + # + # 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#555 + def visit_numbered_parameters_node(node); end + + # Copy a NumberedReferenceReadNode node + # + # 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#565 + def visit_optional_keyword_parameter_node(node); end + + # Copy a OptionalParameterNode node + # + # 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#575 + def visit_or_node(node); end + + # Copy a ParametersNode node + # + # 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#585 + def visit_parentheses_node(node); end + + # Copy a PinnedExpressionNode node + # + # 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#595 + def visit_pinned_variable_node(node); end + + # Copy a PostExecutionNode node + # + # 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#605 + def visit_pre_execution_node(node); end + + # Copy a ProgramNode node + # + # 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#615 + def visit_range_node(node); end + + # Copy a RationalNode node + # + # 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#625 + def visit_redo_node(node); end + + # Copy a RegularExpressionNode node + # + # 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#635 + def visit_required_keyword_parameter_node(node); end + + # Copy a RequiredParameterNode node + # + # 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#645 + def visit_rescue_modifier_node(node); end + + # Copy a RescueNode node + # + # 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#655 + def visit_rest_parameter_node(node); end + + # Copy a RetryNode node + # + # 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#665 + def visit_return_node(node); end + + # Copy a SelfNode node + # + # 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#680 + def visit_singleton_class_node(node); end + + # Copy a SourceEncodingNode node + # + # 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#690 + def visit_source_file_node(node); end + + # Copy a SourceLineNode node + # + # 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#700 + def visit_splat_node(node); end + + # Copy a StatementsNode node + # + # 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#710 + def visit_string_node(node); end + + # Copy a SuperNode node + # + # 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#720 + def visit_symbol_node(node); end + + # Copy a TrueNode node + # + # 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#730 + def visit_undef_node(node); end + + # Copy a UnlessNode node + # + # 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#740 + def visit_until_node(node); end + + # Copy a WhenNode node + # + # 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#750 + def visit_while_node(node); end + + # Copy a XStringNode node + # + # 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#760 + def visit_yield_node(node); end + + Result = type_member +end + +# Represents the use of the `next` keyword. +# +# next 1 +# ^^^^^^ +# +# 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#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#14567 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # 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#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#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#14577 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> NextNode + # + # 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#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#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#14617 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14612 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14605 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14643 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14653 + def type; end + end +end + +# Represents the use of the `nil` keyword. +# +# nil +# ^^^ +# +# 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#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#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#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#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#14689 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> NilNode + # + # 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#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#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#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 + # 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#14731 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14741 + def type; end + end +end + +# Represents the use of `**nil` inside method arguments. +# +# def a(**nil) +# ^^^^^ +# end +# +# 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#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#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#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#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#14778 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?operator_loc: Location, ?keyword_loc: Location, ?location: Location) -> NoKeywordsParameterNode + # + # 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#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#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#14825 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#14820 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#14808 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#14815 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#14801 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14846 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14856 + def type; end + end +end + +# This represents a node in the tree. It is the parent class of all of the +# various node types. +# +# source://prism//lib/prism/node.rb#12 +class Prism::Node + abstract! + + # Accepts a visitor and calls back into the specialized visit function. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#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 + # nodes that were not present. + # + # @raise [NoMethodError] + # + # 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 + # comments attached to them. + # + # @raise [NoMethodError] + # + # 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 + # optional nodes that were not present. + # + # @raise [NoMethodError] + # + # 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 + # nodes that were not present. + # + # @raise [NoMethodError] + # + # 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#19 + sig { returns(Prism::Location) } + def location; end + + # @return [Boolean] + # + # 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#58 + sig { params(q: T.untyped).void } + def pretty_print(q); end + + # 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#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#66 + sig { returns(String) } + def to_dot; end + + # Returns a symbol symbolizing the type of node that this represents. This + # is particularly useful for case statements and array comparisons. + # + # @raise [NoMethodError] + # + # source://prism//lib/prism/node.rb#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#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 +# implementations of child nodes. +# +# source://prism//lib/prism/node_inspector.rb#6 +class Prism::NodeInspector + # @return [NodeInspector] a new instance of NodeInspector + # + # source://prism//lib/prism/node_inspector.rb#9 + def initialize(prefix = T.unsafe(nil)); end + + # Appends a line to the output with the current prefix. + # + # source://prism//lib/prism/node_inspector.rb#15 + def <<(line); end + + # Returns a new inspector that can be used to inspect a child node. + # + # source://prism//lib/prism/node_inspector.rb#59 + def child_inspector(append); end + + # Generates a string that represents a child node. + # + # source://prism//lib/prism/node_inspector.rb#54 + 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 + 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 + def list(prefix, nodes); end + + # Generates a string that represents a location field on a node. + # + # source://prism//lib/prism/node_inspector.rb#45 + def location(value); end + + # source://prism//lib/prism/node_inspector.rb#7 + def output; end + + # source://prism//lib/prism/node_inspector.rb#7 + def prefix; end + + # Returns the output as a string. + # + # source://prism//lib/prism/node_inspector.rb#64 + def to_str; end +end + +# Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. +# +# -> { _1 + _2 } +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#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#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#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#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#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#14893 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?maximum: Integer, ?location: Location) -> NumberedParametersNode + # + # 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#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#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#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#14916 + sig { returns(Integer) } + def maximum; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14939 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#14949 + def type; end + end +end + +# Represents reading a numbered reference to a capture in the previous match. +# +# $1 +# ^^ +# +# 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#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#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#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#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#14985 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?number: Integer, ?location: Location) -> NumberedReferenceReadNode + # + # 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#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#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#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 are too large result in this value being `0`. + # + # $1 # number `1` + # + # $5432 # number `5432` + # + # $4294967296 # number `0` + # + # source://prism//lib/prism/node.rb#15014 + sig { returns(Integer) } + def number; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15037 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15047 + def type; end + end +end + +# Represents an optional keyword parameter to a method, block, or lambda definition. +# +# def a(b: 1) +# ^^^^ +# end +# +# source://prism//lib/prism/node.rb#15064 +class Prism::OptionalKeywordParameterNode < ::Prism::Node + # 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#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#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#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#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#15087 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalKeywordParameterNode + # + # 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#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: Prism::node, location: Location } + # + # 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#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#15114 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#15117 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15127 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15157 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#15124 + sig { returns(Prism::Node) } + def value; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#15110 + 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#15167 + def type; end + end +end + +# Represents an optional parameter to a method, block, or lambda definition. +# +# def a(b = 1) +# ^^^^^ +# end +# +# source://prism//lib/prism/node.rb#15187 +class Prism::OptionalParameterNode < ::Prism::Node + # 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#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#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#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#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#15211 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalParameterNode + # + # 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#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: Prism::node, location: Location } + # + # 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#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#15238 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#15241 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15263 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#15248 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15258 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15294 + sig { override.returns(Symbol) } + def type; end + + # attr_reader value: Prism::node + # + # source://prism//lib/prism/node.rb#15255 + sig { returns(Prism::Node) } + def value; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#15234 + 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#15304 + def type; end + end +end + +# Represents the use of the `||` operator or the `or` keyword. +# +# left or right +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15324 +class Prism::OrNode < ::Prism::Node + # 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#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#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#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#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#15346 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> OrNode + # + # 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#15341 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # + # 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#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). + # + # left or right + # ^^^^ + # + # 1 || 2 + # ^ + # + # source://prism//lib/prism/node.rb#15375 + sig { returns(Prism::Node) } + def left; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15397 + sig { returns(String) } + def operator; end + + # The location of the `or` keyword or the `||` operator. + # + # left or right + # ^^ + # + # source://prism//lib/prism/node.rb#15390 + sig { returns(Prism::Location) } + def operator_loc; end + + # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # left || right + # ^^^^^ + # + # 1 or 2 + # ^ + # + # source://prism//lib/prism/node.rb#15384 + sig { returns(Prism::Node) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15426 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15436 + def type; end + end +end + +# A parser for the pack template language. +# +# source://prism//lib/prism/pack.rb#6 +module Prism::Pack + class << self + def parse(_arg0, _arg1, _arg2); end + end +end + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) + +# A directive in the pack template language. +# +# source://prism//lib/prism/pack.rb#60 +class Prism::Pack::Directive + # Initialize a new directive with the given values. + # + # @return [Directive] a new instance of Directive + # + # source://prism//lib/prism/pack.rb#89 + def initialize(version, variant, source, type, signed, endian, size, length_type, length); end + + # Provide a human-readable description of the directive. + # + # source://prism//lib/prism/pack.rb#131 + def describe; end + + # The type of endianness of the directive. + # + # source://prism//lib/prism/pack.rb#77 + def endian; end + + # The length of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#86 + def length; end + + # The length type of this directive (used for integers). + # + # source://prism//lib/prism/pack.rb#83 + def length_type; end + + # The type of signedness of the directive. + # + # source://prism//lib/prism/pack.rb#74 + def signed; end + + # The size of the directive. + # + # source://prism//lib/prism/pack.rb#80 + def size; end + + # A byteslice of the source string that this directive represents. + # + # source://prism//lib/prism/pack.rb#68 + def source; end + + # The type of the directive. + # + # source://prism//lib/prism/pack.rb#71 + def type; end + + # A symbol representing whether or not we are packing or unpacking. + # + # source://prism//lib/prism/pack.rb#65 + def variant; end + + # A symbol representing the version of Ruby. + # + # source://prism//lib/prism/pack.rb#62 + def version; end +end + +# The descriptions of the various types of endianness. +# +# source://prism//lib/prism/pack.rb#102 +Prism::Pack::Directive::ENDIAN_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of signedness. +# +# source://prism//lib/prism/pack.rb#111 +Prism::Pack::Directive::SIGNED_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# The descriptions of the various types of sizes. +# +# source://prism//lib/prism/pack.rb#118 +Prism::Pack::Directive::SIZE_DESCRIPTIONS = T.let(T.unsafe(nil), Hash) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) + +# The result of parsing a pack template. +# +# source://prism//lib/prism/pack.rb#198 +class Prism::Pack::Format + # Create a new Format with the given directives and encoding. + # + # @return [Format] a new instance of Format + # + # source://prism//lib/prism/pack.rb#206 + def initialize(directives, encoding); end + + # Provide a human-readable description of the format. + # + # source://prism//lib/prism/pack.rb#212 + def describe; end + + # A list of the directives in the template. + # + # source://prism//lib/prism/pack.rb#200 + def directives; end + + # The encoding of the template. + # + # source://prism//lib/prism/pack.rb#203 + def encoding; end +end + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) + +# source://prism//lib/prism/pack.rb#56 +Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) + +# Flags for parameter nodes. +# +# source://prism//lib/prism/node.rb#20409 +module Prism::ParameterFlags; end + +# a parameter name that has been repeated in the method signature +# +# 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. +# +# def a(b, c, d) +# ^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#15455 +class Prism::ParametersNode < ::Prism::Node + # 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#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#15471 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader block: BlockParameterNode? + # + # 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#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#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#15481 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#15476 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#15533 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil + # + # 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[RequiredKeywordParameterNode | OptionalKeywordParameterNode] + # + # source://prism//lib/prism/node.rb#15524 + sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } + def keywords; end + + # attr_reader optionals: Array[OptionalParameterNode] + # + # source://prism//lib/prism/node.rb#15515 + sig { returns(T::Array[Prism::OptionalParameterNode]) } + def optionals; end + + # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode] + # + # 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[RequiredParameterNode | MultiTargetNode] + # + # source://prism//lib/prism/node.rb#15512 + sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } + def requireds; end + + # attr_reader rest: RestParameterNode | ImplicitRestNode | nil + # + # source://prism//lib/prism/node.rb#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#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 + # 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#15574 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15584 + def type; end + end +end + +# Represents a parenthesized expression +# +# (10 + 34) +# ^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15610 +class Prism::ParenthesesNode < ::Prism::Node + # 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#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#15622 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Prism::node? + # + # 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#15631 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#15683 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#15636 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> ParenthesesNode + # + # 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#15631 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } + # + # 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#15688 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#15678 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#15664 + sig { returns(Prism::Location) } + def opening_loc; end + + # 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 + # 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#15715 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15725 + def type; end + end +end + +# This represents an error that was encountered during parsing. +# +# 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#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#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#401 + sig { returns(String) } + def inspect; end + + # The level of this error. + # + # 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#382 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this error. + # + # 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 is a result specific to the `parse_lex` and `parse_lex_file` methods. +# +# 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 [ParseLexResult] a new instance of ParseLexResult + # + # 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 + + # Implement the hash pattern matching interface for ParseLexResult. + # + # 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 + + # 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#535 + sig { returns([Prism::ProgramNode, T::Array[T.untyped]]) } + def value; end +end + +# This is a result specific to the `parse` and `parse_file` methods. +# +# source://prism//lib/prism/parse_result.rb#498 +class Prism::ParseResult < ::Prism::Result + # Create a new parse result object with the given values. + # + # @return [ParseResult] a new instance of ParseResult + # + # source://prism//lib/prism/parse_result.rb#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#509 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); 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 + + # The syntax tree that was parsed from the source code. + # + # source://prism//lib/prism/parse_result.rb#500 + sig { returns(Prism::ProgramNode) } + def value; end +end + +# When we've parsed the source, we have both the syntax tree and the list of +# comments that we found in the source. This class is responsible for +# walking the tree and finding the nearest location to attach each comment. +# +# It does this by first finding the nearest locations to each comment. +# Locations can either come from nodes directly or from location fields on +# nodes. For example, a `ClassNode` has an overall location encompassing the +# entire class, but it also has a location for the `class` keyword. +# +# Once the nearest locations are found, it determines which one to attach +# to. If it's a trailing comment (a comment on the same line as other source +# code), it will favor attaching to the nearest location that occurs before +# the comment. Otherwise it will favor attaching to the nearest location +# that is after the comment. +# +# source://prism//lib/prism/parse_result/comments.rb#19 +class Prism::ParseResult::Comments + # Create a new Comments object that will attach comments to the given + # parse result. + # + # @return [Comments] a new instance of Comments + # + # source://prism//lib/prism/parse_result/comments.rb#86 + def initialize(parse_result); end + + # Attach the comments to their respective locations in the tree by + # mutating the parse result. + # + # source://prism//lib/prism/parse_result/comments.rb#92 + def attach!; end + + # The parse result that we are attaching comments to. + # + # source://prism//lib/prism/parse_result/comments.rb#82 + def parse_result; end + + private + + # Responsible for finding the nearest targets to the given comment within + # the context of the given encapsulating node. + # + # source://prism//lib/prism/parse_result/comments.rb#119 + def nearest_targets(node, comment); end +end + +# A target for attaching comments that is based on a location field on a +# node. For example, the `end` token of a ClassNode. +# +# source://prism//lib/prism/parse_result/comments.rb#53 +class Prism::ParseResult::Comments::LocationTarget + # @return [LocationTarget] a new instance of LocationTarget + # + # source://prism//lib/prism/parse_result/comments.rb#56 + def initialize(location); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#68 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#64 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#72 + def leading_comment(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#54 + def location; end + + # source://prism//lib/prism/parse_result/comments.rb#60 + def start_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#76 + def trailing_comment(comment); end +end + +# A target for attaching comments that is based on a specific node's +# location. +# +# source://prism//lib/prism/parse_result/comments.rb#22 +class Prism::ParseResult::Comments::NodeTarget + # @return [NodeTarget] a new instance of NodeTarget + # + # source://prism//lib/prism/parse_result/comments.rb#25 + def initialize(node); end + + # @return [Boolean] + # + # source://prism//lib/prism/parse_result/comments.rb#37 + def encloses?(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#33 + def end_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#42 + def leading_comment(comment); end + + # source://prism//lib/prism/parse_result/comments.rb#23 + def node; end + + # source://prism//lib/prism/parse_result/comments.rb#29 + def start_offset; end + + # source://prism//lib/prism/parse_result/comments.rb#46 + def trailing_comment(comment); end +end + +# The :line tracepoint event gets fired whenever the Ruby VM encounters an +# expression on a new line. The types of expressions that can trigger this +# event are: +# +# * if statements +# * unless statements +# * nodes that are children of statements lists +# +# In order to keep track of the newlines, we have a list of offsets that +# come back from the parser. We assign these offsets to the first nodes that +# we find in the tree that are on those lines. +# +# Note that the logic in this file should be kept in sync with the Java +# MarkNewlinesVisitor, since that visitor is responsible for marking the +# newlines for JRuby/TruffleRuby. +# +# source://prism//lib/prism/parse_result/newlines.rb#20 +class Prism::ParseResult::Newlines < ::Prism::Visitor + # Create a new Newlines visitor with the given newline offsets. + # + # @return [Newlines] a new instance of Newlines + # + # source://prism//lib/prism/parse_result/newlines.rb#22 + def initialize(newline_marked); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#27 + def visit_block_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#41 + def visit_if_node(node); end + + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#27 + def visit_lambda_node(node); end + + # Permit statements lists to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#49 + def visit_statements_node(node); end + + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#41 + def visit_unless_node(node); end +end + +# This represents a warning that was encountered during parsing. +# +# source://prism//lib/prism/parse_result.rb#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#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#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#435 + sig { returns(String) } + def inspect; end + + # The level of this warning. + # + # 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#416 + sig { returns(Prism::Location) } + def location; end + + # The message associated with this warning. + # + # 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 +# expression would normally be passed to an `in` clause within a `case` +# expression or a rightward assignment expression. For example, in the +# following snippet: +# +# case node +# in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] +# end +# +# the pattern is the ConstantPathNode[...] expression. +# +# The pattern gets compiled into an object that responds to #call by running +# the #compile method. This method itself will run back through Prism to +# parse the expression into a tree, then walk the tree to generate the +# necessary callable objects. For example, if you wanted to compile the +# expression above into a callable, you would: +# +# callable = Prism::Pattern.new("ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]]").compile +# callable.call(node) +# +# The callable object returned by #compile is guaranteed to respond to #call +# with a single argument, which is the node to match against. It also is +# guaranteed to respond to #===, which means it itself can be used in a `case` +# expression, as in: +# +# case node +# when callable +# end +# +# If the query given to the initializer cannot be compiled into a valid +# matcher (either because of a syntax error or because it is using syntax we +# do not yet support) then a Prism::Pattern::CompilationError will be +# raised. +# +# source://prism//lib/prism/pattern.rb#37 +class Prism::Pattern + # Create a new pattern with the given query. The query should be a string + # containing a Ruby pattern matching expression. + # + # @return [Pattern] a new instance of Pattern + # + # source://prism//lib/prism/pattern.rb#63 + def initialize(query); end + + # Compile the query into a callable object that can be used to match against + # nodes. + # + # @raise [CompilationError] + # + # source://prism//lib/prism/pattern.rb#70 + def compile; end + + # The query that this pattern was initialized with. + # + # source://prism//lib/prism/pattern.rb#59 + def query; end + + # Scan the given node and all of its children for nodes that match the + # pattern. If a block is given, it will be called with each node that + # matches the pattern. If no block is given, an enumerator will be returned + # that will yield each node that matches the pattern. + # + # source://prism//lib/prism/pattern.rb#86 + def scan(root); end + + private + + # Shortcut for combining two procs into one that returns true if both return + # true. + # + # source://prism//lib/prism/pattern.rb#102 + def combine_and(left, right); end + + # Shortcut for combining two procs into one that returns true if either + # returns true. + # + # source://prism//lib/prism/pattern.rb#108 + def combine_or(left, right); end + + # in foo | bar + # + # source://prism//lib/prism/pattern.rb#143 + def compile_alternation_pattern_node(node); end + + # in [foo, bar, baz] + # + # source://prism//lib/prism/pattern.rb#118 + def compile_array_pattern_node(node); end + + # in Prism::ConstantReadNode + # + # source://prism//lib/prism/pattern.rb#148 + def compile_constant_path_node(node); end + + # in ConstantReadNode + # in String + # + # source://prism//lib/prism/pattern.rb#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#113 + def compile_error(node); end + + # in InstanceVariableReadNode[name: Symbol] + # in { name: Symbol } + # + # source://prism//lib/prism/pattern.rb#178 + def compile_hash_pattern_node(node); end + + # in nil + # + # 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#237 + def compile_node(node); end + + # in /foo/ + # + # source://prism//lib/prism/pattern.rb#213 + def compile_regular_expression_node(node); end + + # in "" + # in "foo" + # + # source://prism//lib/prism/pattern.rb#221 + def compile_string_node(node); end + + # in :+ + # in :foo + # + # source://prism//lib/prism/pattern.rb#229 + def compile_symbol_node(node); end +end + +# Raised when the query given to a pattern is either invalid Ruby syntax or +# is using syntax that we don't yet support. +# +# source://prism//lib/prism/pattern.rb#40 +class Prism::Pattern::CompilationError < ::StandardError + # Create a new CompilationError with the given representation of the node + # that caused the error. + # + # @return [CompilationError] a new instance of CompilationError + # + # source://prism//lib/prism/pattern.rb#43 + def initialize(repr); end +end + +# Represents the use of the `^` operator for pinning an expression in a pattern matching expression. +# +# foo in ^(bar) +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#15743 +class Prism::PinnedExpressionNode < ::Prism::Node + # 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#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#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#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#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#15766 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location, ?location: Location) -> PinnedExpressionNode + # + # 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#15761 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#15784 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader expression: Prism::node + # + # source://prism//lib/prism/node.rb#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#15828 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def lparen: () -> String + # + # source://prism//lib/prism/node.rb#15818 + sig { returns(String) } + def lparen; end + + # attr_reader lparen_loc: Location + # + # source://prism//lib/prism/node.rb#15799 + sig { returns(Prism::Location) } + def lparen_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15813 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#15792 + sig { returns(Prism::Location) } + def operator_loc; end + + # def rparen: () -> String + # + # source://prism//lib/prism/node.rb#15823 + sig { returns(String) } + def rparen; end + + # attr_reader rparen_loc: Location + # + # source://prism//lib/prism/node.rb#15806 + sig { returns(Prism::Location) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15852 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15862 + def type; end + end +end + +# Represents the use of the `^` operator for pinning a variable in a pattern matching expression. +# +# foo in ^bar +# ^^^^ +# +# source://prism//lib/prism/node.rb#15881 +class Prism::PinnedVariableNode < ::Prism::Node + # def initialize: (Prism::node variable, Location operator_loc, Location location) -> void + # + # @return [PinnedVariableNode] a new instance of PinnedVariableNode + # + # 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#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#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#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#15902 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?variable: Prism::node, ?operator_loc: Location, ?location: Location) -> PinnedVariableNode + # + # 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#15897 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { variable: Prism::node, operator_loc: Location, location: Location } + # + # 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#15940 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#15935 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#15928 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15962 + sig { override.returns(Symbol) } + def type; end + + # attr_reader variable: Prism::node + # + # source://prism//lib/prism/node.rb#15925 + sig { returns(Prism::Node) } + def variable; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15972 + def type; end + end +end + +# Represents the use of the `END` keyword. +# +# END { foo } +# ^^^^^^^^^^^ +# +# 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#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#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#16007 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#16071 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#16012 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PostExecutionNode + # + # 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#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#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#16076 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16061 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16040 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#16066 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # 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#16037 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16104 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16114 + def type; end + end +end + +# Represents the use of the `BEGIN` keyword. +# +# BEGIN { foo } +# ^^^^^^^^^^^^^ +# +# 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#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#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#16151 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#16215 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#16156 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PreExecutionNode + # + # 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#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#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#16220 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#16205 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#16184 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#16210 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # 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#16181 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16248 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16258 + def type; end + end +end + +# The top level node of any parse tree. +# +# 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#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#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#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#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#16295 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?locals: Array[Symbol], ?statements: StatementsNode, ?location: Location) -> ProgramNode + # + # 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#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#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#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#16318 + sig { returns(T::Array[Symbol]) } + def locals; end + + # attr_reader statements: StatementsNode + # + # source://prism//lib/prism/node.rb#16321 + sig { returns(Prism::StatementsNode) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16346 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16356 + def type; end + end +end + +# Flags for range and flip-flop nodes. +# +# source://prism//lib/prism/node.rb#20415 +module Prism::RangeFlags; end + +# ... operator +# +# source://prism//lib/prism/node.rb#20417 +Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) + +# Represents the use of the `..` or `...` operators. +# +# 1..2 +# ^^^^ +# +# c if a =~ /left/ ... b =~ /right/ +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#16377 +class Prism::RangeNode < ::Prism::Node + # 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#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#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#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#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#16400 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> RangeNode + # + # 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#16395 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#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#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). + # + # 1... + # ^ + # + # hello...goodbye + # ^^^^^ + # + # 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#16461 + sig { returns(String) } + def operator; end + + # The location of the `..` or `...` operator. + # + # source://prism//lib/prism/node.rb#16449 + sig { returns(Prism::Location) } + def operator_loc; end + + # The right-hand side of the range, if present. It can be either `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # ..5 + # ^ + # + # 1...foo + # ^^^ + # If neither right-hand or left-hand side was included, this will be a MissingNode. + # + # source://prism//lib/prism/node.rb#16446 + sig { returns(T.nilable(Prism::Node)) } + def right; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16500 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16426 + 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#16510 + def type; end + end +end + +# Represents a rational number literal. +# +# 1.0r +# ^^^^ +# +# source://prism//lib/prism/node.rb#16529 +class Prism::RationalNode < ::Prism::Node + # def initialize: (Prism::node numeric, Location location) -> void + # + # @return [RationalNode] a new instance of RationalNode + # + # 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#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#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#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#16549 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?numeric: Prism::node, ?location: Location) -> RationalNode + # + # 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#16544 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: Prism::node, location: Location } + # + # 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#16575 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader numeric: Prism::node + # + # source://prism//lib/prism/node.rb#16572 + sig { returns(Prism::Node) } + def numeric; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#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#94 + sig { returns(Rational) } + def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16606 + def type; end + end +end + +# Represents the use of the `redo` keyword. +# +# redo +# ^^^^ +# +# 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#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#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#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#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#16641 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> RedoNode + # + # 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#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#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#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 + # 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#16683 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#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#20421 +module Prism::RegularExpressionFlags; end + +# n - forces the ASCII-8BIT encoding +# +# 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#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#20426 +Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) + +# internal bytes forced the encoding to binary +# +# 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#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#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#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#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#20432 +Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) + +# u - forces the UTF-8 encoding +# +# 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#20441 +Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) + +# Represents a regular expression literal with no interpolation. +# +# /foo/i +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#16708 +class Prism::RegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + + # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # + # @return [RegularExpressionNode] a new instance of RegularExpressionNode + # + # source://prism//lib/prism/node.rb#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#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#16808 + sig { returns(T::Boolean) } + def ascii_8bit?; end + + # def child_nodes: () -> Array[nil | 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#16848 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#16732 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#16843 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#16766 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> RegularExpressionNode + # + # 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#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#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#16803 + sig { returns(T::Boolean) } + def euc_jp?; end + + # def extended?: () -> bool + # + # @return [Boolean] + # + # 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#16828 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16833 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16823 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def ignore_case?: () -> bool + # + # @return [Boolean] + # + # 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#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#16793 + sig { returns(T::Boolean) } + def multi_line?; end + + # def once?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16798 + sig { returns(T::Boolean) } + def once?; end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#16838 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # 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 + # 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#16878 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#16780 + sig { returns(String) } + def unescaped; end + + # def utf_8?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16818 + sig { returns(T::Boolean) } + def utf_8?; end + + # def windows_31j?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16813 + sig { returns(T::Boolean) } + def windows_31j?; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16755 + 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#16888 + def type; end + end +end + +# source://prism//lib/prism/node_ext.rb#6 +module Prism::RegularExpressionOptions + # Returns a numeric value that represents the flags that were used to create + # the regular expression. + # + # source://prism//lib/prism/node_ext.rb#9 + def options; end +end + +# Represents a required keyword parameter to a method, block, or lambda definition. +# +# def a(b: ) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#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#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#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#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#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#16931 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?location: Location) -> RequiredKeywordParameterNode + # + # 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#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#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#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#16958 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#16961 + sig { returns(Prism::Location) } + def name_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#16968 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16996 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#16954 + 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#17006 + def type; end + end +end + +# Represents a required parameter to a method, block, or lambda definition. +# +# def a(b) +# ^ +# end +# +# source://prism//lib/prism/node.rb#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#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#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#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#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#17046 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> RequiredParameterNode + # + # 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#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#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#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#17073 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17076 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17103 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#17069 + 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#17113 + def type; end + end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17130 +class Prism::RescueModifierNode < ::Prism::Node + # 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#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#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#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#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#17156 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node, ?location: Location) -> RescueModifierNode + # + # 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#17151 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node, location: Location } + # + # 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: Prism::node + # + # 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#17197 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#17192 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#17182 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader rescue_expression: Prism::node + # + # source://prism//lib/prism/node.rb#17189 + sig { returns(Prism::Node) } + def rescue_expression; end + + # 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 + # 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#17221 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17231 + def type; end + end +end + +# Represents a rescue statement. +# +# begin +# rescue Foo, *splat, Bar => ex +# foo +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +# end +# +# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. +# +# source://prism//lib/prism/node.rb#17254 +class Prism::RescueNode < ::Prism::Node + # 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#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#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#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#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#17279 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader consequent: RescueNode? + # + # source://prism//lib/prism/node.rb#17336 + sig { returns(T.nilable(Prism::RescueNode)) } + def consequent; end + + # 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#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#17274 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#17302 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # attr_reader exceptions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#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#17349 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#17339 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#17307 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def operator: () -> String? + # + # 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#17317 + sig { returns(T.nilable(Prism::Location)) } + def operator_loc; end + + # attr_reader reference: Prism::node? + # + # 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#17333 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17389 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17399 + def type; end + end +end + +# Represents a rest parameter to a method, block, or lambda definition. +# +# def a(*b) +# ^^ +# end +# +# source://prism//lib/prism/node.rb#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#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#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#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#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#17445 + 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) -> RestParameterNode + # + # 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#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#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#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#17472 + sig { returns(T.nilable(Symbol)) } + def name; end + + # attr_reader name_loc: Location? + # + # 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#17500 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#17488 + sig { returns(Prism::Location) } + def operator_loc; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17495 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17533 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#17468 + 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#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#17562 +class Prism::RetryNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [RetryNode] a new instance of RetryNode + # + # 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#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#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#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#17581 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> RetryNode + # + # 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#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#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#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 + # 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#17623 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17633 + def type; end + end +end + +# Represents the use of the `return` keyword. +# +# return 1 +# ^^^^^^^^ +# +# 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#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#17659 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # 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#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#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#17669 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?keyword_loc: Location, ?arguments: ArgumentsNode?, ?location: Location) -> ReturnNode + # + # 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#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#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#17709 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#17704 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#17694 + sig { returns(Prism::Location) } + def keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17735 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17745 + def type; end + end +end + +# Represents the `self` keyword. +# +# self +# ^^^^ +# +# 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#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#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#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#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#17781 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> SelfNode + # + # 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#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#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#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 + # 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#17823 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#17833 + def type; end + end +end + +# A module responsible for deserializing parse results. +# +# source://prism//lib/prism/serialize.rb#14 +module Prism::Serialize + class << self + # Deserialize the AST represented by the given string into a parse result. + # + # source://prism//lib/prism/serialize.rb#28 + def load(input, serialized); end + + # Deserialize the tokens represented by the given string into a parse + # result. + # + # source://prism//lib/prism/serialize.rb#40 + def load_tokens(source, serialized); end + end +end + +# source://prism//lib/prism/serialize.rb#44 +class Prism::Serialize::Loader + # @return [Loader] a new instance of Loader + # + # 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#77 + def constant_pool; end + + # Returns the value of attribute constant_pool_offset. + # + # source://prism//lib/prism/serialize.rb#77 + def constant_pool_offset; end + + # Returns the value of attribute encoding. + # + # source://prism//lib/prism/serialize.rb#76 + def encoding; end + + # Returns the value of attribute input. + # + # source://prism//lib/prism/serialize.rb#76 + def input; end + + # Returns the value of attribute io. + # + # source://prism//lib/prism/serialize.rb#76 + def io; end + + # source://prism//lib/prism/serialize.rb#118 + def load_comments; end + + # source://prism//lib/prism/serialize.rb#104 + def load_encoding; end + + # source://prism//lib/prism/serialize.rb#95 + def load_header; end + + # source://prism//lib/prism/serialize.rb#114 + def load_line_offsets; end + + # source://prism//lib/prism/serialize.rb#416 + def load_metadata; end + + # source://prism//lib/prism/serialize.rb#450 + def load_nodes; end + + # source://prism//lib/prism/serialize.rb#464 + def load_result; end + + # source://prism//lib/prism/serialize.rb#110 + def load_start_line; end + + # source://prism//lib/prism/serialize.rb#425 + def load_tokens; end + + # source://prism//lib/prism/serialize.rb#438 + def load_tokens_result; end + + # Returns the value of attribute serialized. + # + # source://prism//lib/prism/serialize.rb#76 + def serialized; end + + # Returns the value of attribute source. + # + # source://prism//lib/prism/serialize.rb#77 + def source; end + + # Returns the value of attribute start_line. + # + # source://prism//lib/prism/serialize.rb#78 + def start_line; end + + private + + # source://prism//lib/prism/serialize.rb#550 + def load_constant(index); end + + # 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#580 + def load_error_level; end + + # 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#538 + def load_location_object; end + + # source://prism//lib/prism/serialize.rb#609 + def load_node; end + + # source://prism//lib/prism/serialize.rb#575 + def load_optional_constant; end + + # source://prism//lib/prism/serialize.rb#542 + def load_optional_location; end + + # 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#571 + def load_required_constant; end + + # source://prism//lib/prism/serialize.rb#522 + def load_string; end + + # 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#473 + def load_varuint; end + + # 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#17 +Prism::Serialize::MAJOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The minor version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#21 +Prism::Serialize::MINOR_VERSION = T.let(T.unsafe(nil), Integer) + +# The patch version of prism that we are expecting to find in the serialized +# strings. +# +# source://prism//lib/prism/serialize.rb#25 +Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) + +# The token types that can be indexed by their enum values. +# +# source://prism//lib/prism/serialize.rb#1833 +Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified. +# +# C = { a: 1 } +# ^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#17849 +class Prism::ShareableConstantNode < ::Prism::Node + # def initialize: (Integer flags, ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode write, Location location) -> void + # + # @return [ShareableConstantNode] a new instance of ShareableConstantNode + # + # 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 + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism//lib/prism/node.rb#17954 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # 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#17865 + 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#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#17870 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, ?location: Location) -> ShareableConstantNode + # + # 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#17865 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#17888 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + # def experimental_copy?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#17910 + sig { returns(T::Boolean) } + def experimental_copy?; end + + # def experimental_everything?: () -> bool + # + # @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#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#18016 + sig { returns(T::Array[Symbol]) } + def locals; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#18051 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#18026 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18092 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18102 + def type; end + end +end + +# This represents a source of Ruby code that has been parsed. It is used in +# conjunction with locations to allow them to resolve line numbers and source +# ranges. +# +# source://prism//lib/prism/parse_result.rb#7 +class Prism::Source + # Create a new source object with the given source code. + # + # @return [Source] a new instance of Source + # + # source://prism//lib/prism/parse_result.rb#18 + 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#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#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#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 + # counting in code units for the given encoding. + # + # This method is tested with UTF-8, UTF-16, and UTF-32. If there is the + # concept of code units that differs from the number of characters in other + # encodings, it is not captured here. + # + # source://prism//lib/prism/parse_result.rb#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#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#38 + sig { params(byte_offset: Integer).returns(Integer) } + def line(byte_offset); end + + # Return the byte offset of the start of the line corresponding to the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#44 + sig { params(byte_offset: Integer).returns(Integer) } + def line_start(byte_offset); end + + # The list of newline byte offsets in the source code. + # + # source://prism//lib/prism/parse_result.rb#15 + sig { returns(T::Array[Integer]) } + def offsets; end + + # Perform a byteslice on the source code using the given byte offset and + # byte length. + # + # source://prism//lib/prism/parse_result.rb#32 + sig { params(byte_offset: Integer, length: Integer).returns(String) } + def slice(byte_offset, length); end + + # The source code that this source object represents. + # + # source://prism//lib/prism/parse_result.rb#9 + sig { returns(String) } + def source; end + + # The line number where this source starts. + # + # source://prism//lib/prism/parse_result.rb#12 + sig { returns(Integer) } + def start_line; end + + private + + # Binary search through the offsets to find the line number for the given + # byte offset. + # + # source://prism//lib/prism/parse_result.rb#84 + def find_line(byte_offset); end +end + +# Represents the use of the `__ENCODING__` keyword. +# +# __ENCODING__ +# ^^^^^^^^^^^^ +# +# 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#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#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#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#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#18143 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> SourceEncodingNode + # + # 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#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#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#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 + # 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#18185 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18195 + def type; end + end +end + +# Represents the use of the `__FILE__` keyword. +# +# __FILE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18210 +class Prism::SourceFileNode < ::Prism::Node + # def initialize: (Integer flags, String filepath, Location location) -> void + # + # @return [SourceFileNode] a new instance of SourceFileNode + # + # 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#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#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#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#18231 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?filepath: String, ?location: Location) -> SourceFileNode + # + # 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#18226 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, filepath: String, location: Location } + # + # 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 + + 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#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#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 + # 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#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. + # 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#18313 + def type; end + end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# 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#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#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#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#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#18349 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> SourceLineNode + # + # 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#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#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#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 + # 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#18391 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18401 + def type; end + end +end + +# Represents the use of the splat operator. +# +# [*a] +# ^^ +# +# source://prism//lib/prism/node.rb#18416 +class Prism::SplatNode < ::Prism::Node + # def initialize: (Location operator_loc, Prism::node? expression, Location location) -> void + # + # @return [SplatNode] a new instance of SplatNode + # + # 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#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#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#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#18437 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?operator_loc: Location, ?expression: Prism::node?, ?location: Location) -> SplatNode + # + # 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#18432 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Prism::node?, location: Location } + # + # 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: Prism::node? + # + # 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#18477 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#18472 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#18462 + sig { returns(Prism::Location) } + def operator_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18503 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18513 + def type; end + end +end + +# Represents a set of statements contained within some scope. +# +# foo; bar; baz +# ^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18530 +class Prism::StatementsNode < ::Prism::Node + # def initialize: (Array[Prism::node] body, Location location) -> void + # + # @return [StatementsNode] a new instance of StatementsNode + # + # 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#18540 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader body: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#18573 + sig { returns(T::Array[Prism::Node]) } + def body; end + + # def child_nodes: () -> Array[nil | 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#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#18550 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?body: Array[Prism::node], ?location: Location) -> StatementsNode + # + # 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#18545 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Prism::node], location: Location } + # + # 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#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 + # 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#18596 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18606 + def type; end + end +end + +# Flags for string nodes. +# +# source://prism//lib/prism/node.rb#20469 +module Prism::StringFlags; end + +# internal bytes forced the encoding to binary +# +# 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#20471 +Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# 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" +# ^^^^^ +# +# %w[foo] +# ^^^ +# +# "foo #{bar} baz" +# ^^^^ ^^^^ +# +# source://prism//lib/prism/node.rb#18629 +class Prism::StringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # def initialize: (Integer flags, Location? opening_loc, Location content_loc, Location? closing_loc, String unescaped, Location location) -> void + # + # @return [StringNode] a new instance of StringNode + # + # source://prism//lib/prism/node.rb#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#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#18648 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # 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#18700 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # 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#18653 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#18741 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#18693 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> StringNode + # + # 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#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#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#18721 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#18716 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # 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#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#18736 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # 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 + # 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#18776 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#18713 + sig { returns(String) } + def unescaped; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#18676 + 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#18786 + def type; end + end +end + +# Represents the use of the `super` keyword with parentheses or arguments. +# +# super() +# ^^^^^^^ +# +# super foo, bar +# ^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#18809 +class Prism::SuperNode < ::Prism::Node + # 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#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#18823 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#18879 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: Prism::node? + # + # 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#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#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#18833 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # 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#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#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: Prism::node?, location: Location } + # + # 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#18913 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#18898 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#18859 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # 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#18866 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # 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#18882 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18947 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#18957 + def type; end + end +end + +# Flags for symbol nodes. +# +# source://prism//lib/prism/node.rb#20484 +module Prism::SymbolFlags; end + +# internal bytes forced the encoding to binary +# +# 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#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#20486 +Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) + +# Represents a symbol literal or a symbol contained within a `%i` list. +# +# :foo +# ^^^^ +# +# %i[foo] +# ^^^ +# +# source://prism//lib/prism/node.rb#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#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#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#18999 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String? + # + # 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#19057 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # 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#19004 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> SymbolNode + # + # 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#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#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#19078 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_us_ascii_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#19083 + sig { returns(T::Boolean) } + def forced_us_ascii_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # 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#19103 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String? + # + # 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#19031 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19128 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#19070 + sig { returns(String) } + def unescaped; end + + # def value: () -> String? + # + # 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#19044 + sig { returns(T.nilable(Prism::Location)) } + def value_loc; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#19027 + 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#19138 + def type; end + end +end + +# This represents a token from the Ruby source. +# +# 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#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#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#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#575 + sig { returns(Prism::Location) } + def location; end + + # Implement the pretty print interface for Token. + # + # 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#556 + sig { returns(Symbol) } + def type; end + + # A byteslice of the source that this token represents. + # + # source://prism//lib/prism/parse_result.rb#559 + sig { returns(String) } + def value; end + + private + + # The Source object that represents the source this token came from. + # + # source://prism//lib/prism/parse_result.rb#552 + sig { returns(Prism::Source) } + def source; end +end + +# This module is responsible for converting the prism syntax tree into other +# syntax trees. +# +# source://prism//lib/prism/translation.rb#6 +module Prism::Translation; end + +# This class is the entry-point for converting a prism syntax tree into the +# whitequark/parser gem's syntax tree. It inherits from the base parser for +# the parser gem, and overrides the parse* methods to parse with prism and +# then translate. +# +# source://prism//lib/prism/translation/parser.rb#11 +class Prism::Translation::Parser < ::Parser::Base + # The default encoding for Ruby files is UTF-8. + # + # 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#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#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#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#100 + def try_declare_numparam(node); end + + # source://prism//lib/prism/translation/parser.rb#31 + sig { overridable.returns(Integer) } + def version; end + + # 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#258 + def build_ast(program, offset_cache); end + + # Build the parser gem comments from the prism comments. + # + # 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 + # offsets in characters. We need to handle this conversion in order to + # build the parser gem AST. + # + # If the bytesize of the source is the same as the length, then we can + # just use the offset directly. Otherwise, we build an array where the + # index is the byte offset and the value is the character offset. + # + # source://prism//lib/prism/translation/parser.rb#241 + def build_offset_cache(source); end + + # Build a range from a prism location. + # + # 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#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#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#219 + def unwrap(result, offset_cache); end + + # This is a hook to allow consumers to disable some errors if they don't + # want them to block creating the syntax tree. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/parser.rb#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 +# whitequark/parser gem's syntax tree. +# +# 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. + # + # @return [Compiler] a new instance of Compiler + # + # source://prism//lib/prism/translation/parser/compiler.rb#39 + def initialize(parser, offset_cache, forwarding: T.unsafe(nil), in_destructure: T.unsafe(nil), in_pattern: T.unsafe(nil)); end + + # The Parser::Builders::Default instance that is being used to build the + # AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#18 + def builder; end + + # The types of values that can be forwarded in the current scope. + # + # source://prism//lib/prism/translation/parser/compiler.rb#29 + def forwarding; end + + # Whether or not the current node is in a destructure. + # + # source://prism//lib/prism/translation/parser/compiler.rb#32 + def in_destructure; end + + # Whether or not the current node is in a pattern. + # + # source://prism//lib/prism/translation/parser/compiler.rb#35 + def in_pattern; end + + # The offset cache that is used to map between byte and character + # offsets in the file. + # + # source://prism//lib/prism/translation/parser/compiler.rb#26 + def offset_cache; end + + # The Parser::Base instance that is being used to build the AST. + # + # source://prism//lib/prism/translation/parser/compiler.rb#14 + def parser; end + + # The Parser::Source::Buffer instance that is holding a reference to the + # source code. + # + # source://prism//lib/prism/translation/parser/compiler.rb#22 + def source_buffer; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#58 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#52 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#64 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#70 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#101 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#76 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#82 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#107 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#148 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # 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#164 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # 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#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#213 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # 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#224 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#233 + def visit_break_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#319 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # 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#319 + def visit_call_operator_write_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # 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#346 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # 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#377 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # 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#390 + def visit_class_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # 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#419 + def visit_class_variable_operator_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # 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#403 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#437 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#409 + def visit_class_variable_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # 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#458 + def visit_constant_operator_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#458 + def visit_constant_or_write_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # 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#482 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#512 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # 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#530 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # 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#443 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#476 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#452 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#539 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # 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#598 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # 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#614 + def visit_embedded_variable_node(node); end + + # begin; foo; ensure; bar; end + # ^^^^^^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#620 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # 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#632 + def visit_find_pattern_node(node); end + + # 0..5 + # ^^^^ + # if foo .. bar; end + # ^^^^^^^^^^ + # + # 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#644 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # 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#668 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#674 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#683 + def visit_forwarding_super_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # 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#711 + def visit_global_variable_operator_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # 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#695 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#729 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # 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#735 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#745 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#763 + def visit_if_node(node); end + + # 1i + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#805 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#811 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # @raise [CompilationError] + # + # 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#823 + def visit_in_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # 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#849 + def visit_index_operator_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # 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#875 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^ + # ^^^^^^^^^^^^ + # + # 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#902 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^ + # ^^^^^^^^^^^^ + # + # 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#886 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#920 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # 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#926 + def visit_integer_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # 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#932 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # 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#1010 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # 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#1041 + def visit_keyword_hash_node(node); end + + # def foo(**bar); end + # ^^^^^ + # + # def foo(**); end + # ^^ + # + # 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#1059 + def visit_lambda_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # foo &&= bar + # ^^^^^^^^^^^ + # + # 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#1108 + def visit_local_variable_operator_write_node(node); end + + # foo += bar + # ^^^^^^^^^^ + # foo ||= bar + # ^^^^^^^^^^^ + # + # 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#1085 + def visit_local_variable_read_node(node); end + + # foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1126 + def visit_local_variable_target_node(node); end + + # foo = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1098 + def visit_local_variable_write_node(node); end + + # /foo/ + # ^^^^^ + # if /foo/ then end + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1398 + def visit_match_last_line_node(node); end + + # 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#1146 + def visit_match_required_node(node); end + + # /(?foo)/ =~ bar + # ^^^^^^^^^^^^^^^^^^^^ + # + # 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#1167 + def visit_missing_node(node); end + + # module Foo; end + # ^^^^^^^^^^^^^^^ + # + # 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#1184 + def visit_multi_target_node(node); end + + # foo, bar = baz + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1198 + def visit_multi_write_node(node); end + + # next + # ^^^^ + # + # next foo + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1219 + def visit_next_node(node); end + + # nil + # ^^^ + # + # 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#1237 + def visit_no_keywords_parameter_node(node); end + + # -> { _1 + _2 } + # ^^^^^^^^^^^^^^ + # + # 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#1253 + def visit_numbered_reference_read_node(node); end + + # def foo(bar: baz); end + # ^^^^^^^^ + # + # 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#1265 + def visit_optional_parameter_node(node); end + + # a or b + # ^^^^^^ + # + # 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#1277 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # 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#1326 + def visit_pinned_expression_node(node); end + + # foo = 1 and bar => ^foo + # ^^^^ + # + # 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#1338 + def visit_post_execution_node(node); end + + # BEGIN {} + # + # 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#1358 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1364 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1386 + def visit_rational_node(node); end + + # redo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1392 + def visit_redo_node(node); end + + # /foo/ + # ^^^^^ + # + # 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#1413 + def visit_required_keyword_parameter_node(node); end + + # def foo(bar); end + # ^^^ + # + # 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#1425 + def visit_rescue_modifier_node(node); end + + # begin; rescue; end + # ^^^^^^^ + # + # @raise [CompilationError] + # + # source://prism//lib/prism/translation/parser/compiler.rb#1443 + def visit_rescue_node(node); end + + # def foo(*bar); end + # ^^^^ + # + # def foo(*); end + # ^ + # + # 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#1458 + def visit_retry_node(node); end + + # return + # ^^^^^^ + # + # return 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1467 + def visit_return_node(node); end + + # self + # ^^^^ + # + # 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#1490 + def visit_singleton_class_node(node); end + + # __ENCODING__ + # ^^^^^^^^^^^^ + # + # 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#1508 + def visit_source_file_node(node); end + + # __LINE__ + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1514 + def visit_source_line_node(node); end + + # foo(*bar) + # ^^^^ + # + # def foo((bar, *baz)); end + # ^^^^ + # + # def foo(*); bar(*); end + # ^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1526 + def visit_splat_node(node); end + + # A list of statements. + # + # source://prism//lib/prism/translation/parser/compiler.rb#1539 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # 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#1586 + def visit_super_node(node); end + + # :foo + # ^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1609 + def visit_symbol_node(node); end + + # true + # ^^^^ + # + # 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#1647 + def visit_undef_node(node); end + + # unless foo; bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar unless foo + # ^^^^^^^^^^^^^^ + # + # 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#1686 + def visit_until_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1708 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1726 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1748 + def visit_x_string_node(node); end + + # yield + # ^^^^^ + # + # yield 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/parser/compiler.rb#1780 + def visit_yield_node(node); end + + private + + # Initialize a new compiler with the given option overrides, used to + # visit a subtree with the given options. + # + # source://prism//lib/prism/translation/parser/compiler.rb#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#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#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#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. Importantly it does not search past newlines or comments. + # + # Note that end_offset is allowed to be nil, in which case this will + # search until the end of the string. + # + # source://prism//lib/prism/translation/parser/compiler.rb#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#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#1888 + def token(location); end + + # Visit a block node on a call. + # + # 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#1927 + def visit_heredoc(node); end + + # Visit a numeric node and account for the optional sign. + # + # 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#1985 + def within_pattern; end +end + +# Raised when the tree is malformed or there is a bug in the compiler. +# +# source://prism//lib/prism/translation/parser/compiler.rb#10 +class Prism::Translation::Parser::Compiler::CompilationError < ::StandardError; end + +# Locations in the parser gem AST are generated using this class. We +# store a reference to its constant to make it slightly faster to look +# up. +# +# source://prism//lib/prism/translation/parser/compiler.rb#1860 +Prism::Translation::Parser::Compiler::Range = Parser::Source::Range + +# 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. +# +# source://prism//lib/prism/translation/parser/lexer.rb#8 +class Prism::Translation::Parser::Lexer + # Initialize the lexer with the given source buffer, prism tokens, and + # offset cache. + # + # @return [Lexer] a new instance of Lexer + # + # source://prism//lib/prism/translation/parser/lexer.rb#204 + def initialize(source_buffer, lexed, offset_cache); end + + # An array of tuples that contain prism tokens and their associated lex + # state when they were lexed. + # + # source://prism//lib/prism/translation/parser/lexer.rb#197 + def lexed; end + + # A hash that maps offsets in bytes to offsets in characters. + # + # 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#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#214 + def to_a; end + + private + + # Parse a complex from the string representation. + # + # 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#402 + def parse_rational(value); end +end + +# These constants represent flags in our lex state. We really, really +# don't want to be using them and we really, really don't want to be +# exposing them as part of our public API. Unfortunately, we don't have +# another way of matching the exact tokens that the parser gem expects +# without them. We should find another way to do this, but in the +# meantime we'll hide them from the documentation and mark them as +# private constants. +# +# source://prism//lib/prism/translation/parser/lexer.rb#187 +Prism::Translation::Parser::Lexer::EXPR_BEG = T.let(T.unsafe(nil), Integer) + +# source://prism//lib/prism/translation/parser/lexer.rb#188 +Prism::Translation::Parser::Lexer::EXPR_LABEL = T.let(T.unsafe(nil), Integer) + +# 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. +# +# source://prism//lib/prism/translation/parser/lexer.rb#10 +Prism::Translation::Parser::Lexer::TYPES = T.let(T.unsafe(nil), Hash) + +# The parser gem has a list of diagnostics with a hard-coded set of error +# messages. We create our own diagnostic class in order to set our own +# error messages. +# +# source://prism//lib/prism/translation/parser.rb#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) + +# This class provides a compatibility layer between prism and Ripper. It +# functions by parsing the entire tree first and then walking it and +# executing each of the Ripper callbacks as it goes. To use this class, you +# treat `Prism::Translation::Ripper` effectively as you would treat the +# `Ripper` class. +# +# Note that this class will serve the most common use cases, but Ripper's +# API is extensive and undocumented. It relies on reporting the state of the +# parser at any given time. We do our best to replicate that here, but +# because it is a different architecture it is not possible to perfectly +# replicate the behavior of Ripper. +# +# The main known difference is that we may omit dispatching some events in +# some cases. This impacts the following events: +# +# - on_assign_error +# - on_comma +# - on_ignored_nl +# - on_ignored_sp +# - on_kw +# - on_label_end +# - on_lbrace +# - on_lbracket +# - on_lparen +# - on_nl +# - on_op +# - on_operator_ambiguous +# - on_rbrace +# - on_rbracket +# - on_rparen +# - on_semicolon +# - on_sp +# - on_symbeg +# - on_tstring_beg +# - on_tstring_end +# +# source://prism//lib/prism/translation/ripper.rb#43 +class Prism::Translation::Ripper < ::Prism::Compiler + # Create a new Translation::Ripper object with the given source. + # + # @return [Ripper] a new instance of Ripper + # + # source://prism//lib/prism/translation/ripper.rb#444 + def initialize(source, filename = T.unsafe(nil), lineno = T.unsafe(nil)); end + + # The current column number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#441 + def column; end + + # True if the parser encountered an error during parsing. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#457 + sig { returns(T::Boolean) } + def error?; end + + # The filename of the source being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#435 + def filename; end + + # The current line number of the parser. + # + # source://prism//lib/prism/translation/ripper.rb#438 + def lineno; end + + # Parse the source and return the result. + # + # source://prism//lib/prism/translation/ripper.rb#462 + sig { returns(T.nilable(Result)) } + def parse; end + + # The source that is being parsed. + # + # source://prism//lib/prism/translation/ripper.rb#432 + def source; end + + # alias $foo $bar + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#561 + def visit_alias_global_variable_node(node); end + + # alias foo bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#551 + def visit_alias_method_node(node); end + + # foo => bar | baz + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#585 + def visit_alternation_pattern_node(node); end + + # a and b + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#605 + def visit_and_node(node); end + + # foo(bar) + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#796 + def visit_arguments_node(node); end + + # [] + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#615 + def visit_array_node(node); end + + # foo => [bar] + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#775 + def visit_array_pattern_node(node); end + + # { a: 1 } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#803 + def visit_assoc_node(node); end + + # def foo(**); bar(**); end + # ^^ + # + # { **foo } + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#816 + def visit_assoc_splat_node(node); end + + # $+ + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#825 + def visit_back_reference_read_node(node); end + + # begin end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#832 + def visit_begin_node(node); end + + # foo(&bar) + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#896 + def visit_block_argument_node(node); end + + # foo { |; bar| } + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#902 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode. + # + # source://prism//lib/prism/translation/ripper.rb#908 + def visit_block_node(node); end + + # def foo(&bar); end + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#944 + def visit_block_parameter_node(node); end + + # A block's parameters. + # + # source://prism//lib/prism/translation/ripper.rb#958 + def visit_block_parameters_node(node); end + + # break + # ^^^^^ + # + # break foo + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#982 + def visit_break_node(node); end + + # foo.bar &&= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1194 + def visit_call_and_write_node(node); end + + # foo + # ^^^ + # + # foo.bar + # ^^^^^^^ + # + # foo.bar() {} + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1002 + def visit_call_node(node); end + + # foo.bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1172 + def visit_call_operator_write_node(node); end + + # foo.bar ||= baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1216 + def visit_call_or_write_node(node); end + + # foo.bar, = 1 + # ^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1238 + def visit_call_target_node(node); end + + # foo => bar => baz + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1263 + def visit_capture_pattern_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1286 + def visit_case_match_node(node); end + + # case foo; when bar; end + # ^^^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1273 + def visit_case_node(node); end + + # class Foo; end + # ^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1299 + def visit_class_node(node); end + + # @@foo &&= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1352 + def visit_class_variable_and_write_node(node); end + + # @@foo += bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1338 + def visit_class_variable_operator_write_node(node); end + + # @@foo ||= bar + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1366 + def visit_class_variable_or_write_node(node); end + + # @@foo + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1317 + def visit_class_variable_read_node(node); end + + # @@foo, = bar + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1380 + def visit_class_variable_target_node(node); end + + # @@foo = 1 + # ^^^^^^^^^ + # + # @@foo, @@bar = 1 + # ^^^^^ ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1327 + def visit_class_variable_write_node(node); end + + # Foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1422 + def visit_constant_and_write_node(node); end + + # Foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1408 + def visit_constant_operator_write_node(node); end + + # Foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1436 + def visit_constant_or_write_node(node); end + + # Foo::Bar &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1523 + def visit_constant_path_and_write_node(node); end + + # Foo::Bar + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1457 + def visit_constant_path_node(node); end + + # Foo::Bar += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1509 + def visit_constant_path_operator_write_node(node); end + + # Foo::Bar ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1537 + def visit_constant_path_or_write_node(node); end + + # Foo::Bar, = baz + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1551 + def visit_constant_path_target_node(node); end + + # Foo::Bar = 1 + # ^^^^^^^^^^^^ + # + # Foo::Foo, Bar::Bar = 1 + # ^^^^^^^^ ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1480 + def visit_constant_path_write_node(node); end + + # Foo + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1387 + def visit_constant_read_node(node); end + + # Foo, = bar + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1450 + def visit_constant_target_node(node); end + + # Foo = 1 + # ^^^^^^^ + # + # Foo, Bar = 1 + # ^^^ ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1397 + def visit_constant_write_node(node); end + + # def foo; end + # ^^^^^^^^^^^^ + # + # def self.foo; end + # ^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1560 + def visit_def_node(node); end + + # defined? a + # ^^^^^^^^^^ + # + # defined?(a) + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1607 + def visit_defined_node(node); end + + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1614 + def visit_else_node(node); end + + # "foo #{bar}" + # ^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1630 + def visit_embedded_statements_node(node); end + + # "foo #@bar" + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1651 + def visit_embedded_variable_node(node); end + + # Visit an EnsureNode node. + # + # source://prism//lib/prism/translation/ripper.rb#1662 + def visit_ensure_node(node); end + + # false + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1680 + def visit_false_node(node); end + + # foo => [*, bar, *] + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1687 + def visit_find_pattern_node(node); end + + # if foo .. bar; end + # ^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1712 + def visit_flip_flop_node(node); end + + # 1.0 + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1726 + def visit_float_node(node); end + + # for foo in bar do end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1732 + def visit_for_node(node); end + + # def foo(...); bar(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1749 + def visit_forwarding_arguments_node(node); end + + # def foo(...); end + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1756 + def visit_forwarding_parameter_node(node); end + + # super + # ^^^^^ + # + # super {} + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1766 + def visit_forwarding_super_node(node); end + + # $foo &&= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1815 + def visit_global_variable_and_write_node(node); end + + # $foo += bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1801 + def visit_global_variable_operator_write_node(node); end + + # $foo ||= bar + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1829 + def visit_global_variable_or_write_node(node); end + + # $foo + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1780 + def visit_global_variable_read_node(node); end + + # $foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1843 + def visit_global_variable_target_node(node); end + + # $foo = 1 + # ^^^^^^^^ + # + # $foo, $bar = 1 + # ^^^^ ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1790 + def visit_global_variable_write_node(node); end + + # {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1850 + def visit_hash_node(node); end + + # foo => {} + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1865 + def visit_hash_pattern_node(node); end + + # if foo then bar end + # ^^^^^^^^^^^^^^^^^^^ + # + # bar if foo + # ^^^^^^^^^^ + # + # foo ? bar : baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1907 + def visit_if_node(node); end + + # 1i + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#1943 + def visit_imaginary_node(node); end + + # { foo: } + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1949 + def visit_implicit_node(node); end + + # foo { |bar,| } + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#1954 + def visit_implicit_rest_node(node); end + + # case foo; in bar; end + # ^^^^^^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1961 + def visit_in_node(node); end + + # foo[bar] &&= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1996 + def visit_index_and_write_node(node); end + + # foo[bar] += baz + # ^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#1979 + def visit_index_operator_write_node(node); end + + # foo[bar] ||= baz + # ^^^^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2013 + def visit_index_or_write_node(node); end + + # foo[bar], = 1 + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2030 + def visit_index_target_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2072 + def visit_instance_variable_and_write_node(node); end + + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2058 + def visit_instance_variable_operator_write_node(node); end + + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2086 + def visit_instance_variable_or_write_node(node); end + + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2040 + def visit_instance_variable_read_node(node); end + + # @foo, = bar + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2100 + def visit_instance_variable_target_node(node); end + + # ^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2047 + def visit_instance_variable_write_node(node); end + + # 1 + # ^ + # + # source://prism//lib/prism/translation/ripper.rb#2107 + def visit_integer_node(node); end + + # if /foo #{bar}/ then end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2113 + def visit_interpolated_match_last_line_node(node); end + + # /foo #{bar}/ + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2132 + def visit_interpolated_regular_expression_node(node); end + + # "foo #{bar}" + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2151 + def visit_interpolated_string_node(node); end + + # :"foo #{bar}" + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2179 + def visit_interpolated_symbol_node(node); end + + # `foo #{bar}` + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2192 + def visit_interpolated_x_string_node(node); end + + # -> { it } + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2222 + def visit_it_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 + + # foo ||= bar + # ^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2364 + def visit_local_variable_or_write_node(node); end + + # foo + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2313 + def visit_local_variable_read_node(node); end + + # 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#2325 + def visit_local_variable_write_node(node); end + + # 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#2583 + def visit_or_node(node); end + + # def foo(bar, *baz); end + # ^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2593 + def visit_parameters_node(node); end + + # () + # ^^ + # + # (1) + # ^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2620 + def visit_parentheses_node(node); end + + # 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#2678 + def visit_program_node(node); end + + # 0..5 + # ^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2689 + def visit_range_node(node); end + + # 1r + # ^^ + # + # source://prism//lib/prism/translation/ripper.rb#2703 + def visit_rational_node(node); end + + # 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#2745 + def visit_required_parameter_node(node); end + + # 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#2762 + def visit_rescue_node(node); end + + # 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#2910 + def visit_statements_node(node); end + + # "foo" + # ^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#2927 + def visit_string_node(node); end + + # 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#3175 + def visit_when_node(node); end + + # while foo; bar end + # ^^^^^^^^^^^^^^^^^^ + # + # bar while foo + # ^^^^^^^^^^^^^ + # + # source://prism//lib/prism/translation/ripper.rb#3196 + def visit_while_node(node); end + + # `foo` + # ^^^^^ + # + # 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 + + # :stopdoc: + # + # source://prism//lib/prism/translation/ripper.rb#3383 + def _dispatch_0; end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def _dispatch_1(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def _dispatch_2(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def _dispatch_3(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def _dispatch_4(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def _dispatch_5(_, _, _, _, _); 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. + # + # 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#3373 + def bounds(location); end + + # Returns true if the given node is a command node. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#1163 + def command?(node); end + + # This method is called when the parser found syntax error. + # + # source://prism//lib/prism/translation/ripper.rb#3411 + def compile_error(msg); end + + # This method is provided by the Ripper C extension. It is called when a + # string needs to be dedented because of a tilde heredoc. It is expected + # that it will modify the string in place and return the number of bytes + # that were removed. + # + # source://prism//lib/prism/translation/ripper.rb#3426 + def dedent_string(string, width); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_BEGIN(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_CHAR(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_END(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on___end__(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_alias(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_alias_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_aref(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_aref_field(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_arg_ambiguous(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_arg_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_args_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_args_add_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_args_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_args_forward; end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_array(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_aryptn(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_assign(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_assign_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_assoc_new(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_assoc_splat(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_assoclist_from_args(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_backref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_backtick(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_bare_assoc_hash(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_begin(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_binary(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_block_var(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_blockarg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_bodystmt(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_brace_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_break(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_call(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_case(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_class(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_class_name_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_comma(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_command(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_command_call(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_comment(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_const(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_const_path_field(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_const_path_ref(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_const_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_cvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_def(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_defined(_); end + + # source://prism//lib/prism/translation/ripper.rb#3388 + def on_defs(_, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_do_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_dot2(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_dot3(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_dyna_symbol(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_else(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_elsif(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_embdoc(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_embdoc_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_embdoc_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_embexpr_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_embexpr_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_embvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_ensure(_); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_excessed_comma; end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_fcall(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_field(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_float(_); end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_fndptn(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_for(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_gvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_hash(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_heredoc_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_heredoc_dedent(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_heredoc_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_hshptn(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_ident(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_if(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_if_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_ifop(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_ignored_nl(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_ignored_sp(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_imaginary(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_in(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_int(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_ivar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_kw(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_kwrest_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_label(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_label_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_lambda(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_lbrace(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_lbracket(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_lparen(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_magic_comment(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_massign(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_method_add_arg(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_method_add_block(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_mlhs_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_mlhs_add_post(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_mlhs_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_mlhs_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_module(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_mrhs_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_mrhs_add_star(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_mrhs_new_from_args(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_next(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_nl(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_nokw_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_op(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_opassign(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_operator_ambiguous(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_param_error(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3389 + def on_params(_, _, _, _, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_paren(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_parse_error(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_period(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_program(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_qsymbols_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_qsymbols_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_qwords_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_qwords_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_rational(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_rbrace(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_rbracket(_); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_redo; end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_regexp_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_regexp_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_regexp_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_regexp_literal(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper.rb#3387 + def on_rescue(_, _, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_rescue_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_rest_param(_); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_retry; end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_return(_); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_return0; end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_rparen(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_sclass(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_semicolon(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_sp(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_stmts_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_string_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_string_concat(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_string_content; end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_string_dvar(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_string_embexpr(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_string_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_super(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_symbeg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_symbol(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_symbol_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_symbols_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_symbols_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_tlambda(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_tlambeg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_top_const_field(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_top_const_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_tstring_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_tstring_content(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_tstring_end(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_unary(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_undef(_); end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_unless(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_unless_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_until(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_until_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_var_alias(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_var_field(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_var_ref(_); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_vcall(_); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_void_stmt; end + + # source://prism//lib/prism/translation/ripper.rb#3386 + def on_when(_, _, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_while(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_while_mod(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_word_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_words_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_words_beg(_); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_words_sep(_); end + + # source://prism//lib/prism/translation/ripper.rb#3385 + def on_xstring_add(_, _); end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_xstring_literal(_); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_xstring_new; end + + # source://prism//lib/prism/translation/ripper.rb#3384 + def on_yield(_); end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_yield0; end + + # source://prism//lib/prism/translation/ripper.rb#3383 + def on_zsuper; end + + # Lazily initialize the parse result. + # + # source://prism//lib/prism/translation/ripper.rb#3269 + def result; end + + # Returns true if there is a comma between the two locations. + # + # @return [Boolean] + # + # source://prism//lib/prism/translation/ripper.rb#3278 + def trailing_comma?(left, right); end + + # Visit one side of an alias global variable node. + # + # source://prism//lib/prism/translation/ripper.rb#570 + def visit_alias_global_variable_node_value(node); end + + # Visit a list of elements, like the elements of an array or arguments. + # + # source://prism//lib/prism/translation/ripper.rb#756 + def visit_arguments(elements); end + + # Visit the clauses of a begin node to form an on_bodystmt call. + # + # source://prism//lib/prism/translation/ripper.rb#840 + def visit_begin_node_clauses(location, node, allow_newline); end + + # Visit the body of a structure that can have either a set of statements + # or statements wrapped in rescue/else/ensure. + # + # source://prism//lib/prism/translation/ripper.rb#875 + def visit_body_node(location, node, allow_newline = T.unsafe(nil)); end + + # Visit the arguments and block of a call node and return the arguments + # and block as they should be used. + # + # source://prism//lib/prism/translation/ripper.rb#1136 + def visit_call_node_arguments(arguments_node, block_node, trailing_comma); end + + # Visit a constant path that is part of a write node. + # + # source://prism//lib/prism/translation/ripper.rb#1489 + def visit_constant_path_write_node_target(node); end + + # Visit a destructured positional parameter node. + # + # source://prism//lib/prism/translation/ripper.rb#2607 + def visit_destructured_parameter_node(node); end + + # Visit a string that is expressed using a <<~ heredoc. + # + # 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#3317 + def visit_number_node(node); end + + # Visit a pattern within a pattern match. This is used to bypass the + # parenthesis node that can be used to wrap patterns. + # + # source://prism//lib/prism/translation/ripper.rb#595 + def visit_pattern_node(node); end + + # Visit the list of statements of a statements node. We support nil + # statements in the list. This would normally not be allowed by the + # structure of the prism parse tree, but we manually add them here so that + # we can mirror Ripper's void stmt. + # + # source://prism//lib/prism/translation/ripper.rb#2919 + def visit_statements_node_body(body); end + + # Visit an individual part of a string-like node. + # + # source://prism//lib/prism/translation/ripper.rb#2211 + def visit_string_content(part); end + + # Visit the string content of a particular node. This method is used to + # split into the various token types. + # + # source://prism//lib/prism/translation/ripper.rb#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 + +# A list of all of the Ruby binary operators. +# +# source://prism//lib/prism/translation/ripper.rb#337 +Prism::Translation::Ripper::BINARY_OPERATORS = T.let(T.unsafe(nil), Array) + +# This array contains name of all ripper events. +# +# source://prism//lib/prism/translation/ripper.rb#289 +Prism::Translation::Ripper::EVENTS = T.let(T.unsafe(nil), Array) + +# A list of all of the Ruby keywords. +# +# source://prism//lib/prism/translation/ripper.rb#292 +Prism::Translation::Ripper::KEYWORDS = T.let(T.unsafe(nil), Array) + +# This array contains name of parser events. +# +# source://prism//lib/prism/translation/ripper.rb#283 +Prism::Translation::Ripper::PARSER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the parser events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#84 +Prism::Translation::Ripper::PARSER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This array contains name of scanner events. +# +# source://prism//lib/prism/translation/ripper.rb#286 +Prism::Translation::Ripper::SCANNER_EVENTS = T.let(T.unsafe(nil), Array) + +# This contains a table of all of the scanner events and their +# corresponding arity. +# +# source://prism//lib/prism/translation/ripper.rb#227 +Prism::Translation::Ripper::SCANNER_EVENT_TABLE = T.let(T.unsafe(nil), Hash) + +# This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that +# returns the arrays of [type, *children]. +# +# source://prism//lib/prism/translation/ripper/sexp.rb#10 +class Prism::Translation::Ripper::SexpBuilder < ::Prism::Translation::Ripper + 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/sexp.rb#47 + def on_BEGIN(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_CHAR(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_END(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on___end__(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_alias(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_alias_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aref_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_arg_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_arg_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_forward(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_args_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_array(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_aryptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assign_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoc_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoc_splat(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_assoclist_from_args(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backref(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_backtick(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_bare_assoc_hash(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_begin(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_binary(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_block_var(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_blockarg(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_bodystmt(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_brace_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_break(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_call(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_case(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_class(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_class_name_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comma(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_command(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_command_call(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_comment(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_const(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_path_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_path_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_cvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_def(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_defined(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_defs(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_do_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dot2(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dot3(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_dyna_symbol(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_else(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_elsif(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embdoc_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embexpr_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_embvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_ensure(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_excessed_comma(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_fcall(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_float(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_fndptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_for(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_gvar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_hash(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_heredoc_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_hshptn(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ident(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_if(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_if_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_ifop(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_nl(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ignored_sp(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_imaginary(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_in(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_int(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_ivar(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_kw(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_kwrest_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_label_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_lambda(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbrace(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lbracket(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_lparen(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_magic_comment(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_massign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_method_add_arg(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_method_add_block(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add_post(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mlhs_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_module(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_add_star(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_mrhs_new_from_args(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_next(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_nl(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_nokw_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_op(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_opassign(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_operator_ambiguous(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_param_error(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_params(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_paren(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_period(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_program(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qsymbols_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qsymbols_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qsymbols_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qwords_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_qwords_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_qwords_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rational(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbrace(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rbracket(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_redo(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_regexp_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_regexp_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rescue(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rescue_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_rest_param(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_retry(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_return(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_return0(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_rparen(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_sclass(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_semicolon(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_sp(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_stmts_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_stmts_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_concat(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_content(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_dvar(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_embexpr(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_string_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_super(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbeg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbol(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbol_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbols_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_symbols_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_symbols_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambda(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tlambeg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_top_const_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_top_const_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_content(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_tstring_end(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unary(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_undef(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unless(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_unless_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_until(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_until_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_alias(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_field(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_var_ref(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_vcall(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_void_stmt(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_when(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_while(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_while_mod(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_word_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_word_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_words_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_beg(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_words_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#55 + def on_words_sep(tok); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_add(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_literal(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_xstring_new(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_yield(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_yield0(*args); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#47 + def on_zsuper(*args); end + + private + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def compile_error(mesg); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#17 + def dedent_element(e, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def on_error(mesg); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#24 + def on_heredoc_dedent(val, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#61 + def on_parse_error(mesg); end +end + +# This class mirrors the ::Ripper::SexpBuilderPP subclass of ::Ripper that +# returns the same values as ::Ripper::SexpBuilder except with a couple of +# niceties that flatten linked lists into arrays. +# +# source://prism//lib/prism/translation/ripper/sexp.rb#74 +class Prism::Translation::Ripper::SexpBuilderPP < ::Prism::Translation::Ripper::SexpBuilder + Result = type_member { { fixed: T::Array[T.untyped] } } + + private + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def _dispatch_event_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def _dispatch_event_push(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_args_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_args_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#79 + def on_heredoc_dedent(val, width); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_mlhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#109 + def on_mlhs_add_post(list, post); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#105 + def on_mlhs_add_star(list, star); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_mlhs_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#101 + def on_mlhs_paren(list); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_mrhs_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_mrhs_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_qsymbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_qsymbols_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_qwords_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_qwords_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_regexp_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_regexp_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_stmts_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_stmts_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_string_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_symbols_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_symbols_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_word_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_word_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_words_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_words_new; end + + # source://prism//lib/prism/translation/ripper/sexp.rb#96 + def on_xstring_add(list, item); end + + # source://prism//lib/prism/translation/ripper/sexp.rb#92 + def on_xstring_new; end +end + +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#19158 +class Prism::TrueNode < ::Prism::Node + # def initialize: (Location location) -> void + # + # @return [TrueNode] a new instance of TrueNode + # + # 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#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#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#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#19177 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?location: Location) -> TrueNode + # + # 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#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#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#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 + # 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#19219 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19229 + def type; end + end +end + +# Represents the use of the `undef` keyword. +# +# undef :foo, :bar, :baz +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#19244 +class Prism::UndefNode < ::Prism::Node + # 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#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#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#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#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#19265 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location, ?location: Location) -> UndefNode + # + # 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#19260 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location, location: Location } + # + # 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#19303 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#19298 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#19291 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] + # + # 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 + # 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#19324 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19334 + def type; end + end +end + +# Represents the use of the `unless` keyword, either in the block form or the modifier form. +# +# bar unless foo +# ^^^^^^^^^^^^^^ +# +# unless foo then bar end +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#19355 +class Prism::UnlessNode < ::Prism::Node + # 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#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#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#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#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#19384 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # The else clause of the unless expression, if present. + # + # unless cond then bar else baz end + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#19457 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # 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#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#19379 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#19486 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # The location of the `end` keyword, if present. + # + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#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#19491 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#19476 + sig { returns(String) } + def keyword; end + + # The location of the `unless` keyword. + # + # unless cond then bar end + # ^^^^^^ + # + # bar unless cond + # ^^^^^^ + # + # source://prism//lib/prism/node.rb#19417 + sig { returns(Prism::Location) } + def keyword_loc; end + + # The condition to be evaluated for the unless expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # unless cond then bar end + # ^^^^ + # + # bar unless cond + # ^^^^ + # + # source://prism//lib/prism/node.rb#19430 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#19374 + def set_newline_flag(newline_marked); end + + # The body of statements that will executed if the unless condition is + # falsey. Will be `nil` if no body is provided. + # + # unless cond then bar end + # ^^^ + # + # source://prism//lib/prism/node.rb#19451 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#19481 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # The location of the `then` keyword, if present. + # unless cond then bar end ^^^^ + # + # source://prism//lib/prism/node.rb#19434 + sig { returns(T.nilable(Prism::Location)) } + def then_keyword_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19527 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19537 + def type; end + end +end + +# Represents the use of the `until` keyword, either in the block form or the modifier form. +# +# bar until foo +# ^^^^^^^^^^^^^ +# +# until foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#19561 +class Prism::UntilNode < ::Prism::Node + # 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#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#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#19645 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | 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#19655 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # 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#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#19589 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> UntilNode + # + # 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#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: Prism::node, statements: StatementsNode?, location: Location } + # + # 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#19660 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#19650 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#19619 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader predicate: Prism::node + # + # source://prism//lib/prism/node.rb#19639 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#19579 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#19642 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19691 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#19615 + 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#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 +# subset of the tree, while still walking the whole tree. +# +# For example, to find all of the method calls that call the `foo` method, you +# could write: +# +# class FooCalls < Prism::Visitor +# def visit_call_node(node) +# if node.name == "foo" +# # Do something with the node +# end +# +# # Call super so that the visitor continues walking the tree +# super +# end +# end +# +# source://prism//lib/prism/visitor.rb#54 +class Prism::Visitor < ::Prism::BasicVisitor + # Visit a AliasGlobalVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # Visit a AliasMethodNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # Visit a AlternationPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # Visit a AndNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AndNode).void } + def visit_and_node(node); end + + # Visit a ArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # Visit a ArrayNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ArrayNode).void } + def visit_array_node(node); end + + # Visit a ArrayPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # Visit a AssocNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AssocNode).void } + def visit_assoc_node(node); end + + # Visit a AssocSplatNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # Visit a BackReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # Visit a BeginNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BeginNode).void } + def visit_begin_node(node); end + + # Visit a BlockArgumentNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockNode).void } + def visit_block_node(node); end + + # Visit a BlockParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # Visit a BreakNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::BreakNode).void } + def visit_break_node(node); end + + # Visit a CallAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # Visit a CallNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallNode).void } + def visit_call_node(node); end + + # Visit a CallOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # Visit a CallOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # Visit a CallTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # Visit a CapturePatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # Visit a CaseMatchNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # Visit a CaseNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::CaseNode).void } + def visit_case_node(node); end + + # Visit a ClassNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassNode).void } + def visit_class_node(node); end + + # Visit a ClassVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # Visit a ClassVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # Visit a ClassVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # Visit a ClassVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # Visit a ClassVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # Visit a DefNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::DefNode).void } + def visit_def_node(node); end + + # Visit a DefinedNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::DefinedNode).void } + def visit_defined_node(node); end + + # Visit a ElseNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ElseNode).void } + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # Visit a FalseNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FalseNode).void } + def visit_false_node(node); end + + # Visit a FindPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # Visit a FloatNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::FloatNode).void } + def visit_float_node(node); end + + # Visit a ForNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForNode).void } + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # Visit a HashNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::HashNode).void } + def visit_hash_node(node); end + + # Visit a HashPatternNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # Visit a IfNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IfNode).void } + def visit_if_node(node); end + + # Visit a ImaginaryNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # Visit a ImplicitRestNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # Visit a InNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InNode).void } + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # Visit a IndexTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # Visit a InstanceVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::IntegerNode).void } + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # Visit a ItParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ItParametersNode).void } + def visit_it_parameters_node(node); end + + # Visit a KeywordHashNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # Visit a MissingNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MissingNode).void } + def visit_missing_node(node); end + + # Visit a ModuleNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ModuleNode).void } + def visit_module_node(node); end + + # Visit a MultiTargetNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # Visit a NextNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NextNode).void } + def visit_next_node(node); end + + # Visit a NilNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NilNode).void } + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end + + # Visit a NumberedReferenceReadNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # Visit a OrNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::OrNode).void } + def visit_or_node(node); end + + # Visit a ParametersNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ProgramNode).void } + def visit_program_node(node); end + + # Visit a RangeNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RangeNode).void } + def visit_range_node(node); end + + # Visit a RationalNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RationalNode).void } + def visit_rational_node(node); end + + # Visit a RedoNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RedoNode).void } + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RescueNode).void } + def visit_rescue_node(node); end + + # Visit a RestParameterNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::RetryNode).void } + def visit_retry_node(node); end + + # Visit a ReturnNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ReturnNode).void } + def visit_return_node(node); end + + # Visit a SelfNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SelfNode).void } + def visit_self_node(node); end + + # Visit a ShareableConstantNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::ShareableConstantNode).void } + def visit_shareable_constant_node(node); end + + # Visit a SingletonClassNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # Visit a SourceLineNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # Visit a SplatNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SplatNode).void } + def visit_splat_node(node); end + + # Visit a StatementsNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::StatementsNode).void } + def visit_statements_node(node); end + + # Visit a StringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::StringNode).void } + def visit_string_node(node); end + + # Visit a SuperNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SuperNode).void } + def visit_super_node(node); end + + # Visit a SymbolNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # Visit a TrueNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::TrueNode).void } + def visit_true_node(node); end + + # Visit a UndefNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::UndefNode).void } + def visit_undef_node(node); end + + # Visit a UnlessNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::UnlessNode).void } + def visit_unless_node(node); end + + # Visit a UntilNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::UntilNode).void } + def visit_until_node(node); end + + # Visit a WhenNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::WhenNode).void } + def visit_when_node(node); end + + # Visit a WhileNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::WhileNode).void } + def visit_while_node(node); end + + # Visit a XStringNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::XStringNode).void } + def visit_x_string_node(node); end + + # Visit a YieldNode node + # + # source://prism//lib/prism/visitor.rb#29 + sig { params(node: Prism::YieldNode).void } + def visit_yield_node(node); end +end + +# Represents the use of the `when` keyword within a case statement. +# +# case true +# when true +# ^^^^^^^^^ +# end +# +# source://prism//lib/prism/node.rb#19723 +class Prism::WhenNode < ::Prism::Node + # 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#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#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#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#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#19746 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # attr_reader conditions: Array[Prism::node] + # + # source://prism//lib/prism/node.rb#19779 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # def copy: (?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?location: Location) -> WhenNode + # + # 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#19741 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # 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#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#19808 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#19798 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # 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#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 + # 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#19836 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19846 + def type; end + end +end + +# Represents the use of the `while` keyword, either in the block form or the modifier form. +# +# bar while foo +# ^^^^^^^^^^^^^ +# +# while foo do bar end +# ^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#19869 +class Prism::WhileNode < ::Prism::Node + # 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#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#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#19953 + sig { returns(T::Boolean) } + def begin_modifier?; end + + # def child_nodes: () -> Array[nil | 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#19963 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # 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#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#19897 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> WhileNode + # + # 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#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: Prism::node, statements: StatementsNode?, location: Location } + # + # 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#19968 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#19958 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#19927 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader predicate: Prism::node + # + # source://prism//lib/prism/node.rb#19947 + sig { returns(Prism::Node) } + def predicate; end + + # source://prism//lib/prism/node.rb#19887 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#19950 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#19999 + sig { override.returns(Symbol) } + def type; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#19923 + 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#20009 + def type; end + end +end + +# Represents an xstring literal with no interpolation. +# +# `foo` +# ^^^^^ +# +# source://prism//lib/prism/node.rb#20029 +class Prism::XStringNode < ::Prism::Node + include ::Prism::HeredocQuery + + # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # + # @return [XStringNode] a new instance of XStringNode + # + # source://prism//lib/prism/node.rb#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#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#20048 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#20124 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # 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#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#20053 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def content: () -> String + # + # source://prism//lib/prism/node.rb#20119 + sig { returns(String) } + def content; end + + # attr_reader content_loc: Location + # + # source://prism//lib/prism/node.rb#20087 + sig { returns(Prism::Location) } + def content_loc; end + + # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> XStringNode + # + # 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#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#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#20109 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # 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#20129 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#20114 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # 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 + # 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#20154 + sig { override.returns(Symbol) } + def type; end + + # attr_reader unescaped: String + # + # source://prism//lib/prism/node.rb#20101 + sig { returns(String) } + def unescaped; end + + protected + + # protected attr_reader flags: Integer + # + # source://prism//lib/prism/node.rb#20076 + 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#20164 + def type; end + end +end + +# Represents the use of the `yield` keyword. +# +# yield 1 +# ^^^^^^^ +# +# 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#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#20197 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # 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#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#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#20207 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?location: Location) -> YieldNode + # + # 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#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#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#20283 + sig { params(inspector: T.untyped).returns(String) } + def inspect(inspector = T.unsafe(nil)); end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#20268 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#20232 + sig { returns(Prism::Location) } + def keyword_loc; end + + # def lparen: () -> String? + # + # 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#20239 + sig { returns(T.nilable(Prism::Location)) } + def lparen_loc; end + + # def rparen: () -> String? + # + # 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#20255 + sig { returns(T.nilable(Prism::Location)) } + def rparen_loc; end + + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#20311 + sig { override.returns(Symbol) } + def type; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#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/rake@13.1.0.rbi b/sorbet/rbi/gems/rake@13.2.1.rbi similarity index 97% rename from sorbet/rbi/gems/rake@13.1.0.rbi rename to sorbet/rbi/gems/rake@13.2.1.rbi index f1286717..ede46d39 100644 --- a/sorbet/rbi/gems/rake@13.1.0.rbi +++ b/sorbet/rbi/gems/rake@13.2.1.rbi @@ -8,7 +8,7 @@ # # Some top level Constants. # -# source://rake//lib/rake.rb#70 +# source://rake//lib/rake.rb#69 FileList = Rake::FileList # -- @@ -195,7 +195,7 @@ class Rake::Application # Add a file to the list of files to be imported. # - # source://rake//lib/rake/application.rb#801 + # source://rake//lib/rake/application.rb#807 def add_import(fn); end # Add a loader to handle imported files ending in the extension @@ -213,13 +213,13 @@ class Rake::Application # recognised command-line options, which OptionParser.parse will # have taken care of already. # - # source://rake//lib/rake/application.rb#782 + # source://rake//lib/rake/application.rb#788 def collect_command_line_tasks(args); end # Default task name ("default"). # (May be overridden by subclasses) # - # source://rake//lib/rake/application.rb#796 + # source://rake//lib/rake/application.rb#802 def default_task_name; end # Warn about deprecated usage. @@ -227,75 +227,75 @@ class Rake::Application # Example: # Rake.application.deprecate("import", "Rake.import", caller.first) # - # source://rake//lib/rake/application.rb#282 + # source://rake//lib/rake/application.rb#288 def deprecate(old_usage, new_usage, call_site); end - # source://rake//lib/rake/application.rb#244 + # source://rake//lib/rake/application.rb#250 def display_cause_details(ex); end # Display the error message that caused the exception. # - # source://rake//lib/rake/application.rb#228 + # source://rake//lib/rake/application.rb#234 def display_error_message(ex); end - # source://rake//lib/rake/application.rb#269 + # source://rake//lib/rake/application.rb#275 def display_exception_backtrace(ex); end - # source://rake//lib/rake/application.rb#236 + # source://rake//lib/rake/application.rb#242 def display_exception_details(ex); end - # source://rake//lib/rake/application.rb#251 + # source://rake//lib/rake/application.rb#257 def display_exception_details_seen; end - # source://rake//lib/rake/application.rb#259 + # source://rake//lib/rake/application.rb#265 def display_exception_message_details(ex); end # Display the tasks and prerequisites # - # source://rake//lib/rake/application.rb#405 + # source://rake//lib/rake/application.rb#411 def display_prerequisites; end # Display the tasks and comments. # - # source://rake//lib/rake/application.rb#322 + # source://rake//lib/rake/application.rb#328 def display_tasks_and_comments; end # Calculate the dynamic width of the # - # source://rake//lib/rake/application.rb#373 + # source://rake//lib/rake/application.rb#379 def dynamic_width; end - # source://rake//lib/rake/application.rb#377 + # source://rake//lib/rake/application.rb#383 def dynamic_width_stty; end - # source://rake//lib/rake/application.rb#381 + # source://rake//lib/rake/application.rb#387 def dynamic_width_tput; end # Exit the program because of an unhandled exception. # (may be overridden by subclasses) # - # source://rake//lib/rake/application.rb#223 + # source://rake//lib/rake/application.rb#229 def exit_because_of_exception(ex); end - # source://rake//lib/rake/application.rb#702 + # source://rake//lib/rake/application.rb#708 def find_rakefile_location; end # Read and handle the command line options. Returns the command line # arguments that we didn't understand, which should (in theory) be just # task names and env vars. # - # source://rake//lib/rake/application.rb#668 + # source://rake//lib/rake/application.rb#674 def handle_options(argv); end # @return [Boolean] # - # source://rake//lib/rake/application.rb#255 + # source://rake//lib/rake/application.rb#261 def has_cause?(ex); end # True if one of the files in RAKEFILES is in the current directory. # If a match is found, it is copied into @rakefile. # - # source://rake//lib/rake/application.rb#298 + # source://rake//lib/rake/application.rb#304 def have_rakefile; end # Initialize the command line parameters and app name. @@ -305,12 +305,12 @@ class Rake::Application # Invokes a task with arguments that are extracted from +task_string+ # - # source://rake//lib/rake/application.rb#179 + # source://rake//lib/rake/application.rb#185 def invoke_task(task_string); end # Load the pending list of imported files. # - # source://rake//lib/rake/application.rb#806 + # source://rake//lib/rake/application.rb#812 def load_imports; end # Find the rakefile and then load it and any pending imports. @@ -333,16 +333,16 @@ class Rake::Application # source://rake//lib/rake/application.rb#27 def original_dir; end - # source://rake//lib/rake/application.rb#185 + # source://rake//lib/rake/application.rb#191 def parse_task_string(string); end - # source://rake//lib/rake/application.rb#714 + # source://rake//lib/rake/application.rb#720 def print_rakefile_directory(location); end # Similar to the regular Ruby +require+ command, but will check # for *.rake files in addition to *.rb files. # - # source://rake//lib/rake/application.rb#688 + # source://rake//lib/rake/application.rb#694 def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end # Name of the actual rakefile used. @@ -350,10 +350,10 @@ class Rake::Application # source://rake//lib/rake/application.rb#30 def rakefile; end - # source://rake//lib/rake/application.rb#822 + # source://rake//lib/rake/application.rb#828 def rakefile_location(backtrace = T.unsafe(nil)); end - # source://rake//lib/rake/application.rb#719 + # source://rake//lib/rake/application.rb#725 def raw_load_rakefile; end # Run the Rake application. The run method performs the following @@ -375,23 +375,23 @@ class Rake::Application # source://rake//lib/rake/application.rb#144 def run_with_threads; end - # source://rake//lib/rake/application.rb#831 + # source://rake//lib/rake/application.rb#837 def set_default_options; end # Provide standard exception handling for the given block. # - # source://rake//lib/rake/application.rb#207 + # source://rake//lib/rake/application.rb#213 def standard_exception_handling; end # A list of all the standard options used in rake, suitable for # passing to OptionParser. # - # source://rake//lib/rake/application.rb#426 + # source://rake//lib/rake/application.rb#432 def standard_rake_options; end # The directory path containing the system wide rakefiles. # - # source://rake//lib/rake/application.rb#751 + # source://rake//lib/rake/application.rb#757 def system_dir; end # Number of columns on the terminal @@ -404,12 +404,12 @@ class Rake::Application # source://rake//lib/rake/application.rb#33 def terminal_columns=(_arg0); end - # source://rake//lib/rake/application.rb#361 + # source://rake//lib/rake/application.rb#367 def terminal_width; end # Return the thread pool used for multithreaded processing. # - # source://rake//lib/rake/application.rb#172 + # source://rake//lib/rake/application.rb#178 def thread_pool; end # Run the top level tasks of a Rake application. @@ -422,10 +422,10 @@ class Rake::Application # source://rake//lib/rake/application.rb#36 def top_level_tasks; end - # source://rake//lib/rake/application.rb#412 + # source://rake//lib/rake/application.rb#418 def trace(*strings); end - # source://rake//lib/rake/application.rb#394 + # source://rake//lib/rake/application.rb#400 def truncate(string, width); end # We will truncate output if we are outputting to a TTY or if we've been @@ -433,7 +433,7 @@ class Rake::Application # # @return [Boolean] # - # source://rake//lib/rake/application.rb#317 + # source://rake//lib/rake/application.rb#323 def truncate_output?; end # Override the detected TTY output state (mostly for testing) @@ -445,44 +445,44 @@ class Rake::Application # # @return [Boolean] # - # source://rake//lib/rake/application.rb#311 + # source://rake//lib/rake/application.rb#317 def tty_output?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#385 + # source://rake//lib/rake/application.rb#391 def unix?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#390 + # source://rake//lib/rake/application.rb#396 def windows?; end private - # source://rake//lib/rake/application.rb#745 + # source://rake//lib/rake/application.rb#751 def glob(path, &block); end # Does the exception have a task invocation chain? # # @return [Boolean] # - # source://rake//lib/rake/application.rb#291 + # source://rake//lib/rake/application.rb#297 def has_chain?(exception); end # source://rake//lib/rake/application.rb#102 def load_debug_at_stop_feature; end - # source://rake//lib/rake/application.rb#644 + # source://rake//lib/rake/application.rb#650 def select_tasks_to_show(options, show_tasks, value); end - # source://rake//lib/rake/application.rb#651 + # source://rake//lib/rake/application.rb#657 def select_trace_output(options, trace_option, value); end - # source://rake//lib/rake/application.rb#417 + # source://rake//lib/rake/application.rb#423 def sort_options(options); end - # source://rake//lib/rake/application.rb#768 + # source://rake//lib/rake/application.rb#774 def standard_system_dir; end end @@ -492,7 +492,7 @@ Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array) # source://rake//lib/rake/backtrace.rb#3 module Rake::Backtrace class << self - # source://rake//lib/rake/backtrace.rb#18 + # source://rake//lib/rake/backtrace.rb#19 def collapse(backtrace); end end end @@ -503,7 +503,7 @@ Rake::Backtrace::SUPPRESSED_PATHS = T.let(T.unsafe(nil), Array) # source://rake//lib/rake/backtrace.rb#12 Rake::Backtrace::SUPPRESSED_PATHS_RE = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/backtrace.rb#16 +# source://rake//lib/rake/backtrace.rb#17 Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp) # source://rake//lib/rake/backtrace.rb#4 @@ -598,7 +598,7 @@ module Rake::DSL # # ... run tests # end # - # source://rake//lib/rake/dsl_definition.rb#165 + # source://rake//lib/rake/dsl_definition.rb#166 def desc(description); end # Declare a set of files tasks to create the given directories on @@ -646,7 +646,7 @@ module Rake::DSL # Example: # import ".depend", "my_rules" # - # source://rake//lib/rake/dsl_definition.rb#183 + # source://rake//lib/rake/dsl_definition.rb#184 def import(*fns); end # source://rake//lib/rake/file_utils_ext.rb#34 @@ -690,7 +690,7 @@ module Rake::DSL # Example: # multitask deploy: %w[deploy_gem deploy_rdoc] # - # source://rake//lib/rake/dsl_definition.rb#112 + # source://rake//lib/rake/dsl_definition.rb#113 def multitask(*args, &block); end # source://rake//lib/rake/file_utils_ext.rb#34 @@ -715,7 +715,7 @@ module Rake::DSL # # ... # end # - # source://rake//lib/rake/dsl_definition.rb#135 + # source://rake//lib/rake/dsl_definition.rb#136 def namespace(name = T.unsafe(nil), &block); end # source://rake//lib/rake/file_utils_ext.rb#77 @@ -755,10 +755,10 @@ module Rake::DSL # # Example: # rule '.o' => '.c' do |t| - # sh 'cc', '-o', t.name, t.source + # sh 'cc', '-c', '-o', t.name, t.source # end # - # source://rake//lib/rake/dsl_definition.rb#151 + # source://rake//lib/rake/dsl_definition.rb#152 def rule(*args, &block); end # source://rake//lib/rake/file_utils.rb#110 @@ -3001,7 +3001,7 @@ end # source://rake//lib/rake/win32.rb#11 class Rake::Win32::Win32HomeError < ::RuntimeError; end -# source://rake//lib/rake.rb#71 +# source://rake//lib/rake.rb#70 RakeFileUtils = Rake::FileUtilsExt # source://rake//lib/rake/ext/string.rb#4 diff --git a/sorbet/rbi/gems/rbi@0.1.6.rbi b/sorbet/rbi/gems/rbi@0.1.12.rbi similarity index 88% rename from sorbet/rbi/gems/rbi@0.1.6.rbi rename to sorbet/rbi/gems/rbi@0.1.12.rbi index e3e903a6..7e121a97 100644 --- a/sorbet/rbi/gems/rbi@0.1.6.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 @@ -1157,6 +1201,10 @@ class RBI::Node sig { params(node: ::RBI::Node).void } def replace(node); end + # source://rbi//lib/rbi/rewriters/filter_versions.rb#94 + sig { params(version: ::Gem::Version).returns(T::Boolean) } + def satisfies_version?(version); end + # source://rbi//lib/rbi/printer.rb#162 sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end @@ -1192,11 +1240,15 @@ class RBI::NodeWithComments < ::RBI::Node # source://rbi//lib/rbi/printer.rb#188 sig { override.returns(T::Boolean) } def oneline?; end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#104 + sig { returns(T::Array[::Gem::Requirement]) } + def version_requirements; end end -# source://rbi//lib/rbi/model.rb#601 +# 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, @@ -1208,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 @@ -1220,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 @@ -1243,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 @@ -1251,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 @@ -1558,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), @@ -1571,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), @@ -1584,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), @@ -1597,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, @@ -1610,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 @@ -1631,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, @@ -1653,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 @@ -1665,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 @@ -1736,6 +1788,78 @@ class RBI::Rewriters::Deannotate < ::RBI::Visitor def deannotate_node(node); end end +# Take a gem version and filter out all RBI that is not relevant to that version based on @version annotations +# in comments. As an example: +# +# ~~~rb +# tree = Parser.parse_string(<<~RBI) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# +# # @version <= 0.3.0 +# def bar(arg1) +# end +# end +# RBI +# +# Rewriters::FilterVersions.filter(tree, Gem::Version.new("0.3.1")) +# +# assert_equal(<<~RBI, tree.string) +# class Foo +# # @version > 0.3.0 +# def bar +# end +# end +# RBI +# ~~~ +# +# Supported operators: +# - equals `=` +# - not equals `!=` +# - greater than `>` +# - greater than or equal to `>=` +# - less than `<` +# - less than or equal to `<=` +# - pessimistic or twiddle-wakka`~>` +# +# And/or logic: +# - "And" logic: put multiple versions on the same line +# - e.g. `@version > 0.3.0, <1.0.0` means version must be greater than 0.3.0 AND less than 1.0.0 +# - "Or" logic: put multiple versions on subsequent lines +# - e.g. the following means version must be less than 0.3.0 OR greater than 1.0.0 +# ``` +# # @version < 0.3.0 +# # @version > 1.0.0 +# ``` +# Prerelease versions: +# - Prerelease versions are considered less than their non-prerelease counterparts +# - e.g. `0.4.0-prerelease` is less than `0.4.0` +# +# RBI with no versions: +# - RBI with no version annotations are automatically counted towards ALL versions +# +# source://rbi//lib/rbi/rewriters/filter_versions.rb#57 +class RBI::Rewriters::FilterVersions < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/filter_versions.rb#73 + sig { params(version: ::Gem::Version).void } + def initialize(version); end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#79 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + class << self + # source://rbi//lib/rbi/rewriters/filter_versions.rb#66 + sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void } + def filter(tree, version); end + end +end + +# source://rbi//lib/rbi/rewriters/filter_versions.rb#60 +RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) + # source://rbi//lib/rbi/rewriters/group_nodes.rb#6 class RBI::Rewriters::GroupNodes < ::RBI::Visitor # source://rbi//lib/rbi/rewriters/group_nodes.rb#10 @@ -1820,7 +1944,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11287/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -2037,7 +2161,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11287/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -2151,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, @@ -2167,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 @@ -2179,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 @@ -2191,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], @@ -2221,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 @@ -2233,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 @@ -2321,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, @@ -2335,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 @@ -2347,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 @@ -2357,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 @@ -2439,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, @@ -2453,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], @@ -2468,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 @@ -2476,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 @@ -2488,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, @@ -2513,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, @@ -2534,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 @@ -2542,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, @@ -2573,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, @@ -2629,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 @@ -2637,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 @@ -2670,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.13.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, @@ -2680,19 +2808,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_class(name, superclass_name: T.unsafe(nil), &block); end - # source://tapioca/0.13.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.13.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.13.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.13.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, @@ -2705,7 +2833,7 @@ 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.13.0/lib/tapioca/rbi_ext/model.rb#112 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#113 sig do params( name: ::String, @@ -2718,23 +2846,23 @@ class RBI::Tree < ::RBI::NodeWithComments 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.0/lib/tapioca/rbi_ext/model.rb#60 + # 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.13.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.13.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.13.0/lib/tapioca/rbi_ext/model.rb#133 - sig { params(parameters: T::Array[::RBI::TypedParam], return_type: ::String).returns(::RBI::Sig) } - def create_sig(parameters: T.unsafe(nil), return_type: T.unsafe(nil)); end + # 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.0/lib/tapioca/rbi_ext/model.rb#74 + # source://tapioca/0.13.3/lib/tapioca/rbi_ext/model.rb#74 sig do params( name: ::String, @@ -2755,6 +2883,10 @@ class RBI::Tree < ::RBI::NodeWithComments sig { returns(T::Boolean) } def empty?; end + # source://rbi//lib/rbi/rewriters/filter_versions.rb#118 + sig { params(version: ::Gem::Version).void } + def filter_versions!(version); end + # source://rbi//lib/rbi/rewriters/group_nodes.rb#38 sig { void } def group_nodes!; end @@ -2796,20 +2928,20 @@ class RBI::Tree < ::RBI::NodeWithComments private - # source://tapioca/0.13.0/lib/tapioca/rbi_ext/model.rb#148 + # 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.13.0/lib/tapioca/rbi_ext/model.rb#143 + # 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, @@ -2825,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 @@ -2833,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 @@ -2869,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 @@ -2885,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/rdoc@6.6.2.rbi b/sorbet/rbi/gems/rdoc@6.6.3.1.rbi similarity index 99% rename from sorbet/rbi/gems/rdoc@6.6.2.rbi rename to sorbet/rbi/gems/rdoc@6.6.3.1.rbi index 7bec7b2e..00c4233f 100644 --- a/sorbet/rbi/gems/rdoc@6.6.2.rbi +++ b/sorbet/rbi/gems/rdoc@6.6.3.1.rbi @@ -11598,65 +11598,65 @@ class RDoc::Store # Loads ri data for +klass_name+ and hooks it up to this store. # - # source://rdoc//lib/rdoc/store.rb#600 + # source://rdoc//lib/rdoc/store.rb#598 def load_class(klass_name); end # Loads ri data for +klass_name+ # - # source://rdoc//lib/rdoc/store.rb#618 + # source://rdoc//lib/rdoc/store.rb#616 def load_class_data(klass_name); end # Loads ri data for +method_name+ in +klass_name+ # - # source://rdoc//lib/rdoc/store.rb#633 + # source://rdoc//lib/rdoc/store.rb#629 def load_method(klass_name, method_name); end # Loads ri data for +page_name+ # - # source://rdoc//lib/rdoc/store.rb#653 + # source://rdoc//lib/rdoc/store.rb#645 def load_page(page_name); end # Gets the main page for this RDoc store. This page is used as the root of # the RDoc server. # - # source://rdoc//lib/rdoc/store.rb#671 + # source://rdoc//lib/rdoc/store.rb#661 def main; end # Sets the main page for this RDoc store. # - # source://rdoc//lib/rdoc/store.rb#678 + # source://rdoc//lib/rdoc/store.rb#668 def main=(page); end # Converts the variable => ClassModule map +variables+ from a C parser into # a variable => class name map. # - # source://rdoc//lib/rdoc/store.rb#686 + # source://rdoc//lib/rdoc/store.rb#676 def make_variable_map(variables); end # Path to the ri data for +method_name+ in +klass_name+ # - # source://rdoc//lib/rdoc/store.rb#699 + # source://rdoc//lib/rdoc/store.rb#689 def method_file(klass_name, method_name); end # Modules cache accessor. An Array of all the module (and class) names in # the store. # - # source://rdoc//lib/rdoc/store.rb#713 + # source://rdoc//lib/rdoc/store.rb#703 def module_names; end # Hash of all modules known to RDoc # - # source://rdoc//lib/rdoc/store.rb#720 + # source://rdoc//lib/rdoc/store.rb#710 def modules_hash; end # Returns the RDoc::TopLevel that is a text file and has the given +name+ # - # source://rdoc//lib/rdoc/store.rb#727 + # source://rdoc//lib/rdoc/store.rb#717 def page(name); end # Path to the ri data for +page_name+ # - # source://rdoc//lib/rdoc/store.rb#736 + # source://rdoc//lib/rdoc/store.rb#726 def page_file(page_name); end # Path this store reads or writes @@ -11685,32 +11685,32 @@ class RDoc::Store # # See RDoc::Context#remove_from_documentation? # - # source://rdoc//lib/rdoc/store.rb#747 + # source://rdoc//lib/rdoc/store.rb#737 def remove_nodoc(all_hash); end # Saves all entries in the store # - # source://rdoc//lib/rdoc/store.rb#757 + # source://rdoc//lib/rdoc/store.rb#747 def save; end # Writes the cache file for this store # - # source://rdoc//lib/rdoc/store.rb#782 + # source://rdoc//lib/rdoc/store.rb#772 def save_cache; end # Writes the ri data for +klass+ (or module) # - # source://rdoc//lib/rdoc/store.rb#809 + # source://rdoc//lib/rdoc/store.rb#799 def save_class(klass); end # Writes the ri data for +method+ on +klass+ # - # source://rdoc//lib/rdoc/store.rb#883 + # source://rdoc//lib/rdoc/store.rb#873 def save_method(klass, method); end # Writes the ri data for +page+ # - # source://rdoc//lib/rdoc/store.rb#906 + # source://rdoc//lib/rdoc/store.rb#896 def save_page(page); end # Source of the contents of this store. @@ -11721,18 +11721,18 @@ class RDoc::Store # ri directory the store is "site". For other stores the source is the # #path. # - # source://rdoc//lib/rdoc/store.rb#932 + # source://rdoc//lib/rdoc/store.rb#922 def source; end # Gets the title for this RDoc store. This is used as the title in each # page on the RDoc server # - # source://rdoc//lib/rdoc/store.rb#946 + # source://rdoc//lib/rdoc/store.rb#936 def title; end # Sets the title page for this RDoc store. # - # source://rdoc//lib/rdoc/store.rb#953 + # source://rdoc//lib/rdoc/store.rb#943 def title=(title); end # Type of ri datastore this was loaded from. See RDoc::RI::Driver, @@ -11751,19 +11751,19 @@ class RDoc::Store # # ::complete must have been called prior to using this method. # - # source://rdoc//lib/rdoc/store.rb#962 + # source://rdoc//lib/rdoc/store.rb#952 def unique_classes; end # Returns the unique classes and modules discovered by RDoc. # ::complete must have been called prior to using this method. # - # source://rdoc//lib/rdoc/store.rb#970 + # source://rdoc//lib/rdoc/store.rb#960 def unique_classes_and_modules; end # Returns the unique modules discovered by RDoc. # ::complete must have been called prior to using this method. # - # source://rdoc//lib/rdoc/store.rb#978 + # source://rdoc//lib/rdoc/store.rb#968 def unique_modules; end # The lazy constants alias will be discovered in passing @@ -11775,8 +11775,16 @@ class RDoc::Store # # source://rdoc//lib/rdoc/store.rb#203 def update_parser_of_file(absolute_name, parser); end + + private + + # source://rdoc//lib/rdoc/store.rb#973 + def marshal_load(file); end end +# source://rdoc//lib/rdoc/store.rb#977 +RDoc::Store::MarshalFilter = T.let(T.unsafe(nil), Proc) + # Raised when a stored file for a class, module, page or method is missing. # # source://rdoc//lib/rdoc/store.rb#36 diff --git a/sorbet/rbi/gems/reline@0.4.1.rbi b/sorbet/rbi/gems/reline@0.5.0.rbi similarity index 100% rename from sorbet/rbi/gems/reline@0.4.1.rbi rename to sorbet/rbi/gems/reline@0.5.0.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 9badffee..08a626eb 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.31.2.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi @@ -5122,9 +5122,6 @@ RuboCop::AST::NodePattern::Sets::SET_10_10 = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_1_1 = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ABSTRACT_OVERRIDE_OVERRIDABLE_ETC = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ADD_DEPENDENCY_ADD_RUNTIME_DEPENDENCY_ADD_DEVELOPMENT_DEPENDENCY = T.let(T.unsafe(nil), Set) @@ -5167,15 +5164,9 @@ RuboCop::AST::NodePattern::Sets::SET_CLASS_MODULE_STRUCT = T.let(T.unsafe(nil), # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 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_CONSTANTIZE_CONSTANTS_CONST_GET = 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) @@ -5185,9 +5176,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) @@ -5224,9 +5212,15 @@ RuboCop::AST::NodePattern::Sets::SET_GETHOSTBYADDR_GETHOSTBYNAME = T.let(T.unsaf # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_GSUB_GSUB = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_IF_UNLESS = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_INCLUDE_EXTEND_PREPEND = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_INCLUDE_PREPEND = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_INSTANCE_EVAL_CLASS_EVAL_MODULE_EVAL = T.let(T.unsafe(nil), Set) @@ -5239,6 +5233,9 @@ RuboCop::AST::NodePattern::Sets::SET_KEYS_VALUES = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_KEY_HAS_KEY_FETCH_ETC = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_LAMBDA_PROC = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_LAST_FIRST = T.let(T.unsafe(nil), Set) @@ -5368,6 +5365,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-sorbet@0.7.8.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi similarity index 91% rename from sorbet/rbi/gems/rubocop-sorbet@0.7.8.rbi rename to sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi index fb505a0d..69266e92 100644 --- a/sorbet/rbi/gems/rubocop-sorbet@0.7.8.rbi +++ b/sorbet/rbi/gems/rubocop-sorbet@0.8.3.rbi @@ -190,16 +190,30 @@ RuboCop::Cop::Sorbet::BuggyObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), # end # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#35 -class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#75 - def autocorrect(node); end +class RuboCop::Cop::Sorbet::CallbackConditionalsBinding < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Alignment + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#81 + def argumentless_unbound_callable_callback_conditional?(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#127 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#91 def on_send(node); end + + private + + # Find the immediately enclosing class or module name. + # Returns `nil`` if the immediate parent (skipping begin if present) is not a class or module. + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#128 + def immediately_enclosing_module_name(node); end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#36 -RuboCop::Cop::Sorbet::CallbackConditionalsBinding::CALLBACKS = T.let(T.unsafe(nil), Array) +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#39 +RuboCop::Cop::Sorbet::CallbackConditionalsBinding::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/callback_conditionals_binding.rb#41 +RuboCop::Cop::Sorbet::CallbackConditionalsBinding::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Disallows the usage of `checked(true)`. This usage could cause # confusion; it could lead some people to believe that a method would be checked @@ -259,15 +273,18 @@ RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), Str # # good # { "User" => User }.fetch(class_name) # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#37 -class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#38 - def constant_from_string?(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#42 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#36 +class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Base + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#46 def on_send(node); end end +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#37 +RuboCop::Cop::Sorbet::ConstantsFromStrings::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/constants_from_strings.rb#40 +RuboCop::Cop::Sorbet::ConstantsFromStrings::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for blank lines after signatures. # # @example @@ -506,6 +523,42 @@ class RuboCop::Cop::Sorbet::FalseSigil < ::RuboCop::Cop::Sorbet::HasSigil def minimum_strictness; end end +# Disallow including the `Comparable` module in `T::Enum`. +# +# @example +# +# # bad +# class Priority < T::Enum +# include Comparable +# +# enums do +# High = new(3) +# Medium = new(2) +# Low = new(1) +# end +# +# def <=>(other) +# serialize <=> other.serialize +# end +# end +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#24 +class RuboCop::Cop::Sorbet::ForbidComparableTEnum < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::TEnum + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#32 + def mix_in_comparable?(param0 = T.unsafe(nil)); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#36 + def on_send(node); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#27 +RuboCop::Cop::Sorbet::ForbidComparableTEnum::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/forbid_comparable_t_enum.rb#29 +RuboCop::Cop::Sorbet::ForbidComparableTEnum::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Ensures RBI shims do not include a call to extend T::Sig # or to extend T::Helpers # @@ -1042,6 +1095,42 @@ class RuboCop::Cop::Sorbet::KeywordArgumentOrdering < ::RuboCop::Cop::Cop def check_order_for_kwoptargs(parameters); end end +# Disallow creating a `T::Enum` with less than two values. +# +# @example +# +# # bad +# class ErrorMessages < T::Enum +# enums do +# ServerError = new("There was a server error.") +# end +# end +# +# # good +# class ErrorMessages < T::Enum +# enums do +# ServerError = new("There was a server error.") +# NotFound = new("The resource was not found.") +# end +# end +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#24 +class RuboCop::Cop::Sorbet::MultipleTEnumValues < ::RuboCop::Cop::Base + include ::RuboCop::Cop::Sorbet::TEnum + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#30 + def enums_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#40 + def on_block(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#34 + def on_class(node); end +end + +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/t_enum/multiple_t_enum_values.rb#27 +RuboCop::Cop::Sorbet::MultipleTEnumValues::MSG = T.let(T.unsafe(nil), String) + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#8 module RuboCop::Cop::Sorbet::MutableConstantSorbetAwareBehaviour # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 @@ -1106,54 +1195,6 @@ end # source://rubocop-sorbet//lib/rubocop/cop/sorbet/obsolete_strict_memoization.rb#47 RuboCop::Cop::Sorbet::ObsoleteStrictMemoization::MSG = T.let(T.unsafe(nil), String) -# Ensures one ancestor per requires_ancestor line -# rather than chaining them as a comma-separated list. -# -# @example -# -# # bad -# module SomeModule -# requires_ancestor Kernel, Minitest::Assertions -# end -# -# # good -# module SomeModule -# requires_ancestor Kernel -# requires_ancestor Minitest::Assertions -# end -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#24 -class RuboCop::Cop::Sorbet::OneAncestorPerLine < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#38 - def abstract?(param0); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#56 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#33 - def more_than_one_ancestor(param0 = T.unsafe(nil)); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#49 - def on_class(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#42 - def on_module(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#28 - def requires_ancestors(param0); end - - private - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#72 - def new_ra_line(indent_count); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#66 - def process_node(node); end -end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/one_ancestor_per_line.rb#25 -RuboCop::Cop::Sorbet::OneAncestorPerLine::MSG = T.let(T.unsafe(nil), String) - # Forbids the use of redundant `extend T::Sig`. Only for use in # applications that monkey patch `Module.include(T::Sig)` globally, # which would make it redundant. @@ -1190,12 +1231,11 @@ RuboCop::Cop::Sorbet::RedundantExtendTSig::MSG = T.let(T.unsafe(nil), String) # source://rubocop-sorbet//lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#33 RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for the correct order of sig builder methods: -# - abstract, override, or overridable -# - type_parameters -# - params -# - returns, or void -# - soft, checked, or on_failure +# Checks for the correct order of `sig` builder methods. +# +# Options: +# +# * `Order`: The order in which to enforce the builder methods are called. # # @example # # bad @@ -1210,46 +1250,31 @@ RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil # # good # sig { params(x: Integer).returns(Integer) } # -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#31 -class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Cop +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#24 +class RuboCop::Cop::Sorbet::SignatureBuildOrder < ::RuboCop::Cop::Base include ::RuboCop::Cop::Sorbet::SignatureHelp + extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#77 - def autocorrect(node); end - - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#53 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#33 def on_signature(node); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#49 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#29 def root_call(param0); end private - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#119 - def call_chain(sig_child_node); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#96 + def builder_method_indexes; end - # @return [Boolean] + # Split foo.bar.baz into [foo, foo.bar, foo.bar.baz] # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#115 - def can_autocorrect?; end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#83 + def call_chain(node); end - # This method exists to reparse the current node with modern features enabled. - # Modern features include "index send" emitting, which is necessary to unparse - # "index sends" (i.e. `[]` calls) back to index accessors (i.e. as `foo[bar]``). - # Otherwise, we would get the unparsed node as `foo.[](bar)`. - # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#106 - def node_reparsed_with_modern_features(node); end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#70 + def expected_source(expected_calls_and_indexes); end end -# Create a subclass of AST Builder that has modern features turned on -# -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#95 -class RuboCop::Cop::Sorbet::SignatureBuildOrder::ModernBuilder < ::RuboCop::AST::Builder; end - -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/signatures/signature_build_order.rb#34 -RuboCop::Cop::Sorbet::SignatureBuildOrder::ORDER = T.let(T.unsafe(nil), Hash) - # Mixin for writing cops for signatures, providing a `signature?` node matcher and an `on_signature` trigger. # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/signature_help.rb#7 @@ -1322,6 +1347,32 @@ class RuboCop::Cop::Sorbet::StrongSigil < ::RuboCop::Cop::Sorbet::HasSigil def minimum_strictness; end end +# Mixing for writing cops that deal with `T::Enum`s +# +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#7 +module RuboCop::Cop::Sorbet::TEnum + extend ::RuboCop::AST::NodePattern::Macros + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#9 + def initialize(*_arg0); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#23 + def after_class(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#19 + def on_class(node); end + + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#15 + def t_enum?(param0 = T.unsafe(nil)); end + + private + + # @return [Boolean] + # + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/t_enum.rb#29 + def in_t_enum_class?; end +end + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/mixin/target_sorbet_version.rb#6 module RuboCop::Cop::Sorbet::TargetSorbetVersion mixes_in_class_methods ::RuboCop::Cop::Sorbet::TargetSorbetVersion::ClassMethods @@ -1408,7 +1459,7 @@ RuboCop::Cop::Sorbet::TypeAliasName::MSG = T.let(T.unsafe(nil), String) # # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#20 class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Cop - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#35 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#36 def autocorrect(_node); end # So we can properly subclass this cop @@ -1420,56 +1471,56 @@ class RuboCop::Cop::Sorbet::ValidSigil < ::RuboCop::Cop::Cop # checks # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#70 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#71 def check_sigil_present(sigil); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#130 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#131 def check_strictness_level(sigil, strictness); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#108 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#109 def check_strictness_not_empty(sigil, strictness); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#119 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#120 def check_strictness_valid(sigil, strictness); end # Default is `nil` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#180 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#181 def exact_strictness; end # extraction # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#58 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#59 def extract_sigil(processed_source); end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#64 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#65 def extract_strictness(sigil); end # Default is `nil` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#174 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#175 def minimum_strictness; end # Default is `false` # # @return [Boolean] # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#163 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#164 def require_sigil_on_all_files?; end # Default is `'false'` # - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#168 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#169 def suggested_strictness; end - # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#86 + # source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#87 def suggested_strictness_level; end end -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#54 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#55 RuboCop::Cop::Sorbet::ValidSigil::SIGIL_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#53 +# source://rubocop-sorbet//lib/rubocop/cop/sorbet/sigils/valid_sigil.rb#54 RuboCop::Cop::Sorbet::ValidSigil::STRICTNESS_LEVELS = T.let(T.unsafe(nil), Array) # Disallows the usage of `.void.checked(:tests)`. 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 7e458202..32336740 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. # @@ -41614,7 +41814,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet/0.7.8/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 + # source://rubocop-sorbet/0.8.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 def on_assignment(value); end # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#127 @@ -41632,7 +41832,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/mutable_constant.rb#217 def splat_value(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet/0.7.8/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 + # source://rubocop-sorbet/0.8.3/lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 def t_let(param0 = T.unsafe(nil)); end private @@ -44297,10 +44497,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] @@ -44909,16 +45119,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 @@ -45681,12 +45894,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] @@ -45704,7 +45912,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] @@ -45719,7 +45927,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 `\`: @@ -45729,7 +45937,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] @@ -45744,12 +45952,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] @@ -48080,12 +48288,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 @@ -51794,22 +52002,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] @@ -51817,7 +52025,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 @@ -51838,10 +52046,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 @@ -54363,10 +54571,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 @@ -54374,7 +54582,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 @@ -55317,10 +55525,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 @@ -55477,7 +55685,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 @@ -55485,39 +55693,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 @@ -55611,32 +55819,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 @@ -55664,33 +55872,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 @@ -56714,145 +56950,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. @@ -56860,41 +57096,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 @@ -56917,12 +57153,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/tapioca@0.13.0.rbi b/sorbet/rbi/gems/tapioca@0.13.3.rbi similarity index 98% rename from sorbet/rbi/gems/tapioca@0.13.0.rbi rename to sorbet/rbi/gems/tapioca@0.13.3.rbi index 4193920c..5a326425 100644 --- a/sorbet/rbi/gems/tapioca@0.13.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.6/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.6/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.6/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.6/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.6/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,7 +115,7 @@ 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#112 + # source://tapioca//lib/tapioca/rbi_ext/model.rb#113 sig do params( name: ::String, @@ -140,9 +140,9 @@ 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#133 - sig { params(parameters: T::Array[::RBI::TypedParam], return_type: ::String).returns(::RBI::Sig) } - def create_sig(parameters: T.unsafe(nil), return_type: T.unsafe(nil)); 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 @@ -157,23 +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.6/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.6/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.6/lib/rbi/rewriters/group_nodes.rb#38 + # 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.12/lib/rbi/rewriters/group_nodes.rb#38 sig { void } def group_nodes!; end - # source://rbi/0.1.6/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.6/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, @@ -184,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.6/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.6/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.6/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.6/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.6/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#148 + # 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#143 + # 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#158 +# 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.11287/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -1138,7 +1142,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11287/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -1149,7 +1153,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11287/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end @@ -2449,7 +2453,7 @@ class Tapioca::Loaders::Loader # @param engine [T.class_of(Rails::Engine)] # @return [Array] # - # source://sorbet-runtime/0.5.11287/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 @@ -3357,7 +3361,7 @@ module Tapioca::Static::SymbolLoader # @return [Array] # - # source://sorbet-runtime/0.5.11287/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 diff --git a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi index 6f747483..5c416133 100644 --- a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +++ b/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi @@ -381,7 +381,7 @@ class YARDSorbet::TStructProp < ::T::Struct const :types, T::Array[::String] class << self - # source://sorbet-runtime/0.5.11287/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11361/lib/types/struct.rb#13 def inherited(s); end end end