From 89b1ca05ca8d2db17f26b8bc69705f4156c2221d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Co=C3=AAlho?= Date: Wed, 29 Nov 2023 17:29:45 +0000 Subject: [PATCH] Update Gemfile and RBIs --- Gemfile.lock | 26 +- .../{yarp@0.13.0.rbi => prism@0.18.0.rbi} | 16480 +++++++++++----- .../gems/{rake@13.0.6.rbi => rake@13.1.0.rbi} | 269 +- .../rbi/gems/{rbi@0.1.1.rbi => rbi@0.1.5.rbi} | 110 +- ...tapioca@0.11.9.rbi => tapioca@0.11.12.rbi} | 101 +- .../gems/{thor@1.2.2.rbi => thor@1.3.0.rbi} | 1170 +- 6 files changed, 12871 insertions(+), 5285 deletions(-) rename sorbet/rbi/gems/{yarp@0.13.0.rbi => prism@0.18.0.rbi} (52%) rename sorbet/rbi/gems/{rake@13.0.6.rbi => rake@13.1.0.rbi} (92%) rename sorbet/rbi/gems/{rbi@0.1.1.rbi => rbi@0.1.5.rbi} (97%) rename sorbet/rbi/gems/{tapioca@0.11.9.rbi => tapioca@0.11.12.rbi} (97%) rename sorbet/rbi/gems/{thor@1.2.2.rbi => thor@1.3.0.rbi} (80%) diff --git a/Gemfile.lock b/Gemfile.lock index 1d82199..b4cc15d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -25,10 +25,11 @@ GEM ruby-rc4 ttfunk prettier_print (1.2.1) - rake (13.0.6) - rbi (0.1.1) + prism (0.18.0) + rake (13.1.0) + rbi (0.1.5) + prism (>= 0.18.0, < 0.19) sorbet-runtime (>= 0.5.9204) - yarp (>= 0.11.0) ruby-rc4 (0.1.5) simplecov (0.22.0) docile (~> 1.1) @@ -36,13 +37,13 @@ GEM simplecov_json_formatter (~> 0.1) simplecov-html (0.12.3) simplecov_json_formatter (0.1.4) - sorbet (0.5.11089) - sorbet-static (= 0.5.11089) - sorbet-runtime (0.5.11089) - sorbet-static (0.5.11089-x86_64-linux) - sorbet-static-and-runtime (0.5.11089) - sorbet (= 0.5.11089) - sorbet-runtime (= 0.5.11089) + sorbet (0.5.11142) + sorbet-static (= 0.5.11142) + sorbet-runtime (0.5.11142) + sorbet-static (0.5.11142-x86_64-linux) + sorbet-static-and-runtime (0.5.11142) + sorbet (= 0.5.11142) + sorbet-runtime (= 0.5.11142) spoom (1.2.4) erubi (>= 1.10.0) sorbet-static-and-runtime (>= 0.5.10187) @@ -50,11 +51,11 @@ GEM thor (>= 0.19.2) syntax_tree (6.2.0) prettier_print (>= 1.2.0) - tapioca (0.11.9) + tapioca (0.11.12) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (~> 0.1.0, >= 0.1.0) + rbi (>= 0.1.4, < 0.2) sorbet-static-and-runtime (>= 0.5.10187) spoom (~> 1.2.0, >= 1.2.0) thor (>= 1.2.0) @@ -65,7 +66,6 @@ GEM yard-sorbet (0.8.1) sorbet-runtime (>= 0.5) yard (>= 0.9) - yarp (0.13.0) PLATFORMS x86_64-linux diff --git a/sorbet/rbi/gems/yarp@0.13.0.rbi b/sorbet/rbi/gems/prism@0.18.0.rbi similarity index 52% rename from sorbet/rbi/gems/yarp@0.13.0.rbi rename to sorbet/rbi/gems/prism@0.18.0.rbi index f67066d..0f5414f 100644 --- a/sorbet/rbi/gems/yarp@0.13.0.rbi +++ b/sorbet/rbi/gems/prism@0.18.0.rbi @@ -1,60 +1,86 @@ # typed: true # DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `yarp` gem. -# Please instead update this file by running `bin/tapioca gem yarp`. +# 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/lib/prism/visitor.rb.erb +# 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://yarp//lib/prism.rb#3 +# 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 + 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) -> Array + # # Returns an array of tokens that closely resembles that of the Ripper lexer. # The only difference is that since we don't keep track of lexer state in the # same way, it's going to always return the NONE state. # - # source://yarp//lib/prism.rb#33 - def lex_compat(source, filepath = T.unsafe(nil)); end + # 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 + 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://yarp//lib/prism.rb#40 + # 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://yarp//lib/prism.rb#45 + # 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 + # 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 + 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_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 + def parse_lex_file(*_arg0); end end end @@ -63,72 +89,95 @@ end # alias $foo $bar # ^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#45 +# 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://yarp//lib/prism/node.rb#56 + # 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://yarp//lib/prism/node.rb#64 + # source://prism//lib/prism/node.rb#71 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#69 + # 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://yarp//lib/prism/node.rb#79 + # source://prism//lib/prism/node.rb#86 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#74 + # source://prism//lib/prism/node.rb#81 def compact_child_nodes; end # def copy: (**params) -> AliasGlobalVariableNode # - # source://yarp//lib/prism/node.rb#84 + # 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://yarp//lib/prism/node.rb#69 + # 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://yarp//lib/prism/node.rb#97 + # 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 - # source://yarp//lib/prism/node.rb#106 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#114 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#102 + # source://prism//lib/prism/node.rb#109 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#53 + # source://prism//lib/prism/node.rb#60 + sig { returns(Prism::Location) } def keyword_loc; end # attr_reader new_name: Node # - # source://yarp//lib/prism/node.rb#47 + # source://prism//lib/prism/node.rb#54 + sig { returns(Prism::Node) } def new_name; end # attr_reader old_name: Node # - # source://yarp//lib/prism/node.rb#50 + # 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 @@ -146,8 +195,20 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#130 + # 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. @@ -155,72 +216,95 @@ end # alias foo bar # ^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#139 +# 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://yarp//lib/prism/node.rb#150 + # 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://yarp//lib/prism/node.rb#158 + # source://prism//lib/prism/node.rb#176 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#163 + # 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://yarp//lib/prism/node.rb#173 + # source://prism//lib/prism/node.rb#191 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#168 + # source://prism//lib/prism/node.rb#186 def compact_child_nodes; end # def copy: (**params) -> AliasMethodNode # - # source://yarp//lib/prism/node.rb#178 + # 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://yarp//lib/prism/node.rb#163 + # 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://yarp//lib/prism/node.rb#191 + # 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 - # source://yarp//lib/prism/node.rb#200 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#219 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#196 + # source://prism//lib/prism/node.rb#214 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#147 + # source://prism//lib/prism/node.rb#165 + sig { returns(Prism::Location) } def keyword_loc; end # attr_reader new_name: Node # - # source://yarp//lib/prism/node.rb#141 + # source://prism//lib/prism/node.rb#159 + sig { returns(Prism::Node) } def new_name; end # attr_reader old_name: Node # - # source://yarp//lib/prism/node.rb#144 + # 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 @@ -238,8 +322,20 @@ class Prism::AliasMethodNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#224 + # 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. @@ -247,72 +343,88 @@ end # foo => bar | baz # ^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#233 +# 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://yarp//lib/prism/node.rb#244 + # 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://yarp//lib/prism/node.rb#252 + # source://prism//lib/prism/node.rb#281 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#257 + # 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://yarp//lib/prism/node.rb#267 + # source://prism//lib/prism/node.rb#296 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#262 + # source://prism//lib/prism/node.rb#291 def compact_child_nodes; end # def copy: (**params) -> AlternationPatternNode # - # source://yarp//lib/prism/node.rb#272 + # 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://yarp//lib/prism/node.rb#257 + # 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://yarp//lib/prism/node.rb#285 + # 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 - # source://yarp//lib/prism/node.rb#294 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#324 def inspect(inspector = T.unsafe(nil)); end # attr_reader left: Node # - # source://yarp//lib/prism/node.rb#235 + # source://prism//lib/prism/node.rb#264 + sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#290 + # source://prism//lib/prism/node.rb#319 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#241 + # source://prism//lib/prism/node.rb#270 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Node # - # source://yarp//lib/prism/node.rb#238 + # 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 @@ -330,8 +442,20 @@ class Prism::AlternationPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#318 + # 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. @@ -339,72 +463,88 @@ end # left and right # ^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#327 +# 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://yarp//lib/prism/node.rb#338 + # 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://yarp//lib/prism/node.rb#346 + # source://prism//lib/prism/node.rb#386 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#351 + # 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://yarp//lib/prism/node.rb#361 + # source://prism//lib/prism/node.rb#401 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#356 + # source://prism//lib/prism/node.rb#396 def compact_child_nodes; end # def copy: (**params) -> AndNode # - # source://yarp//lib/prism/node.rb#366 + # 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://yarp//lib/prism/node.rb#351 + # 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://yarp//lib/prism/node.rb#379 + # 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 - # source://yarp//lib/prism/node.rb#388 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#429 def inspect(inspector = T.unsafe(nil)); end # attr_reader left: Node # - # source://yarp//lib/prism/node.rb#329 + # source://prism//lib/prism/node.rb#369 + sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#384 + # source://prism//lib/prism/node.rb#424 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#335 + # source://prism//lib/prism/node.rb#375 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Node # - # source://yarp//lib/prism/node.rb#332 + # 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 @@ -422,8 +562,20 @@ class Prism::AndNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#412 + # 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. @@ -431,59 +583,80 @@ end # return foo, bar, baz # ^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#421 +# source://prism//lib/prism/node.rb#472 class Prism::ArgumentsNode < ::Prism::Node - # def initialize: (arguments: Array[Node], location: Location) -> void + # def initialize: (arguments: Array[Node], flags: Integer, location: Location) -> void # # @return [ArgumentsNode] a new instance of ArgumentsNode # - # source://yarp//lib/prism/node.rb#426 - def initialize(arguments, location); end + # source://prism//lib/prism/node.rb#480 + sig { params(arguments: T::Array[Prism::Node], flags: Integer, location: Prism::Location).void } + def initialize(arguments, flags, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#432 + # source://prism//lib/prism/node.rb#487 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: Array[Node] # - # source://yarp//lib/prism/node.rb#423 + # source://prism//lib/prism/node.rb#474 + sig { returns(T::Array[Prism::Node]) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#437 + # 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://yarp//lib/prism/node.rb#447 + # source://prism//lib/prism/node.rb#502 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#442 + # source://prism//lib/prism/node.rb#497 def compact_child_nodes; end # def copy: (**params) -> ArgumentsNode # - # source://yarp//lib/prism/node.rb#452 + # 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://yarp//lib/prism/node.rb#437 + # 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://yarp//lib/prism/node.rb#463 + # 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 - # source://yarp//lib/prism/node.rb#467 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#529 def inspect(inspector = T.unsafe(nil)); end + # def keyword_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#524 + sig { returns(T::Boolean) } + def keyword_splat?; end + # Sometimes you want to check an instance of a node against a list of # classes to see what kind of behavior to perform. Usually this is done by # calling `[cls1, cls2].include?(node.class)` or putting the node into a @@ -499,87 +672,141 @@ class Prism::ArgumentsNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#487 + # source://prism//lib/prism/node.rb#551 def type; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#477 + 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#16605 +module Prism::ArgumentsNodeFlags; end + +# if arguments contain keyword splat +# +# source://prism//lib/prism/node.rb#16607 +Prism::ArgumentsNodeFlags::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://yarp//lib/prism/node.rb#497 +# source://prism//lib/prism/node.rb#571 class Prism::ArrayNode < ::Prism::Node # def initialize: (elements: Array[Node], opening_loc: Location?, closing_loc: Location?, location: Location) -> void # # @return [ArrayNode] a new instance of ArrayNode # - # source://yarp//lib/prism/node.rb#508 + # source://prism//lib/prism/node.rb#582 + sig do + params( + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + location: Prism::Location + ).void + end def initialize(elements, opening_loc, closing_loc, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#516 + # source://prism//lib/prism/node.rb#590 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#521 + # source://prism//lib/prism/node.rb#595 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://yarp//lib/prism/node.rb#559 + # source://prism//lib/prism/node.rb#633 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://yarp//lib/prism/node.rb#505 + # source://prism//lib/prism/node.rb#579 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#531 + # source://prism//lib/prism/node.rb#605 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#526 + # source://prism//lib/prism/node.rb#600 def compact_child_nodes; end # def copy: (**params) -> ArrayNode # - # source://yarp//lib/prism/node.rb#536 + # source://prism//lib/prism/node.rb#610 + sig { params(params: T.untyped).returns(Prism::ArrayNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#521 + # source://prism//lib/prism/node.rb#595 + 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://yarp//lib/prism/node.rb#549 + # source://prism//lib/prism/node.rb#623 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#499 + # source://prism//lib/prism/node.rb#573 + sig { returns(T::Array[Prism::Node]) } def elements; end - # source://yarp//lib/prism/node.rb#563 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#638 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://yarp//lib/prism/node.rb#554 + # source://prism//lib/prism/node.rb#628 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://yarp//lib/prism/node.rb#502 + # source://prism//lib/prism/node.rb#576 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Sometimes you want to check an instance of a node against a list of @@ -597,8 +824,20 @@ class Prism::ArrayNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#585 + # source://prism//lib/prism/node.rb#660 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#670 + def type; end + end end # Represents an array pattern in pattern matching. @@ -618,92 +857,122 @@ end # foo in Bar[1, 2, 3] # ^^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#606 +# source://prism//lib/prism/node.rb#691 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://yarp//lib/prism/node.rb#626 + # source://prism//lib/prism/node.rb#711 + 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://yarp//lib/prism/node.rb#637 + # source://prism//lib/prism/node.rb#722 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#642 + # source://prism//lib/prism/node.rb#727 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://yarp//lib/prism/node.rb#688 + # source://prism//lib/prism/node.rb#773 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://yarp//lib/prism/node.rb#623 + # source://prism//lib/prism/node.rb#708 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#657 + # source://prism//lib/prism/node.rb#742 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#647 + # source://prism//lib/prism/node.rb#732 def compact_child_nodes; end # attr_reader constant: Node? # - # source://yarp//lib/prism/node.rb#608 + # source://prism//lib/prism/node.rb#693 + sig { returns(T.nilable(Prism::Node)) } def constant; end # def copy: (**params) -> ArrayPatternNode # - # source://yarp//lib/prism/node.rb#662 + # source://prism//lib/prism/node.rb#747 + sig { params(params: T.untyped).returns(Prism::ArrayPatternNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#642 + # source://prism//lib/prism/node.rb#727 + 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://yarp//lib/prism/node.rb#678 + # source://prism//lib/prism/node.rb#763 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#692 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#778 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://yarp//lib/prism/node.rb#683 + # source://prism//lib/prism/node.rb#768 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://yarp//lib/prism/node.rb#620 + # source://prism//lib/prism/node.rb#705 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader posts: Array[Node] # - # source://yarp//lib/prism/node.rb#617 + # source://prism//lib/prism/node.rb#702 + sig { returns(T::Array[Prism::Node]) } def posts; end # attr_reader requireds: Array[Node] # - # source://yarp//lib/prism/node.rb#611 + # source://prism//lib/prism/node.rb#696 + sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader rest: Node? # - # source://yarp//lib/prism/node.rb#614 + # source://prism//lib/prism/node.rb#699 + sig { returns(T.nilable(Prism::Node)) } def rest; end # Sometimes you want to check an instance of a node against a list of @@ -721,8 +990,20 @@ class Prism::ArrayPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#727 + # source://prism//lib/prism/node.rb#813 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#823 + def type; end + end end # Represents a hash key/value pair. @@ -730,67 +1011,89 @@ end # { a => b } # ^^^^^^ # -# source://yarp//lib/prism/node.rb#736 +# source://prism//lib/prism/node.rb#832 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://yarp//lib/prism/node.rb#747 + # source://prism//lib/prism/node.rb#843 + 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://yarp//lib/prism/node.rb#755 + # source://prism//lib/prism/node.rb#851 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#760 + # source://prism//lib/prism/node.rb#856 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#773 + # source://prism//lib/prism/node.rb#869 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#765 + # source://prism//lib/prism/node.rb#861 def compact_child_nodes; end # def copy: (**params) -> AssocNode # - # source://yarp//lib/prism/node.rb#778 + # source://prism//lib/prism/node.rb#874 + sig { params(params: T.untyped).returns(Prism::AssocNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#760 + # source://prism//lib/prism/node.rb#856 + 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://yarp//lib/prism/node.rb#791 + # source://prism//lib/prism/node.rb#887 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#800 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#897 def inspect(inspector = T.unsafe(nil)); end # attr_reader key: Node # - # source://yarp//lib/prism/node.rb#738 + # source://prism//lib/prism/node.rb#834 + sig { returns(Prism::Node) } def key; end # def operator: () -> String? # - # source://yarp//lib/prism/node.rb#796 + # source://prism//lib/prism/node.rb#892 + sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://yarp//lib/prism/node.rb#744 + # source://prism//lib/prism/node.rb#840 + sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -808,13 +1111,26 @@ class Prism::AssocNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#828 + # source://prism//lib/prism/node.rb#925 def type; end # attr_reader value: Node? # - # source://yarp//lib/prism/node.rb#741 + # source://prism//lib/prism/node.rb#837 + 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#935 + def type; end + end end # Represents a splat in a hash literal. @@ -822,62 +1138,76 @@ end # { **foo } # ^^^^^ # -# source://yarp//lib/prism/node.rb#837 +# source://prism//lib/prism/node.rb#944 class Prism::AssocSplatNode < ::Prism::Node # def initialize: (value: Node?, operator_loc: Location, location: Location) -> void # # @return [AssocSplatNode] a new instance of AssocSplatNode # - # source://yarp//lib/prism/node.rb#845 + # source://prism//lib/prism/node.rb#952 + 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://yarp//lib/prism/node.rb#852 + # source://prism//lib/prism/node.rb#959 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#857 + # source://prism//lib/prism/node.rb#964 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#869 + # source://prism//lib/prism/node.rb#976 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#862 + # source://prism//lib/prism/node.rb#969 def compact_child_nodes; end # def copy: (**params) -> AssocSplatNode # - # source://yarp//lib/prism/node.rb#874 + # source://prism//lib/prism/node.rb#981 + sig { params(params: T.untyped).returns(Prism::AssocSplatNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#857 + # source://prism//lib/prism/node.rb#964 + 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://yarp//lib/prism/node.rb#886 + # source://prism//lib/prism/node.rb#993 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#895 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1003 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#891 + # source://prism//lib/prism/node.rb#998 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#842 + # source://prism//lib/prism/node.rb#949 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -895,13 +1225,26 @@ class Prism::AssocSplatNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#921 + # source://prism//lib/prism/node.rb#1029 def type; end # attr_reader value: Node? # - # source://yarp//lib/prism/node.rb#839 + # source://prism//lib/prism/node.rb#946 + 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#1039 + def type; end + end end Prism::BACKEND = T.let(T.unsafe(nil), Symbol) @@ -911,54 +1254,72 @@ Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # $' # ^^ # -# source://yarp//lib/prism/node.rb#930 +# source://prism//lib/prism/node.rb#1048 class Prism::BackReferenceReadNode < ::Prism::Node - # def initialize: (location: Location) -> void + # def initialize: (name: Symbol, location: Location) -> void # # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode # - # source://yarp//lib/prism/node.rb#932 - def initialize(location); end + # source://prism//lib/prism/node.rb#1053 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#937 + # source://prism//lib/prism/node.rb#1059 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#942 + # source://prism//lib/prism/node.rb#1064 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#952 + # source://prism//lib/prism/node.rb#1074 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#947 + # source://prism//lib/prism/node.rb#1069 def compact_child_nodes; end # def copy: (**params) -> BackReferenceReadNode # - # source://yarp//lib/prism/node.rb#957 + # source://prism//lib/prism/node.rb#1079 + sig { params(params: T.untyped).returns(Prism::BackReferenceReadNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#942 + # source://prism//lib/prism/node.rb#1064 + 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://yarp//lib/prism/node.rb#967 + # source://prism//lib/prism/node.rb#1090 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#971 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1095 def inspect(inspector = T.unsafe(nil)); end + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#1050 + 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 @@ -974,8 +1335,20 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#990 + # source://prism//lib/prism/node.rb#1115 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#1125 + def type; end + end end # A class that knows how to walk down the tree. None of the individual visit @@ -983,15 +1356,25 @@ end # implement each one that they need. For a default implementation that # continues walking the tree, see the Visitor class. # -# source://yarp//lib/prism/visitor.rb#13 +# source://prism//lib/prism/visitor.rb#13 class Prism::BasicVisitor - # source://yarp//lib/prism/visitor.rb#14 + # 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 - # source://yarp//lib/prism/visitor.rb#18 + # 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 - # source://yarp//lib/prism/visitor.rb#22 + # 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 @@ -1002,95 +1385,125 @@ end # end # ^^^^^ # -# source://yarp//lib/prism/node.rb#1001 +# source://prism//lib/prism/node.rb#1136 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://yarp//lib/prism/node.rb#1021 + # source://prism//lib/prism/node.rb#1156 + 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://yarp//lib/prism/node.rb#1032 + # source://prism//lib/prism/node.rb#1167 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def begin_keyword: () -> String? # - # source://yarp//lib/prism/node.rb#1082 + # source://prism//lib/prism/node.rb#1217 + sig { returns(T.nilable(String)) } def begin_keyword; end # attr_reader begin_keyword_loc: Location? # - # source://yarp//lib/prism/node.rb#1003 + # source://prism//lib/prism/node.rb#1138 + sig { returns(T.nilable(Prism::Location)) } def begin_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1041 + # source://prism//lib/prism/node.rb#1176 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#1056 + # source://prism//lib/prism/node.rb#1191 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#1046 + # source://prism//lib/prism/node.rb#1181 def compact_child_nodes; end # def copy: (**params) -> BeginNode # - # source://yarp//lib/prism/node.rb#1061 + # source://prism//lib/prism/node.rb#1196 + sig { params(params: T.untyped).returns(Prism::BeginNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1041 + # source://prism//lib/prism/node.rb#1176 + 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://yarp//lib/prism/node.rb#1077 + # source://prism//lib/prism/node.rb#1212 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#1012 + # source://prism//lib/prism/node.rb#1147 + sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://yarp//lib/prism/node.rb#1087 + # source://prism//lib/prism/node.rb#1222 + sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://yarp//lib/prism/node.rb#1018 + # source://prism//lib/prism/node.rb#1153 + sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # attr_reader ensure_clause: EnsureNode? # - # source://yarp//lib/prism/node.rb#1015 + # source://prism//lib/prism/node.rb#1150 + sig { returns(T.nilable(Prism::EnsureNode)) } def ensure_clause; end - # source://yarp//lib/prism/node.rb#1091 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1227 def inspect(inspector = T.unsafe(nil)); end # attr_reader rescue_clause: RescueNode? # - # source://yarp//lib/prism/node.rb#1009 + # source://prism//lib/prism/node.rb#1144 + sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end - # source://yarp//lib/prism/node.rb#1036 + # source://prism//lib/prism/node.rb#1171 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://yarp//lib/prism/node.rb#1006 + # source://prism//lib/prism/node.rb#1141 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of @@ -1108,8 +1521,20 @@ class Prism::BeginNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#1136 + # source://prism//lib/prism/node.rb#1272 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#1282 + def type; end + end end # Represents block method arguments. @@ -1117,67 +1542,82 @@ end # bar(&args) # ^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#1145 +# source://prism//lib/prism/node.rb#1291 class Prism::BlockArgumentNode < ::Prism::Node # def initialize: (expression: Node?, operator_loc: Location, location: Location) -> void # # @return [BlockArgumentNode] a new instance of BlockArgumentNode # - # source://yarp//lib/prism/node.rb#1153 + # source://prism//lib/prism/node.rb#1299 + 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://yarp//lib/prism/node.rb#1160 + # source://prism//lib/prism/node.rb#1306 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1165 + # source://prism//lib/prism/node.rb#1311 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#1177 + # source://prism//lib/prism/node.rb#1323 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#1170 + # source://prism//lib/prism/node.rb#1316 def compact_child_nodes; end # def copy: (**params) -> BlockArgumentNode # - # source://yarp//lib/prism/node.rb#1182 + # source://prism//lib/prism/node.rb#1328 + sig { params(params: T.untyped).returns(Prism::BlockArgumentNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1165 + # source://prism//lib/prism/node.rb#1311 + 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://yarp//lib/prism/node.rb#1194 + # source://prism//lib/prism/node.rb#1340 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#1147 + # source://prism//lib/prism/node.rb#1293 + sig { returns(T.nilable(Prism::Node)) } def expression; end - # source://yarp//lib/prism/node.rb#1203 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1350 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#1199 + # source://prism//lib/prism/node.rb#1345 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#1150 + # source://prism//lib/prism/node.rb#1296 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -1195,8 +1635,20 @@ class Prism::BlockArgumentNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#1229 + # source://prism//lib/prism/node.rb#1376 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#1386 + def type; end + end end # Represents a block local variable. @@ -1204,57 +1656,70 @@ end # a { |; b| } # ^ # -# source://yarp//lib/prism/node.rb#1238 +# source://prism//lib/prism/node.rb#1395 class Prism::BlockLocalVariableNode < ::Prism::Node # def initialize: (name: Symbol, location: Location) -> void # # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode # - # source://yarp//lib/prism/node.rb#1243 + # source://prism//lib/prism/node.rb#1400 + sig { params(name: Symbol, location: Prism::Location).void } def initialize(name, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#1249 + # source://prism//lib/prism/node.rb#1406 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1254 + # source://prism//lib/prism/node.rb#1411 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#1264 + # source://prism//lib/prism/node.rb#1421 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#1259 + # source://prism//lib/prism/node.rb#1416 def compact_child_nodes; end # def copy: (**params) -> BlockLocalVariableNode # - # source://yarp//lib/prism/node.rb#1269 + # source://prism//lib/prism/node.rb#1426 + sig { params(params: T.untyped).returns(Prism::BlockLocalVariableNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1254 + # source://prism//lib/prism/node.rb#1411 + 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://yarp//lib/prism/node.rb#1280 + # source://prism//lib/prism/node.rb#1437 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#1284 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1442 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#1240 + # source://prism//lib/prism/node.rb#1397 + sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of @@ -1272,8 +1737,20 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#1304 + # source://prism//lib/prism/node.rb#1462 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#1472 + def type; end + end end # Represents a block of ruby code. @@ -1281,87 +1758,115 @@ end # [1, 2, 3].each { |i| puts x } # ^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#1313 +# source://prism//lib/prism/node.rb#1481 class Prism::BlockNode < ::Prism::Node # def initialize: (locals: Array[Symbol], parameters: BlockParametersNode?, body: Node?, opening_loc: Location, closing_loc: Location, location: Location) -> void # # @return [BlockNode] a new instance of BlockNode # - # source://yarp//lib/prism/node.rb#1330 + # source://prism//lib/prism/node.rb#1498 + sig do + params( + locals: T::Array[Symbol], + parameters: T.nilable(Prism::BlockParametersNode), + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location, + location: Prism::Location + ).void + end def initialize(locals, parameters, body, opening_loc, closing_loc, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#1340 + # source://prism//lib/prism/node.rb#1508 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # - # source://yarp//lib/prism/node.rb#1321 + # source://prism//lib/prism/node.rb#1489 + sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1345 + # source://prism//lib/prism/node.rb#1513 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://yarp//lib/prism/node.rb#1388 + # source://prism//lib/prism/node.rb#1556 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://yarp//lib/prism/node.rb#1327 + # source://prism//lib/prism/node.rb#1495 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#1358 + # source://prism//lib/prism/node.rb#1526 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#1350 + # source://prism//lib/prism/node.rb#1518 def compact_child_nodes; end # def copy: (**params) -> BlockNode # - # source://yarp//lib/prism/node.rb#1363 + # source://prism//lib/prism/node.rb#1531 + sig { params(params: T.untyped).returns(Prism::BlockNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1345 + # source://prism//lib/prism/node.rb#1513 + 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://yarp//lib/prism/node.rb#1378 + # source://prism//lib/prism/node.rb#1546 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#1392 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1561 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://yarp//lib/prism/node.rb#1315 + # source://prism//lib/prism/node.rb#1483 + sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://yarp//lib/prism/node.rb#1383 + # source://prism//lib/prism/node.rb#1551 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://yarp//lib/prism/node.rb#1324 + # source://prism//lib/prism/node.rb#1492 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader parameters: BlockParametersNode? # - # source://yarp//lib/prism/node.rb#1318 + # source://prism//lib/prism/node.rb#1486 + sig { returns(T.nilable(Prism::BlockParametersNode)) } def parameters; end # Sometimes you want to check an instance of a node against a list of @@ -1379,8 +1884,20 @@ class Prism::BlockNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#1426 + # source://prism//lib/prism/node.rb#1595 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#1605 + def type; end + end end # Represents a block parameter to a method, block, or lambda definition. @@ -1389,72 +1906,95 @@ end # ^^ # end # -# source://yarp//lib/prism/node.rb#1436 +# source://prism//lib/prism/node.rb#1615 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://yarp//lib/prism/node.rb#1447 + # source://prism//lib/prism/node.rb#1626 + 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://yarp//lib/prism/node.rb#1455 + # source://prism//lib/prism/node.rb#1634 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1460 + # source://prism//lib/prism/node.rb#1639 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#1470 + # source://prism//lib/prism/node.rb#1649 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#1465 + # source://prism//lib/prism/node.rb#1644 def compact_child_nodes; end # def copy: (**params) -> BlockParameterNode # - # source://yarp//lib/prism/node.rb#1475 + # source://prism//lib/prism/node.rb#1654 + sig { params(params: T.untyped).returns(Prism::BlockParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1460 + # source://prism//lib/prism/node.rb#1639 + 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://yarp//lib/prism/node.rb#1488 + # source://prism//lib/prism/node.rb#1667 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#1497 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1677 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # - # source://yarp//lib/prism/node.rb#1438 + # source://prism//lib/prism/node.rb#1617 + sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://yarp//lib/prism/node.rb#1441 + # source://prism//lib/prism/node.rb#1620 + sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#1493 + # source://prism//lib/prism/node.rb#1672 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#1444 + # source://prism//lib/prism/node.rb#1623 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -1472,8 +2012,20 @@ class Prism::BlockParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#1519 + # source://prism//lib/prism/node.rb#1703 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#1713 + def type; end + end end # Represents a block's parameters declaration. @@ -1485,82 +2037,108 @@ end # ^^^^^^^^^^^^^^^^^ # end # -# source://yarp//lib/prism/node.rb#1532 +# source://prism//lib/prism/node.rb#1726 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://yarp//lib/prism/node.rb#1546 + # source://prism//lib/prism/node.rb#1740 + 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://yarp//lib/prism/node.rb#1555 + # source://prism//lib/prism/node.rb#1749 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1560 + # source://prism//lib/prism/node.rb#1754 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://yarp//lib/prism/node.rb#1602 + # source://prism//lib/prism/node.rb#1796 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://yarp//lib/prism/node.rb#1543 + # source://prism//lib/prism/node.rb#1737 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#1573 + # source://prism//lib/prism/node.rb#1767 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#1565 + # source://prism//lib/prism/node.rb#1759 def compact_child_nodes; end # def copy: (**params) -> BlockParametersNode # - # source://yarp//lib/prism/node.rb#1578 + # source://prism//lib/prism/node.rb#1772 + sig { params(params: T.untyped).returns(Prism::BlockParametersNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1560 + # source://prism//lib/prism/node.rb#1754 + 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://yarp//lib/prism/node.rb#1592 + # source://prism//lib/prism/node.rb#1786 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#1606 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1801 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Node] # - # source://yarp//lib/prism/node.rb#1537 + # source://prism//lib/prism/node.rb#1731 + sig { returns(T::Array[Prism::Node]) } def locals; end # def opening: () -> String? # - # source://yarp//lib/prism/node.rb#1597 + # source://prism//lib/prism/node.rb#1791 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://yarp//lib/prism/node.rb#1540 + # source://prism//lib/prism/node.rb#1734 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parameters: ParametersNode? # - # source://yarp//lib/prism/node.rb#1534 + # source://prism//lib/prism/node.rb#1728 + sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # Sometimes you want to check an instance of a node against a list of @@ -1578,8 +2156,20 @@ class Prism::BlockParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#1634 + # source://prism//lib/prism/node.rb#1829 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#1839 + def type; end + end end # Represents the use of the `break` keyword. @@ -1587,67 +2177,88 @@ end # break foo # ^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#1643 +# source://prism//lib/prism/node.rb#1848 class Prism::BreakNode < ::Prism::Node # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void # # @return [BreakNode] a new instance of BreakNode # - # source://yarp//lib/prism/node.rb#1651 + # source://prism//lib/prism/node.rb#1856 + 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://yarp//lib/prism/node.rb#1658 + # source://prism//lib/prism/node.rb#1863 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://yarp//lib/prism/node.rb#1645 + # source://prism//lib/prism/node.rb#1850 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1663 + # source://prism//lib/prism/node.rb#1868 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#1675 + # source://prism//lib/prism/node.rb#1880 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#1668 + # source://prism//lib/prism/node.rb#1873 def compact_child_nodes; end # def copy: (**params) -> BreakNode # - # source://yarp//lib/prism/node.rb#1680 + # source://prism//lib/prism/node.rb#1885 + sig { params(params: T.untyped).returns(Prism::BreakNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1663 + # source://prism//lib/prism/node.rb#1868 + 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://yarp//lib/prism/node.rb#1692 + # source://prism//lib/prism/node.rb#1897 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#1701 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#1907 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#1697 + # source://prism//lib/prism/node.rb#1902 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#1648 + # source://prism//lib/prism/node.rb#1853 + sig { returns(Prism::Location) } def keyword_loc; end # Sometimes you want to check an instance of a node against a list of @@ -1665,8 +2276,20 @@ class Prism::BreakNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#1727 + # source://prism//lib/prism/node.rb#1933 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#1943 + def type; end + end end # Represents the use of the `&&=` operator on a call. @@ -1674,124 +2297,132 @@ end # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#1736 +# source://prism//lib/prism/node.rb#1952 class Prism::CallAndWriteNode < ::Prism::Node - # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator_loc: Location, value: Node, location: Location) -> void + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void # # @return [CallAndWriteNode] a new instance of CallAndWriteNode # - # source://yarp//lib/prism/node.rb#1771 - def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location); end + # source://prism//lib/prism/node.rb#1978 + sig do + params( + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + flags: Integer, + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#1787 + # source://prism//lib/prism/node.rb#1991 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end - # attr_reader arguments: ArgumentsNode? - # - # source://yarp//lib/prism/node.rb#1750 - def arguments; end - # def call_operator: () -> String? # - # source://yarp//lib/prism/node.rb#1837 + # source://prism//lib/prism/node.rb#2037 + sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://yarp//lib/prism/node.rb#1741 + # source://prism//lib/prism/node.rb#1957 + sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1792 + # source://prism//lib/prism/node.rb#1996 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end - # def closing: () -> String? - # - # source://yarp//lib/prism/node.rb#1852 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/prism/node.rb#1753 - def closing_loc; end - # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#1806 + # source://prism//lib/prism/node.rb#2009 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#1797 + # source://prism//lib/prism/node.rb#2001 def compact_child_nodes; end # def copy: (**params) -> CallAndWriteNode # - # source://yarp//lib/prism/node.rb#1811 + # source://prism//lib/prism/node.rb#2014 + sig { params(params: T.untyped).returns(Prism::CallAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1792 + # source://prism//lib/prism/node.rb#1996 + 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://yarp//lib/prism/node.rb#1832 + # source://prism//lib/prism/node.rb#2032 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#1871 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2062 def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://yarp//lib/prism/node.rb#1842 + # source://prism//lib/prism/node.rb#2042 + sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://yarp//lib/prism/node.rb#1744 + # source://prism//lib/prism/node.rb#1960 + sig { returns(T.nilable(Prism::Location)) } def message_loc; end - # def opening: () -> String? - # - # source://yarp//lib/prism/node.rb#1847 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/prism/node.rb#1747 - def opening_loc; end - # def operator: () -> String # - # source://yarp//lib/prism/node.rb#1867 + # source://prism//lib/prism/node.rb#2057 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#1765 + # source://prism//lib/prism/node.rb#1972 + sig { returns(Prism::Location) } def operator_loc; end - # attr_reader read_name: String + # attr_reader read_name: Symbol # - # source://yarp//lib/prism/node.rb#1759 + # source://prism//lib/prism/node.rb#1966 + sig { returns(Symbol) } def read_name; end # attr_reader receiver: Node? # - # source://yarp//lib/prism/node.rb#1738 + # source://prism//lib/prism/node.rb#1954 + sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#1857 + # source://prism//lib/prism/node.rb#2047 + sig { returns(T::Boolean) } def safe_navigation?; end # Sometimes you want to check an instance of a node against a list of @@ -1809,32 +2440,48 @@ class Prism::CallAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#1913 + # source://prism//lib/prism/node.rb#2096 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#1768 + # source://prism//lib/prism/node.rb#1975 + sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#1862 + # source://prism//lib/prism/node.rb#2052 + sig { returns(T::Boolean) } def variable_call?; end - # attr_reader write_name: String + # attr_reader write_name: Symbol # - # source://yarp//lib/prism/node.rb#1762 + # source://prism//lib/prism/node.rb#1969 + sig { returns(Symbol) } def write_name; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#1756 + # source://prism//lib/prism/node.rb#1963 + 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#2106 + def type; end + end end # Represents a method call, in all of the various forms that can take. @@ -1857,119 +2504,157 @@ end # foo&.bar # ^^^^^^^^ # -# source://yarp//lib/prism/node.rb#1937 +# source://prism//lib/prism/node.rb#2130 class Prism::CallNode < ::Prism::Node - # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, flags: Integer, name: String, location: Location) -> void + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Node?, flags: Integer, name: Symbol, location: Location) -> void # # @return [CallNode] a new instance of CallNode # - # source://yarp//lib/prism/node.rb#1966 + # source://prism//lib/prism/node.rb#2159 + sig do + params( + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + 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), + flags: Integer, + name: Symbol, + location: Prism::Location + ).void + end def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#1980 + # source://prism//lib/prism/node.rb#2173 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://yarp//lib/prism/node.rb#1951 + # source://prism//lib/prism/node.rb#2144 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # attr_reader block: Node? # - # source://yarp//lib/prism/node.rb#1957 + # source://prism//lib/prism/node.rb#2150 + sig { returns(T.nilable(Prism::Node)) } def block; end # def call_operator: () -> String? # - # source://yarp//lib/prism/node.rb#2028 + # source://prism//lib/prism/node.rb#2221 + sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://yarp//lib/prism/node.rb#1942 + # source://prism//lib/prism/node.rb#2135 + sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1985 + # source://prism//lib/prism/node.rb#2178 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://yarp//lib/prism/node.rb#2043 + # source://prism//lib/prism/node.rb#2236 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://yarp//lib/prism/node.rb#1954 + # source://prism//lib/prism/node.rb#2147 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#1999 + # source://prism//lib/prism/node.rb#2192 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#1990 + # source://prism//lib/prism/node.rb#2183 def compact_child_nodes; end # def copy: (**params) -> CallNode # - # source://yarp//lib/prism/node.rb#2004 + # source://prism//lib/prism/node.rb#2197 + sig { params(params: T.untyped).returns(Prism::CallNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#1985 + # source://prism//lib/prism/node.rb#2178 + 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://yarp//lib/prism/node.rb#2023 + # source://prism//lib/prism/node.rb#2216 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#2057 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2251 def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://yarp//lib/prism/node.rb#2033 + # source://prism//lib/prism/node.rb#2226 + sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://yarp//lib/prism/node.rb#1945 + # source://prism//lib/prism/node.rb#2138 + sig { returns(T.nilable(Prism::Location)) } def message_loc; end - # attr_reader name: String + # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#1963 + # source://prism//lib/prism/node.rb#2156 + sig { returns(Symbol) } def name; end # def opening: () -> String? # - # source://yarp//lib/prism/node.rb#2038 + # source://prism//lib/prism/node.rb#2231 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://yarp//lib/prism/node.rb#1948 + # source://prism//lib/prism/node.rb#2141 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader receiver: Node? # - # source://yarp//lib/prism/node.rb#1939 + # source://prism//lib/prism/node.rb#2132 + sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#2048 + # source://prism//lib/prism/node.rb#2241 + sig { returns(T::Boolean) } def safe_navigation?; end # Sometimes you want to check an instance of a node against a list of @@ -1987,35 +2672,51 @@ class Prism::CallNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#2101 + # source://prism//lib/prism/node.rb#2295 def type; end # def variable_call?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#2053 + # source://prism//lib/prism/node.rb#2246 + sig { returns(T::Boolean) } def variable_call?; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#1960 + # source://prism//lib/prism/node.rb#2153 + 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#2305 + def type; end + end end -# source://yarp//lib/prism/node.rb#14478 +# Flags for call nodes. +# +# source://prism//lib/prism/node.rb#16611 module Prism::CallNodeFlags; end # &. operator # -# source://yarp//lib/prism/node.rb#14480 +# source://prism//lib/prism/node.rb#16613 Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) # a call that could have been a local variable # -# source://yarp//lib/prism/node.rb#14483 +# source://prism//lib/prism/node.rb#16616 Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # Represents the use of an assignment operator on a call. @@ -2023,124 +2724,133 @@ Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # foo.bar += baz # ^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#2110 +# source://prism//lib/prism/node.rb#2314 class Prism::CallOperatorWriteNode < ::Prism::Node - # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void # # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode # - # source://yarp//lib/prism/node.rb#2148 - def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator, operator_loc, value, location); end + # source://prism//lib/prism/node.rb#2343 + sig do + params( + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + flags: Integer, + read_name: Symbol, + write_name: Symbol, + operator: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator, operator_loc, value, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#2165 + # source://prism//lib/prism/node.rb#2357 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end - # attr_reader arguments: ArgumentsNode? - # - # source://yarp//lib/prism/node.rb#2124 - def arguments; end - # def call_operator: () -> String? # - # source://yarp//lib/prism/node.rb#2216 + # source://prism//lib/prism/node.rb#2404 + sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://yarp//lib/prism/node.rb#2115 + # source://prism//lib/prism/node.rb#2319 + sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2170 + # source://prism//lib/prism/node.rb#2362 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end - # def closing: () -> String? - # - # source://yarp//lib/prism/node.rb#2231 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/prism/node.rb#2127 - def closing_loc; end - # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#2184 + # source://prism//lib/prism/node.rb#2375 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#2175 + # source://prism//lib/prism/node.rb#2367 def compact_child_nodes; end # def copy: (**params) -> CallOperatorWriteNode # - # source://yarp//lib/prism/node.rb#2189 + # source://prism//lib/prism/node.rb#2380 + sig { params(params: T.untyped).returns(Prism::CallOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2170 + # source://prism//lib/prism/node.rb#2362 + 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://yarp//lib/prism/node.rb#2211 + # source://prism//lib/prism/node.rb#2399 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#2245 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2424 def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://yarp//lib/prism/node.rb#2221 + # source://prism//lib/prism/node.rb#2409 + sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://yarp//lib/prism/node.rb#2118 + # source://prism//lib/prism/node.rb#2322 + sig { returns(T.nilable(Prism::Location)) } def message_loc; end - # def opening: () -> String? - # - # source://yarp//lib/prism/node.rb#2226 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/prism/node.rb#2121 - def opening_loc; end - # attr_reader operator: Symbol # - # source://yarp//lib/prism/node.rb#2139 + # source://prism//lib/prism/node.rb#2334 + sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#2142 + # source://prism//lib/prism/node.rb#2337 + sig { returns(Prism::Location) } def operator_loc; end - # attr_reader read_name: String + # attr_reader read_name: Symbol # - # source://yarp//lib/prism/node.rb#2133 + # source://prism//lib/prism/node.rb#2328 + sig { returns(Symbol) } def read_name; end # attr_reader receiver: Node? # - # source://yarp//lib/prism/node.rb#2112 + # source://prism//lib/prism/node.rb#2316 + sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#2236 + # source://prism//lib/prism/node.rb#2414 + sig { returns(T::Boolean) } def safe_navigation?; end # Sometimes you want to check an instance of a node against a list of @@ -2158,32 +2868,48 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#2288 + # source://prism//lib/prism/node.rb#2459 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#2145 + # source://prism//lib/prism/node.rb#2340 + sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#2241 + # source://prism//lib/prism/node.rb#2419 + sig { returns(T::Boolean) } def variable_call?; end - # attr_reader write_name: String + # attr_reader write_name: Symbol # - # source://yarp//lib/prism/node.rb#2136 + # source://prism//lib/prism/node.rb#2331 + sig { returns(Symbol) } def write_name; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#2130 + # source://prism//lib/prism/node.rb#2325 + 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#2469 + def type; end + end end # Represents the use of the `||=` operator on a call. @@ -2191,124 +2917,132 @@ end # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#2297 +# source://prism//lib/prism/node.rb#2478 class Prism::CallOrWriteNode < ::Prism::Node - # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, flags: Integer, read_name: String, write_name: String, operator_loc: Location, value: Node, location: Location) -> void + # def initialize: (receiver: Node?, call_operator_loc: Location?, message_loc: Location?, flags: Integer, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Node, location: Location) -> void # # @return [CallOrWriteNode] a new instance of CallOrWriteNode # - # source://yarp//lib/prism/node.rb#2332 - def initialize(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location); end + # source://prism//lib/prism/node.rb#2504 + sig do + params( + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + flags: Integer, + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#2348 + # source://prism//lib/prism/node.rb#2517 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end - # attr_reader arguments: ArgumentsNode? - # - # source://yarp//lib/prism/node.rb#2311 - def arguments; end - # def call_operator: () -> String? # - # source://yarp//lib/prism/node.rb#2398 + # source://prism//lib/prism/node.rb#2563 + sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://yarp//lib/prism/node.rb#2302 + # source://prism//lib/prism/node.rb#2483 + sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2353 + # source://prism//lib/prism/node.rb#2522 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end - # def closing: () -> String? - # - # source://yarp//lib/prism/node.rb#2413 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/prism/node.rb#2314 - def closing_loc; end - # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#2367 + # source://prism//lib/prism/node.rb#2535 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#2358 + # source://prism//lib/prism/node.rb#2527 def compact_child_nodes; end # def copy: (**params) -> CallOrWriteNode # - # source://yarp//lib/prism/node.rb#2372 + # source://prism//lib/prism/node.rb#2540 + sig { params(params: T.untyped).returns(Prism::CallOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2353 + # source://prism//lib/prism/node.rb#2522 + 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://yarp//lib/prism/node.rb#2393 + # source://prism//lib/prism/node.rb#2558 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#2432 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2588 def inspect(inspector = T.unsafe(nil)); end # def message: () -> String? # - # source://yarp//lib/prism/node.rb#2403 + # source://prism//lib/prism/node.rb#2568 + sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://yarp//lib/prism/node.rb#2305 + # source://prism//lib/prism/node.rb#2486 + sig { returns(T.nilable(Prism::Location)) } def message_loc; end - # def opening: () -> String? - # - # source://yarp//lib/prism/node.rb#2408 - def opening; end - - # attr_reader opening_loc: Location? - # - # source://yarp//lib/prism/node.rb#2308 - def opening_loc; end - # def operator: () -> String # - # source://yarp//lib/prism/node.rb#2428 + # source://prism//lib/prism/node.rb#2583 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#2326 + # source://prism//lib/prism/node.rb#2498 + sig { returns(Prism::Location) } def operator_loc; end - # attr_reader read_name: String + # attr_reader read_name: Symbol # - # source://yarp//lib/prism/node.rb#2320 + # source://prism//lib/prism/node.rb#2492 + sig { returns(Symbol) } def read_name; end # attr_reader receiver: Node? # - # source://yarp//lib/prism/node.rb#2299 + # source://prism//lib/prism/node.rb#2480 + sig { returns(T.nilable(Prism::Node)) } def receiver; end # def safe_navigation?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#2418 + # source://prism//lib/prism/node.rb#2573 + sig { returns(T::Boolean) } def safe_navigation?; end # Sometimes you want to check an instance of a node against a list of @@ -2326,32 +3060,48 @@ class Prism::CallOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#2474 + # source://prism//lib/prism/node.rb#2622 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#2329 + # source://prism//lib/prism/node.rb#2501 + sig { returns(Prism::Node) } def value; end # def variable_call?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#2423 + # source://prism//lib/prism/node.rb#2578 + sig { returns(T::Boolean) } def variable_call?; end - # attr_reader write_name: String + # attr_reader write_name: Symbol # - # source://yarp//lib/prism/node.rb#2323 + # source://prism//lib/prism/node.rb#2495 + sig { returns(Symbol) } def write_name; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#2317 + # source://prism//lib/prism/node.rb#2489 + 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#2632 + def type; end + end end # Represents assigning to a local variable in pattern matching. @@ -2359,67 +3109,89 @@ end # foo => [bar => baz] # ^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#2483 +# source://prism//lib/prism/node.rb#2641 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://yarp//lib/prism/node.rb#2494 + # source://prism//lib/prism/node.rb#2652 + 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://yarp//lib/prism/node.rb#2502 + # source://prism//lib/prism/node.rb#2660 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2507 + # source://prism//lib/prism/node.rb#2665 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#2517 + # source://prism//lib/prism/node.rb#2675 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#2512 + # source://prism//lib/prism/node.rb#2670 def compact_child_nodes; end # def copy: (**params) -> CapturePatternNode # - # source://yarp//lib/prism/node.rb#2522 + # source://prism//lib/prism/node.rb#2680 + sig { params(params: T.untyped).returns(Prism::CapturePatternNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2507 + # source://prism//lib/prism/node.rb#2665 + 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://yarp//lib/prism/node.rb#2535 + # source://prism//lib/prism/node.rb#2693 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#2544 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2703 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#2540 + # source://prism//lib/prism/node.rb#2698 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#2491 + # source://prism//lib/prism/node.rb#2649 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: Node # - # source://yarp//lib/prism/node.rb#2488 + # source://prism//lib/prism/node.rb#2646 + sig { returns(Prism::Node) } def target; end # Sometimes you want to check an instance of a node against a list of @@ -2437,103 +3209,293 @@ class Prism::CapturePatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#2568 + # source://prism//lib/prism/node.rb#2727 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#2485 + # source://prism//lib/prism/node.rb#2643 + 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#2737 + 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#2748 +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#2765 + 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#2775 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def case_keyword: () -> String + # + # source://prism//lib/prism/node.rb#2819 + sig { returns(String) } + def case_keyword; end + + # attr_reader case_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#2759 + sig { returns(Prism::Location) } + def case_keyword_loc; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#2780 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#2794 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#2785 + def compact_child_nodes; end + + # attr_reader conditions: Array[Node] + # + # source://prism//lib/prism/node.rb#2753 + sig { returns(T::Array[Prism::Node]) } + def conditions; end + + # attr_reader consequent: ElseNode? + # + # source://prism//lib/prism/node.rb#2756 + sig { returns(T.nilable(Prism::ElseNode)) } + def consequent; end + + # def copy: (**params) -> CaseMatchNode + # + # source://prism//lib/prism/node.rb#2799 + 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#2780 + 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#2814 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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#2824 + sig { returns(String) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#2762 + sig { returns(Prism::Location) } + def end_keyword_loc; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2829 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader predicate: Node? + # + # source://prism//lib/prism/node.rb#2750 + 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#2863 + 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#2873 + def type; end + end end # Represents the use of a case statement. # -# case true -# ^^^^^^^^^ -# when false -# end +# case true +# when false +# end +# ^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#2579 +# source://prism//lib/prism/node.rb#2884 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://yarp//lib/prism/node.rb#2596 + # source://prism//lib/prism/node.rb#2901 + 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://yarp//lib/prism/node.rb#2606 + # source://prism//lib/prism/node.rb#2911 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def case_keyword: () -> String # - # source://yarp//lib/prism/node.rb#2650 + # source://prism//lib/prism/node.rb#2955 + sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#2590 + # source://prism//lib/prism/node.rb#2895 + sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2611 + # source://prism//lib/prism/node.rb#2916 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#2625 + # source://prism//lib/prism/node.rb#2930 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#2616 + # source://prism//lib/prism/node.rb#2921 def compact_child_nodes; end # attr_reader conditions: Array[Node] # - # source://yarp//lib/prism/node.rb#2584 + # source://prism//lib/prism/node.rb#2889 + sig { returns(T::Array[Prism::Node]) } def conditions; end # attr_reader consequent: ElseNode? # - # source://yarp//lib/prism/node.rb#2587 + # source://prism//lib/prism/node.rb#2892 + sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end # def copy: (**params) -> CaseNode # - # source://yarp//lib/prism/node.rb#2630 + # source://prism//lib/prism/node.rb#2935 + sig { params(params: T.untyped).returns(Prism::CaseNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2611 + # source://prism//lib/prism/node.rb#2916 + 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://yarp//lib/prism/node.rb#2645 + # source://prism//lib/prism/node.rb#2950 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#2655 + # source://prism//lib/prism/node.rb#2960 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#2593 + # source://prism//lib/prism/node.rb#2898 + sig { returns(Prism::Location) } def end_keyword_loc; end - # source://yarp//lib/prism/node.rb#2659 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#2965 def inspect(inspector = T.unsafe(nil)); end # attr_reader predicate: Node? # - # source://yarp//lib/prism/node.rb#2581 + # source://prism//lib/prism/node.rb#2886 + sig { returns(T.nilable(Prism::Node)) } def predicate; end # Sometimes you want to check an instance of a node against a list of @@ -2551,8 +3513,20 @@ class Prism::CaseNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#2693 + # source://prism//lib/prism/node.rb#2999 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#3009 + def type; end + end end # Represents a class declaration involving the `class` keyword. @@ -2560,107 +3534,142 @@ end # class Foo end # ^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#2702 +# source://prism//lib/prism/node.rb#3018 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://yarp//lib/prism/node.rb#2728 + # source://prism//lib/prism/node.rb#3044 + 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://yarp//lib/prism/node.rb#2741 + # source://prism//lib/prism/node.rb#3057 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # - # source://yarp//lib/prism/node.rb#2719 + # source://prism//lib/prism/node.rb#3035 + sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2746 + # source://prism//lib/prism/node.rb#3062 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://yarp//lib/prism/node.rb#2788 + # source://prism//lib/prism/node.rb#3104 + sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#2707 + # source://prism//lib/prism/node.rb#3023 + sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#2760 + # source://prism//lib/prism/node.rb#3076 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#2751 + # source://prism//lib/prism/node.rb#3067 def compact_child_nodes; end # attr_reader constant_path: Node # - # source://yarp//lib/prism/node.rb#2710 + # source://prism//lib/prism/node.rb#3026 + sig { returns(Prism::Node) } def constant_path; end # def copy: (**params) -> ClassNode # - # source://yarp//lib/prism/node.rb#2765 + # source://prism//lib/prism/node.rb#3081 + sig { params(params: T.untyped).returns(Prism::ClassNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2746 + # source://prism//lib/prism/node.rb#3062 + 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://yarp//lib/prism/node.rb#2783 + # source://prism//lib/prism/node.rb#3099 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#2798 + # source://prism//lib/prism/node.rb#3114 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#2722 + # source://prism//lib/prism/node.rb#3038 + sig { returns(Prism::Location) } def end_keyword_loc; end # def inheritance_operator: () -> String? # - # source://yarp//lib/prism/node.rb#2793 + # source://prism//lib/prism/node.rb#3109 + sig { returns(T.nilable(String)) } def inheritance_operator; end # attr_reader inheritance_operator_loc: Location? # - # source://yarp//lib/prism/node.rb#2713 + # source://prism//lib/prism/node.rb#3029 + sig { returns(T.nilable(Prism::Location)) } def inheritance_operator_loc; end - # source://yarp//lib/prism/node.rb#2802 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3119 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://yarp//lib/prism/node.rb#2704 + # source://prism//lib/prism/node.rb#3020 + sig { returns(T::Array[Symbol]) } def locals; end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#2725 + # source://prism//lib/prism/node.rb#3041 + sig { returns(Symbol) } def name; end # attr_reader superclass: Node? # - # source://yarp//lib/prism/node.rb#2716 + # source://prism//lib/prism/node.rb#3032 + sig { returns(T.nilable(Prism::Node)) } def superclass; end # Sometimes you want to check an instance of a node against a list of @@ -2678,81 +3687,117 @@ class Prism::ClassNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#2840 + # source://prism//lib/prism/node.rb#3157 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#3167 + def type; end + end end # Represents the use of the `&&=` operator for assignment to a class variable. # # @@target &&= value -# ^^^^^^^^^^^^^^^^ +# ^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#2849 +# source://prism//lib/prism/node.rb#3176 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://yarp//lib/prism/node.rb#2863 + # source://prism//lib/prism/node.rb#3190 + 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://yarp//lib/prism/node.rb#2872 + # source://prism//lib/prism/node.rb#3199 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2877 + # source://prism//lib/prism/node.rb#3204 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#2887 + # source://prism//lib/prism/node.rb#3214 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#2882 + # source://prism//lib/prism/node.rb#3209 def compact_child_nodes; end # def copy: (**params) -> ClassVariableAndWriteNode # - # source://yarp//lib/prism/node.rb#2892 + # source://prism//lib/prism/node.rb#3219 + sig { params(params: T.untyped).returns(Prism::ClassVariableAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2877 + # source://prism//lib/prism/node.rb#3204 + 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://yarp//lib/prism/node.rb#2906 + # source://prism//lib/prism/node.rb#3233 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#2915 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3243 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#2851 + # source://prism//lib/prism/node.rb#3178 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#2854 + # source://prism//lib/prism/node.rb#3181 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#2911 + # source://prism//lib/prism/node.rb#3238 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#2857 + # source://prism//lib/prism/node.rb#3184 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -2770,13 +3815,26 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#2939 + # source://prism//lib/prism/node.rb#3267 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#2860 + # source://prism//lib/prism/node.rb#3187 + 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#3277 + def type; end + end end # Represents assigning to a class variable using an operator that isn't `=`. @@ -2784,72 +3842,97 @@ end # @@target += value # ^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#2948 +# source://prism//lib/prism/node.rb#3286 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://yarp//lib/prism/node.rb#2965 + # source://prism//lib/prism/node.rb#3303 + 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://yarp//lib/prism/node.rb#2975 + # source://prism//lib/prism/node.rb#3313 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2980 + # source://prism//lib/prism/node.rb#3318 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#2990 + # source://prism//lib/prism/node.rb#3328 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#2985 + # source://prism//lib/prism/node.rb#3323 def compact_child_nodes; end # def copy: (**params) -> ClassVariableOperatorWriteNode # - # source://yarp//lib/prism/node.rb#2995 + # source://prism//lib/prism/node.rb#3333 + sig { params(params: T.untyped).returns(Prism::ClassVariableOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#2980 + # source://prism//lib/prism/node.rb#3318 + 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://yarp//lib/prism/node.rb#3010 + # source://prism//lib/prism/node.rb#3348 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#3014 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3353 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#2950 + # source://prism//lib/prism/node.rb#3288 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#2953 + # source://prism//lib/prism/node.rb#3291 + sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://yarp//lib/prism/node.rb#2962 + # source://prism//lib/prism/node.rb#3300 + sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#2956 + # source://prism//lib/prism/node.rb#3294 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -2867,13 +3950,26 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#3039 + # source://prism//lib/prism/node.rb#3378 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#2959 + # source://prism//lib/prism/node.rb#3297 + 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#3388 + def type; end + end end # Represents the use of the `||=` operator for assignment to a class variable. @@ -2881,72 +3977,96 @@ end # @@target ||= value # ^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#3048 +# source://prism//lib/prism/node.rb#3397 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://yarp//lib/prism/node.rb#3062 + # source://prism//lib/prism/node.rb#3411 + 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://yarp//lib/prism/node.rb#3071 + # source://prism//lib/prism/node.rb#3420 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3076 + # source://prism//lib/prism/node.rb#3425 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#3086 + # source://prism//lib/prism/node.rb#3435 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#3081 + # source://prism//lib/prism/node.rb#3430 def compact_child_nodes; end # def copy: (**params) -> ClassVariableOrWriteNode # - # source://yarp//lib/prism/node.rb#3091 + # source://prism//lib/prism/node.rb#3440 + sig { params(params: T.untyped).returns(Prism::ClassVariableOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3076 + # source://prism//lib/prism/node.rb#3425 + 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://yarp//lib/prism/node.rb#3105 + # source://prism//lib/prism/node.rb#3454 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#3114 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3464 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#3050 + # source://prism//lib/prism/node.rb#3399 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#3053 + # source://prism//lib/prism/node.rb#3402 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#3110 + # source://prism//lib/prism/node.rb#3459 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#3056 + # source://prism//lib/prism/node.rb#3405 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -2964,13 +4084,26 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#3138 + # source://prism//lib/prism/node.rb#3488 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#3059 + # source://prism//lib/prism/node.rb#3408 + 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#3498 + def type; end + end end # Represents referencing a class variable. @@ -2978,57 +4111,70 @@ end # @@foo # ^^^^^ # -# source://yarp//lib/prism/node.rb#3147 +# source://prism//lib/prism/node.rb#3507 class Prism::ClassVariableReadNode < ::Prism::Node # def initialize: (name: Symbol, location: Location) -> void # # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode # - # source://yarp//lib/prism/node.rb#3152 + # source://prism//lib/prism/node.rb#3512 + sig { params(name: Symbol, location: Prism::Location).void } def initialize(name, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#3158 + # source://prism//lib/prism/node.rb#3518 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3163 + # source://prism//lib/prism/node.rb#3523 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#3173 + # source://prism//lib/prism/node.rb#3533 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#3168 + # source://prism//lib/prism/node.rb#3528 def compact_child_nodes; end # def copy: (**params) -> ClassVariableReadNode # - # source://yarp//lib/prism/node.rb#3178 + # source://prism//lib/prism/node.rb#3538 + sig { params(params: T.untyped).returns(Prism::ClassVariableReadNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3163 + # source://prism//lib/prism/node.rb#3523 + 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://yarp//lib/prism/node.rb#3189 + # source://prism//lib/prism/node.rb#3549 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#3193 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3554 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#3149 + # source://prism//lib/prism/node.rb#3509 + sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of @@ -3046,8 +4192,20 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#3213 + # source://prism//lib/prism/node.rb#3574 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#3584 + def type; end + end end # Represents writing to a class variable in a context that doesn't have an explicit value. @@ -3055,57 +4213,70 @@ end # @@foo, @@bar = baz # ^^^^^ ^^^^^ # -# source://yarp//lib/prism/node.rb#3222 +# source://prism//lib/prism/node.rb#3593 class Prism::ClassVariableTargetNode < ::Prism::Node # def initialize: (name: Symbol, location: Location) -> void # # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode # - # source://yarp//lib/prism/node.rb#3227 + # source://prism//lib/prism/node.rb#3598 + sig { params(name: Symbol, location: Prism::Location).void } def initialize(name, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#3233 + # source://prism//lib/prism/node.rb#3604 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3238 + # source://prism//lib/prism/node.rb#3609 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#3248 + # source://prism//lib/prism/node.rb#3619 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#3243 + # source://prism//lib/prism/node.rb#3614 def compact_child_nodes; end # def copy: (**params) -> ClassVariableTargetNode # - # source://yarp//lib/prism/node.rb#3253 + # source://prism//lib/prism/node.rb#3624 + sig { params(params: T.untyped).returns(Prism::ClassVariableTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3238 + # source://prism//lib/prism/node.rb#3609 + 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://yarp//lib/prism/node.rb#3264 + # source://prism//lib/prism/node.rb#3635 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#3268 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3640 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#3224 + # source://prism//lib/prism/node.rb#3595 + sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of @@ -3123,8 +4294,20 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#3288 + # source://prism//lib/prism/node.rb#3660 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#3670 + def type; end + end end # Represents writing to a class variable. @@ -3132,72 +4315,96 @@ end # @@foo = 1 # ^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#3297 +# source://prism//lib/prism/node.rb#3679 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://yarp//lib/prism/node.rb#3311 + # source://prism//lib/prism/node.rb#3693 + 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://yarp//lib/prism/node.rb#3320 + # source://prism//lib/prism/node.rb#3702 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3325 + # source://prism//lib/prism/node.rb#3707 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#3335 + # source://prism//lib/prism/node.rb#3717 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#3330 + # source://prism//lib/prism/node.rb#3712 def compact_child_nodes; end # def copy: (**params) -> ClassVariableWriteNode # - # source://yarp//lib/prism/node.rb#3340 + # source://prism//lib/prism/node.rb#3722 + sig { params(params: T.untyped).returns(Prism::ClassVariableWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3325 + # source://prism//lib/prism/node.rb#3707 + 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://yarp//lib/prism/node.rb#3354 + # source://prism//lib/prism/node.rb#3736 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#3363 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3746 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#3299 + # source://prism//lib/prism/node.rb#3681 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#3302 + # source://prism//lib/prism/node.rb#3684 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # - # source://yarp//lib/prism/node.rb#3359 + # source://prism//lib/prism/node.rb#3741 + sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://yarp//lib/prism/node.rb#3308 + # source://prism//lib/prism/node.rb#3690 + sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -3215,51 +4422,60 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#3387 + # source://prism//lib/prism/node.rb#3770 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#3305 + # source://prism//lib/prism/node.rb#3687 + 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#3780 + def type; end + end end -# This represents a comment that was encountered during parsing. +# This represents a comment that was encountered during parsing. It is the +# base class for all comment types. # -# source://yarp//lib/prism/parse_result.rb#145 +# 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://yarp//lib/prism/parse_result.rb#150 - def initialize(type, location); end + # source://prism//lib/prism/parse_result.rb#233 + def initialize(location); end - # source://yarp//lib/prism/parse_result.rb#155 + # Implement the hash pattern matching interface for Comment. + # + # source://prism//lib/prism/parse_result.rb#238 def deconstruct_keys(keys); end - # source://yarp//lib/prism/parse_result.rb#164 - def inspect; end - - # Returns the value of attribute location. + # The location of this comment in the source. # - # source://yarp//lib/prism/parse_result.rb#148 + # source://prism//lib/prism/parse_result.rb#230 + sig { returns(Prism::Location) } def location; end - # Returns true if the comment happens on the same line as other code and false if the comment is by itself + # This can only be true for inline comments. # # @return [Boolean] # - # source://yarp//lib/prism/parse_result.rb#160 + # source://prism//lib/prism/parse_result.rb#243 + sig { returns(T::Boolean) } def trailing?; end - - # Returns the value of attribute type. - # - # source://yarp//lib/prism/parse_result.rb#148 - def type; end end -# source://yarp//lib/prism/parse_result.rb#146 -Prism::Comment::TYPES = T.let(T.unsafe(nil), Array) - # 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. @@ -3277,867 +4493,885 @@ Prism::Comment::TYPES = T.let(T.unsafe(nil), Array) # Prism.parse("1 + 2").value.accept(SExpressions.new) # # => [:program, [[[:call, [[:integer], [:arguments, [[:integer]]]]]]]] # -# source://yarp//lib/prism/compiler.rb#26 +# source://prism//lib/prism/compiler.rb#26 class Prism::Compiler # Visit an individual node. # - # source://yarp//lib/prism/compiler.rb#28 + # source://prism//lib/prism/compiler.rb#28 def visit(node); end # Visit the child nodes of the given node. # Compile a AliasGlobalVariableNode node # - # source://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#38 def visit_alias_method_node(node); end # Visit a list of nodes. # - # source://yarp//lib/prism/compiler.rb#33 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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 CapturePatternNode node # - # source://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#38 def visit_case_node(node); end # Visit the child nodes of the given node. # - # source://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#38 def visit_implicit_node(node); end # Visit the child nodes of the given node. # Compile a InNode node # - # source://yarp//lib/prism/compiler.rb#38 + # 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 InstanceVariableAndWriteNode node # - # source://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#38 def visit_keyword_hash_node(node); end - # Visit the child nodes of the given node. - # Compile a KeywordParameterNode node - # - # source://yarp//lib/prism/compiler.rb#38 - def visit_keyword_parameter_node(node); end - # Visit the child nodes of the given node. # Compile a KeywordRestParameterNode node # - # source://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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 NumberedReferenceReadNode node # - # source://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#38 def visit_regular_expression_node(node); end # Visit the child nodes of the given node. - # Compile a RequiredDestructuredParameterNode node + # Compile a RequiredKeywordParameterNode node # - # source://yarp//lib/prism/compiler.rb#38 - def visit_required_destructured_parameter_node(node); end + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#38 def visit_statements_node(node); end - # Visit the child nodes of the given node. - # Compile a StringConcatNode node - # - # source://yarp//lib/prism/compiler.rb#38 - def visit_string_concat_node(node); end - # Visit the child nodes of the given node. # Compile a StringNode node # - # source://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # 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://yarp//lib/prism/compiler.rb#38 + # source://prism//lib/prism/compiler.rb#38 def visit_yield_node(node); end end @@ -4146,72 +5380,96 @@ end # Target &&= value # ^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#3396 +# source://prism//lib/prism/node.rb#3789 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://yarp//lib/prism/node.rb#3410 + # source://prism//lib/prism/node.rb#3803 + 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://yarp//lib/prism/node.rb#3419 + # source://prism//lib/prism/node.rb#3812 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3424 + # source://prism//lib/prism/node.rb#3817 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#3434 + # source://prism//lib/prism/node.rb#3827 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#3429 + # source://prism//lib/prism/node.rb#3822 def compact_child_nodes; end # def copy: (**params) -> ConstantAndWriteNode # - # source://yarp//lib/prism/node.rb#3439 + # source://prism//lib/prism/node.rb#3832 + sig { params(params: T.untyped).returns(Prism::ConstantAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3424 + # source://prism//lib/prism/node.rb#3817 + 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://yarp//lib/prism/node.rb#3453 + # source://prism//lib/prism/node.rb#3846 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#3462 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3856 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#3398 + # source://prism//lib/prism/node.rb#3791 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#3401 + # source://prism//lib/prism/node.rb#3794 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#3458 + # source://prism//lib/prism/node.rb#3851 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#3404 + # source://prism//lib/prism/node.rb#3797 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -4229,13 +5487,26 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#3486 + # source://prism//lib/prism/node.rb#3880 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#3407 + # source://prism//lib/prism/node.rb#3800 + 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#3890 + def type; end + end end # Represents assigning to a constant using an operator that isn't `=`. @@ -4243,72 +5514,97 @@ end # Target += value # ^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#3495 +# source://prism//lib/prism/node.rb#3899 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://yarp//lib/prism/node.rb#3512 + # source://prism//lib/prism/node.rb#3916 + 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://yarp//lib/prism/node.rb#3522 + # source://prism//lib/prism/node.rb#3926 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3527 + # source://prism//lib/prism/node.rb#3931 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#3537 + # source://prism//lib/prism/node.rb#3941 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#3532 + # source://prism//lib/prism/node.rb#3936 def compact_child_nodes; end # def copy: (**params) -> ConstantOperatorWriteNode # - # source://yarp//lib/prism/node.rb#3542 + # source://prism//lib/prism/node.rb#3946 + sig { params(params: T.untyped).returns(Prism::ConstantOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3527 + # source://prism//lib/prism/node.rb#3931 + 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://yarp//lib/prism/node.rb#3557 + # source://prism//lib/prism/node.rb#3961 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#3561 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#3966 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#3497 + # source://prism//lib/prism/node.rb#3901 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#3500 + # source://prism//lib/prism/node.rb#3904 + sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://yarp//lib/prism/node.rb#3509 + # source://prism//lib/prism/node.rb#3913 + sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#3503 + # source://prism//lib/prism/node.rb#3907 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -4326,13 +5622,26 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#3586 + # source://prism//lib/prism/node.rb#3991 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#3506 + # source://prism//lib/prism/node.rb#3910 + 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#4001 + def type; end + end end # Represents the use of the `||=` operator for assignment to a constant. @@ -4340,72 +5649,96 @@ end # Target ||= value # ^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#3595 +# source://prism//lib/prism/node.rb#4010 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://yarp//lib/prism/node.rb#3609 + # source://prism//lib/prism/node.rb#4024 + 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://yarp//lib/prism/node.rb#3618 + # source://prism//lib/prism/node.rb#4033 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3623 + # source://prism//lib/prism/node.rb#4038 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#3633 + # source://prism//lib/prism/node.rb#4048 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#3628 + # source://prism//lib/prism/node.rb#4043 def compact_child_nodes; end # def copy: (**params) -> ConstantOrWriteNode # - # source://yarp//lib/prism/node.rb#3638 + # source://prism//lib/prism/node.rb#4053 + sig { params(params: T.untyped).returns(Prism::ConstantOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3623 + # source://prism//lib/prism/node.rb#4038 + 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://yarp//lib/prism/node.rb#3652 + # source://prism//lib/prism/node.rb#4067 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#3661 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4077 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#3597 + # source://prism//lib/prism/node.rb#4012 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#3600 + # source://prism//lib/prism/node.rb#4015 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#3657 + # source://prism//lib/prism/node.rb#4072 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#3603 + # source://prism//lib/prism/node.rb#4018 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -4423,13 +5756,26 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#3685 + # source://prism//lib/prism/node.rb#4101 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#3606 + # source://prism//lib/prism/node.rb#4021 + 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#4111 + def type; end + end end # Represents the use of the `&&=` operator for assignment to a constant path. @@ -4437,67 +5783,89 @@ end # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#3694 +# source://prism//lib/prism/node.rb#4120 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://yarp//lib/prism/node.rb#3705 + # source://prism//lib/prism/node.rb#4131 + 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://yarp//lib/prism/node.rb#3713 + # source://prism//lib/prism/node.rb#4139 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3718 + # source://prism//lib/prism/node.rb#4144 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#3728 + # source://prism//lib/prism/node.rb#4154 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#3723 + # source://prism//lib/prism/node.rb#4149 def compact_child_nodes; end # def copy: (**params) -> ConstantPathAndWriteNode # - # source://yarp//lib/prism/node.rb#3733 + # source://prism//lib/prism/node.rb#4159 + sig { params(params: T.untyped).returns(Prism::ConstantPathAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3718 + # source://prism//lib/prism/node.rb#4144 + 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://yarp//lib/prism/node.rb#3746 + # source://prism//lib/prism/node.rb#4172 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#3755 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4182 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#3751 + # source://prism//lib/prism/node.rb#4177 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#3699 + # source://prism//lib/prism/node.rb#4125 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://yarp//lib/prism/node.rb#3696 + # source://prism//lib/prism/node.rb#4122 + sig { returns(Prism::ConstantPathNode) } def target; end # Sometimes you want to check an instance of a node against a list of @@ -4515,13 +5883,26 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#3779 + # source://prism//lib/prism/node.rb#4206 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#3702 + # source://prism//lib/prism/node.rb#4128 + 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#4216 + def type; end + end end # Represents accessing a constant through a path of `::` operators. @@ -4529,72 +5910,106 @@ end # Foo::Bar # ^^^^^^^^ # -# source://yarp//lib/prism/node.rb#3788 +# source://prism//lib/prism/node.rb#4225 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://yarp//lib/prism/node.rb#3799 + # source://prism//lib/prism/node.rb#4236 + 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://yarp//lib/prism/node.rb#3807 + # source://prism//lib/prism/node.rb#4244 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader child: Node # - # source://yarp//lib/prism/node.rb#3793 + # source://prism//lib/prism/node.rb#4230 + sig { returns(Prism::Node) } def child; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3812 + # source://prism//lib/prism/node.rb#4249 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#3825 + # source://prism//lib/prism/node.rb#4262 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#3817 + # source://prism//lib/prism/node.rb#4254 def compact_child_nodes; end # def copy: (**params) -> ConstantPathNode # - # source://yarp//lib/prism/node.rb#3830 + # source://prism//lib/prism/node.rb#4267 + sig { params(params: T.untyped).returns(Prism::ConstantPathNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3812 + # source://prism//lib/prism/node.rb#4249 + 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://yarp//lib/prism/node.rb#3843 + # source://prism//lib/prism/node.rb#4280 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#3848 + # source://prism//lib/prism/node.rb#4285 + sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://yarp//lib/prism/node.rb#3796 + # source://prism//lib/prism/node.rb#4233 + sig { returns(Prism::Location) } def delimiter_loc; end - # source://yarp//lib/prism/node.rb#3852 + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#104 + 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#87 + def full_name_parts; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4290 def inspect(inspector = T.unsafe(nil)); end # attr_reader parent: Node? # - # source://yarp//lib/prism/node.rb#3790 + # source://prism//lib/prism/node.rb#4227 + sig { returns(T.nilable(Prism::Node)) } def parent; end # Sometimes you want to check an instance of a node against a list of @@ -4612,76 +6027,121 @@ class Prism::ConstantPathNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#3880 + # source://prism//lib/prism/node.rb#4318 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#4328 + 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#83 +class Prism::ConstantPathNode::DynamicPartsInConstantPathError < ::StandardError; end + # Represents assigning to a constant path using an operator that isn't `=`. # # Parent::Child += value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#3889 +# source://prism//lib/prism/node.rb#4337 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://yarp//lib/prism/node.rb#3903 + # source://prism//lib/prism/node.rb#4351 + 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://yarp//lib/prism/node.rb#3912 + # source://prism//lib/prism/node.rb#4360 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3917 + # source://prism//lib/prism/node.rb#4365 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#3927 + # source://prism//lib/prism/node.rb#4375 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#3922 + # source://prism//lib/prism/node.rb#4370 def compact_child_nodes; end # def copy: (**params) -> ConstantPathOperatorWriteNode # - # source://yarp//lib/prism/node.rb#3932 + # source://prism//lib/prism/node.rb#4380 + sig { params(params: T.untyped).returns(Prism::ConstantPathOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#3917 + # source://prism//lib/prism/node.rb#4365 + 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://yarp//lib/prism/node.rb#3946 + # source://prism//lib/prism/node.rb#4394 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#3950 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4399 def inspect(inspector = T.unsafe(nil)); end # attr_reader operator: Symbol # - # source://yarp//lib/prism/node.rb#3900 + # source://prism//lib/prism/node.rb#4348 + sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#3894 + # source://prism//lib/prism/node.rb#4342 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://yarp//lib/prism/node.rb#3891 + # source://prism//lib/prism/node.rb#4339 + sig { returns(Prism::ConstantPathNode) } def target; end # Sometimes you want to check an instance of a node against a list of @@ -4699,13 +6159,26 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#3975 + # source://prism//lib/prism/node.rb#4424 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#3897 + # source://prism//lib/prism/node.rb#4345 + 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#4434 + def type; end + end end # Represents the use of the `||=` operator for assignment to a constant path. @@ -4713,67 +6186,89 @@ end # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#3984 +# source://prism//lib/prism/node.rb#4443 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://yarp//lib/prism/node.rb#3995 + # source://prism//lib/prism/node.rb#4454 + 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://yarp//lib/prism/node.rb#4003 + # source://prism//lib/prism/node.rb#4462 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4008 + # source://prism//lib/prism/node.rb#4467 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#4018 + # source://prism//lib/prism/node.rb#4477 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#4013 + # source://prism//lib/prism/node.rb#4472 def compact_child_nodes; end # def copy: (**params) -> ConstantPathOrWriteNode # - # source://yarp//lib/prism/node.rb#4023 + # source://prism//lib/prism/node.rb#4482 + sig { params(params: T.untyped).returns(Prism::ConstantPathOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4008 + # source://prism//lib/prism/node.rb#4467 + 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://yarp//lib/prism/node.rb#4036 + # source://prism//lib/prism/node.rb#4495 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#4045 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4505 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#4041 + # source://prism//lib/prism/node.rb#4500 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#3989 + # source://prism//lib/prism/node.rb#4448 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://yarp//lib/prism/node.rb#3986 + # source://prism//lib/prism/node.rb#4445 + sig { returns(Prism::ConstantPathNode) } def target; end # Sometimes you want to check an instance of a node against a list of @@ -4791,86 +6286,133 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#4069 + # source://prism//lib/prism/node.rb#4529 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#3992 + # source://prism//lib/prism/node.rb#4451 + sig { returns(Prism::Node) } def value; end -end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4539 + 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://yarp//lib/prism/node.rb#4078 +# source://prism//lib/prism/node.rb#4548 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://yarp//lib/prism/node.rb#4089 + # source://prism//lib/prism/node.rb#4559 + 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://yarp//lib/prism/node.rb#4097 + # source://prism//lib/prism/node.rb#4567 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader child: Node # - # source://yarp//lib/prism/node.rb#4083 + # source://prism//lib/prism/node.rb#4553 + sig { returns(Prism::Node) } def child; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4102 + # source://prism//lib/prism/node.rb#4572 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#4115 + # source://prism//lib/prism/node.rb#4585 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#4107 + # source://prism//lib/prism/node.rb#4577 def compact_child_nodes; end # def copy: (**params) -> ConstantPathTargetNode # - # source://yarp//lib/prism/node.rb#4120 + # source://prism//lib/prism/node.rb#4590 + sig { params(params: T.untyped).returns(Prism::ConstantPathTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4102 + # source://prism//lib/prism/node.rb#4572 + 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://yarp//lib/prism/node.rb#4133 + # source://prism//lib/prism/node.rb#4603 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#4138 + # source://prism//lib/prism/node.rb#4608 + sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://yarp//lib/prism/node.rb#4086 + # source://prism//lib/prism/node.rb#4556 + sig { returns(Prism::Location) } def delimiter_loc; end - # source://yarp//lib/prism/node.rb#4142 + # Returns the full name of this constant path. For example: "Foo::Bar" + # + # source://prism//lib/prism/node_ext.rb#117 + 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#4613 def inspect(inspector = T.unsafe(nil)); end # attr_reader parent: Node? # - # source://yarp//lib/prism/node.rb#4080 + # source://prism//lib/prism/node.rb#4550 + sig { returns(T.nilable(Prism::Node)) } def parent; end # Sometimes you want to check an instance of a node against a list of @@ -4888,8 +6430,20 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#4170 + # source://prism//lib/prism/node.rb#4641 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#4651 + def type; end + end end # Represents writing to a constant path. @@ -4903,67 +6457,89 @@ end # ::Foo::Bar = 1 # ^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#4185 +# source://prism//lib/prism/node.rb#4666 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://yarp//lib/prism/node.rb#4196 + # source://prism//lib/prism/node.rb#4677 + 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://yarp//lib/prism/node.rb#4204 + # source://prism//lib/prism/node.rb#4685 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4209 + # source://prism//lib/prism/node.rb#4690 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#4219 + # source://prism//lib/prism/node.rb#4700 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#4214 + # source://prism//lib/prism/node.rb#4695 def compact_child_nodes; end # def copy: (**params) -> ConstantPathWriteNode # - # source://yarp//lib/prism/node.rb#4224 + # source://prism//lib/prism/node.rb#4705 + sig { params(params: T.untyped).returns(Prism::ConstantPathWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4209 + # source://prism//lib/prism/node.rb#4690 + 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://yarp//lib/prism/node.rb#4237 + # source://prism//lib/prism/node.rb#4718 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#4246 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4728 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#4242 + # source://prism//lib/prism/node.rb#4723 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#4190 + # source://prism//lib/prism/node.rb#4671 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://yarp//lib/prism/node.rb#4187 + # source://prism//lib/prism/node.rb#4668 + sig { returns(Prism::ConstantPathNode) } def target; end # Sometimes you want to check an instance of a node against a list of @@ -4981,13 +6557,26 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#4270 + # source://prism//lib/prism/node.rb#4752 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#4193 + # source://prism//lib/prism/node.rb#4674 + sig { returns(Prism::Node) } def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#4762 + def type; end + end end # Represents referencing a constant. @@ -4995,57 +6584,81 @@ end # Foo # ^^^ # -# source://yarp//lib/prism/node.rb#4279 +# source://prism//lib/prism/node.rb#4771 class Prism::ConstantReadNode < ::Prism::Node # def initialize: (name: Symbol, location: Location) -> void # # @return [ConstantReadNode] a new instance of ConstantReadNode # - # source://yarp//lib/prism/node.rb#4284 + # source://prism//lib/prism/node.rb#4776 + sig { params(name: Symbol, location: Prism::Location).void } def initialize(name, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#4290 + # source://prism//lib/prism/node.rb#4782 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4295 + # source://prism//lib/prism/node.rb#4787 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#4305 + # source://prism//lib/prism/node.rb#4797 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#4300 + # source://prism//lib/prism/node.rb#4792 def compact_child_nodes; end # def copy: (**params) -> ConstantReadNode # - # source://yarp//lib/prism/node.rb#4310 + # source://prism//lib/prism/node.rb#4802 + sig { params(params: T.untyped).returns(Prism::ConstantReadNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4295 + # source://prism//lib/prism/node.rb#4787 + 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://yarp//lib/prism/node.rb#4321 + # source://prism//lib/prism/node.rb#4813 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#4325 + # Returns the full name of this constant. For example: "Foo" + # + # source://prism//lib/prism/node_ext.rb#71 + 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#66 + def full_name_parts; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4818 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#4281 + # source://prism//lib/prism/node.rb#4773 + sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of @@ -5063,8 +6676,20 @@ class Prism::ConstantReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#4345 + # source://prism//lib/prism/node.rb#4838 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#4848 + def type; end + end end # Represents writing to a constant in a context that doesn't have an explicit value. @@ -5072,57 +6697,70 @@ end # Foo, Bar = baz # ^^^ ^^^ # -# source://yarp//lib/prism/node.rb#4354 +# source://prism//lib/prism/node.rb#4857 class Prism::ConstantTargetNode < ::Prism::Node # def initialize: (name: Symbol, location: Location) -> void # # @return [ConstantTargetNode] a new instance of ConstantTargetNode # - # source://yarp//lib/prism/node.rb#4359 + # source://prism//lib/prism/node.rb#4862 + sig { params(name: Symbol, location: Prism::Location).void } def initialize(name, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#4365 + # source://prism//lib/prism/node.rb#4868 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4370 + # 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://yarp//lib/prism/node.rb#4380 + # source://prism//lib/prism/node.rb#4883 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#4375 + # source://prism//lib/prism/node.rb#4878 def compact_child_nodes; end # def copy: (**params) -> ConstantTargetNode # - # source://yarp//lib/prism/node.rb#4385 + # source://prism//lib/prism/node.rb#4888 + sig { params(params: T.untyped).returns(Prism::ConstantTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4370 + # 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://yarp//lib/prism/node.rb#4396 + # source://prism//lib/prism/node.rb#4899 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#4400 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#4904 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#4356 + # source://prism//lib/prism/node.rb#4859 + sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of @@ -5140,8 +6778,20 @@ class Prism::ConstantTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#4420 + # source://prism//lib/prism/node.rb#4924 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#4934 + def type; end + end end # Represents writing to a constant. @@ -5149,72 +6799,96 @@ end # Foo = 1 # ^^^^^^^ # -# source://yarp//lib/prism/node.rb#4429 +# source://prism//lib/prism/node.rb#4943 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://yarp//lib/prism/node.rb#4443 + # source://prism//lib/prism/node.rb#4957 + 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://yarp//lib/prism/node.rb#4452 + # source://prism//lib/prism/node.rb#4966 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4457 + # source://prism//lib/prism/node.rb#4971 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#4467 + # source://prism//lib/prism/node.rb#4981 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#4462 + # source://prism//lib/prism/node.rb#4976 def compact_child_nodes; end # def copy: (**params) -> ConstantWriteNode # - # source://yarp//lib/prism/node.rb#4472 + # source://prism//lib/prism/node.rb#4986 + sig { params(params: T.untyped).returns(Prism::ConstantWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4457 + # source://prism//lib/prism/node.rb#4971 + 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://yarp//lib/prism/node.rb#4486 + # source://prism//lib/prism/node.rb#5000 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#4495 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5010 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#4431 + # source://prism//lib/prism/node.rb#4945 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#4434 + # source://prism//lib/prism/node.rb#4948 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#4491 + # source://prism//lib/prism/node.rb#5005 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#4440 + # source://prism//lib/prism/node.rb#4954 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -5232,13 +6906,37 @@ class Prism::ConstantWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#4519 + # source://prism//lib/prism/node.rb#5034 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#4437 + # source://prism//lib/prism/node.rb#4951 + sig { returns(Prism::Node) } def value; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#5044 + def type; end + end +end + +# DATAComment objects correspond to comments that are after the __END__ +# keyword in a source file. +# +# source://prism//lib/prism/parse_result.rb#274 +class Prism::DATAComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#276 + def inspect; end end # The DSL module provides a set of methods that can be used to create prism @@ -5270,780 +6968,808 @@ end # This is mostly helpful in the context of writing tests, but can also be used # to generate trees programmatically. # -# source://yarp//lib/prism/dsl.rb#37 +# source://prism//lib/prism/dsl.rb#37 module Prism::DSL private # Create a new AliasGlobalVariableNode node # - # source://yarp//lib/prism/dsl.rb#46 + # 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://yarp//lib/prism/dsl.rb#51 + # 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://yarp//lib/prism/dsl.rb#56 + # source://prism//lib/prism/dsl.rb#56 def AlternationPatternNode(left, right, operator_loc, location = T.unsafe(nil)); end # Create a new AndNode node # - # source://yarp//lib/prism/dsl.rb#61 + # source://prism//lib/prism/dsl.rb#61 def AndNode(left, right, operator_loc, location = T.unsafe(nil)); end # Create a new ArgumentsNode node # - # source://yarp//lib/prism/dsl.rb#66 - def ArgumentsNode(arguments, location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#66 + def ArgumentsNode(arguments, flags, location = T.unsafe(nil)); end # Create a new ArrayNode node # - # source://yarp//lib/prism/dsl.rb#71 + # source://prism//lib/prism/dsl.rb#71 def ArrayNode(elements, opening_loc, closing_loc, location = T.unsafe(nil)); end # Create a new ArrayPatternNode node # - # source://yarp//lib/prism/dsl.rb#76 + # 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://yarp//lib/prism/dsl.rb#81 + # source://prism//lib/prism/dsl.rb#81 def AssocNode(key, value, operator_loc, location = T.unsafe(nil)); end # Create a new AssocSplatNode node # - # source://yarp//lib/prism/dsl.rb#86 + # source://prism//lib/prism/dsl.rb#86 def AssocSplatNode(value, operator_loc, location = T.unsafe(nil)); end # Create a new BackReferenceReadNode node # - # source://yarp//lib/prism/dsl.rb#91 - def BackReferenceReadNode(location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#91 + def BackReferenceReadNode(name, location = T.unsafe(nil)); end # Create a new BeginNode node # - # source://yarp//lib/prism/dsl.rb#96 + # 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://yarp//lib/prism/dsl.rb#101 + # source://prism//lib/prism/dsl.rb#101 def BlockArgumentNode(expression, operator_loc, location = T.unsafe(nil)); end # Create a new BlockLocalVariableNode node # - # source://yarp//lib/prism/dsl.rb#106 + # source://prism//lib/prism/dsl.rb#106 def BlockLocalVariableNode(name, location = T.unsafe(nil)); end # Create a new BlockNode node # - # source://yarp//lib/prism/dsl.rb#111 + # source://prism//lib/prism/dsl.rb#111 def BlockNode(locals, parameters, body, opening_loc, closing_loc, location = T.unsafe(nil)); end # Create a new BlockParameterNode node # - # source://yarp//lib/prism/dsl.rb#116 + # 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://yarp//lib/prism/dsl.rb#121 + # 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://yarp//lib/prism/dsl.rb#126 + # source://prism//lib/prism/dsl.rb#126 def BreakNode(arguments, keyword_loc, location = T.unsafe(nil)); end # Create a new CallAndWriteNode node # - # source://yarp//lib/prism/dsl.rb#131 - def CallAndWriteNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#131 + def CallAndWriteNode(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end # Create a new CallNode node # - # source://yarp//lib/prism/dsl.rb#136 + # source://prism//lib/prism/dsl.rb#136 def CallNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, block, flags, name, location = T.unsafe(nil)); end # Create a new CallOperatorWriteNode node # - # source://yarp//lib/prism/dsl.rb#141 - def CallOperatorWriteNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator, operator_loc, value, location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#141 + def CallOperatorWriteNode(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator, operator_loc, value, location = T.unsafe(nil)); end # Create a new CallOrWriteNode node # - # source://yarp//lib/prism/dsl.rb#146 - def CallOrWriteNode(receiver, call_operator_loc, message_loc, opening_loc, arguments, closing_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#146 + def CallOrWriteNode(receiver, call_operator_loc, message_loc, flags, read_name, write_name, operator_loc, value, location = T.unsafe(nil)); end # Create a new CapturePatternNode node # - # source://yarp//lib/prism/dsl.rb#151 + # source://prism//lib/prism/dsl.rb#151 def CapturePatternNode(value, target, operator_loc, location = T.unsafe(nil)); end + # Create a new CaseMatchNode node + # + # source://prism//lib/prism/dsl.rb#156 + def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end + # Create a new CaseNode node # - # source://yarp//lib/prism/dsl.rb#156 + # source://prism//lib/prism/dsl.rb#161 def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location = T.unsafe(nil)); end # Create a new ClassNode node # - # source://yarp//lib/prism/dsl.rb#161 + # source://prism//lib/prism/dsl.rb#166 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://yarp//lib/prism/dsl.rb#166 + # source://prism//lib/prism/dsl.rb#171 def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end # Create a new ClassVariableOperatorWriteNode node # - # source://yarp//lib/prism/dsl.rb#171 + # source://prism//lib/prism/dsl.rb#176 def ClassVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end # Create a new ClassVariableOrWriteNode node # - # source://yarp//lib/prism/dsl.rb#176 + # source://prism//lib/prism/dsl.rb#181 def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end # Create a new ClassVariableReadNode node # - # source://yarp//lib/prism/dsl.rb#181 + # source://prism//lib/prism/dsl.rb#186 def ClassVariableReadNode(name, location = T.unsafe(nil)); end # Create a new ClassVariableTargetNode node # - # source://yarp//lib/prism/dsl.rb#186 + # source://prism//lib/prism/dsl.rb#191 def ClassVariableTargetNode(name, location = T.unsafe(nil)); end # Create a new ClassVariableWriteNode node # - # source://yarp//lib/prism/dsl.rb#191 + # source://prism//lib/prism/dsl.rb#196 def ClassVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end # Create a new ConstantAndWriteNode node # - # source://yarp//lib/prism/dsl.rb#196 + # source://prism//lib/prism/dsl.rb#201 def ConstantAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end # Create a new ConstantOperatorWriteNode node # - # source://yarp//lib/prism/dsl.rb#201 + # source://prism//lib/prism/dsl.rb#206 def ConstantOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end # Create a new ConstantOrWriteNode node # - # source://yarp//lib/prism/dsl.rb#206 + # source://prism//lib/prism/dsl.rb#211 def ConstantOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end # Create a new ConstantPathAndWriteNode node # - # source://yarp//lib/prism/dsl.rb#211 + # source://prism//lib/prism/dsl.rb#216 def ConstantPathAndWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end # Create a new ConstantPathNode node # - # source://yarp//lib/prism/dsl.rb#216 + # source://prism//lib/prism/dsl.rb#221 def ConstantPathNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end # Create a new ConstantPathOperatorWriteNode node # - # source://yarp//lib/prism/dsl.rb#221 + # source://prism//lib/prism/dsl.rb#226 def ConstantPathOperatorWriteNode(target, operator_loc, value, operator, location = T.unsafe(nil)); end # Create a new ConstantPathOrWriteNode node # - # source://yarp//lib/prism/dsl.rb#226 + # source://prism//lib/prism/dsl.rb#231 def ConstantPathOrWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end # Create a new ConstantPathTargetNode node # - # source://yarp//lib/prism/dsl.rb#231 + # source://prism//lib/prism/dsl.rb#236 def ConstantPathTargetNode(parent, child, delimiter_loc, location = T.unsafe(nil)); end # Create a new ConstantPathWriteNode node # - # source://yarp//lib/prism/dsl.rb#236 + # source://prism//lib/prism/dsl.rb#241 def ConstantPathWriteNode(target, operator_loc, value, location = T.unsafe(nil)); end # Create a new ConstantReadNode node # - # source://yarp//lib/prism/dsl.rb#241 + # source://prism//lib/prism/dsl.rb#246 def ConstantReadNode(name, location = T.unsafe(nil)); end # Create a new ConstantTargetNode node # - # source://yarp//lib/prism/dsl.rb#246 + # source://prism//lib/prism/dsl.rb#251 def ConstantTargetNode(name, location = T.unsafe(nil)); end # Create a new ConstantWriteNode node # - # source://yarp//lib/prism/dsl.rb#251 + # source://prism//lib/prism/dsl.rb#256 def ConstantWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end # Create a new DefNode node # - # source://yarp//lib/prism/dsl.rb#256 + # source://prism//lib/prism/dsl.rb#261 def DefNode(name, name_loc, receiver, parameters, body, locals, 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://yarp//lib/prism/dsl.rb#261 + # source://prism//lib/prism/dsl.rb#266 def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, location = T.unsafe(nil)); end # Create a new ElseNode node # - # source://yarp//lib/prism/dsl.rb#266 + # source://prism//lib/prism/dsl.rb#271 def ElseNode(else_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end # Create a new EmbeddedStatementsNode node # - # source://yarp//lib/prism/dsl.rb#271 + # source://prism//lib/prism/dsl.rb#276 def EmbeddedStatementsNode(opening_loc, statements, closing_loc, location = T.unsafe(nil)); end # Create a new EmbeddedVariableNode node # - # source://yarp//lib/prism/dsl.rb#276 + # source://prism//lib/prism/dsl.rb#281 def EmbeddedVariableNode(operator_loc, variable, location = T.unsafe(nil)); end # Create a new EnsureNode node # - # source://yarp//lib/prism/dsl.rb#281 + # source://prism//lib/prism/dsl.rb#286 def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, location = T.unsafe(nil)); end # Create a new FalseNode node # - # source://yarp//lib/prism/dsl.rb#286 + # source://prism//lib/prism/dsl.rb#291 def FalseNode(location = T.unsafe(nil)); end # Create a new FindPatternNode node # - # source://yarp//lib/prism/dsl.rb#291 + # source://prism//lib/prism/dsl.rb#296 def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, location = T.unsafe(nil)); end # Create a new FlipFlopNode node # - # source://yarp//lib/prism/dsl.rb#296 + # source://prism//lib/prism/dsl.rb#301 def FlipFlopNode(left, right, operator_loc, flags, location = T.unsafe(nil)); end # Create a new FloatNode node # - # source://yarp//lib/prism/dsl.rb#301 + # source://prism//lib/prism/dsl.rb#306 def FloatNode(location = T.unsafe(nil)); end # Create a new ForNode node # - # source://yarp//lib/prism/dsl.rb#306 + # source://prism//lib/prism/dsl.rb#311 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://yarp//lib/prism/dsl.rb#311 + # source://prism//lib/prism/dsl.rb#316 def ForwardingArgumentsNode(location = T.unsafe(nil)); end # Create a new ForwardingParameterNode node # - # source://yarp//lib/prism/dsl.rb#316 + # source://prism//lib/prism/dsl.rb#321 def ForwardingParameterNode(location = T.unsafe(nil)); end # Create a new ForwardingSuperNode node # - # source://yarp//lib/prism/dsl.rb#321 + # source://prism//lib/prism/dsl.rb#326 def ForwardingSuperNode(block, location = T.unsafe(nil)); end # Create a new GlobalVariableAndWriteNode node # - # source://yarp//lib/prism/dsl.rb#326 + # source://prism//lib/prism/dsl.rb#331 def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end # Create a new GlobalVariableOperatorWriteNode node # - # source://yarp//lib/prism/dsl.rb#331 + # source://prism//lib/prism/dsl.rb#336 def GlobalVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end # Create a new GlobalVariableOrWriteNode node # - # source://yarp//lib/prism/dsl.rb#336 + # source://prism//lib/prism/dsl.rb#341 def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end # Create a new GlobalVariableReadNode node # - # source://yarp//lib/prism/dsl.rb#341 + # source://prism//lib/prism/dsl.rb#346 def GlobalVariableReadNode(name, location = T.unsafe(nil)); end # Create a new GlobalVariableTargetNode node # - # source://yarp//lib/prism/dsl.rb#346 + # source://prism//lib/prism/dsl.rb#351 def GlobalVariableTargetNode(name, location = T.unsafe(nil)); end # Create a new GlobalVariableWriteNode node # - # source://yarp//lib/prism/dsl.rb#351 + # source://prism//lib/prism/dsl.rb#356 def GlobalVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end # Create a new HashNode node # - # source://yarp//lib/prism/dsl.rb#356 + # source://prism//lib/prism/dsl.rb#361 def HashNode(opening_loc, elements, closing_loc, location = T.unsafe(nil)); end # Create a new HashPatternNode node # - # source://yarp//lib/prism/dsl.rb#361 - def HashPatternNode(constant, assocs, kwrest, opening_loc, closing_loc, location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#366 + def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, location = T.unsafe(nil)); end # Create a new IfNode node # - # source://yarp//lib/prism/dsl.rb#366 - def IfNode(if_keyword_loc, predicate, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#371 + 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://yarp//lib/prism/dsl.rb#371 + # source://prism//lib/prism/dsl.rb#376 def ImaginaryNode(numeric, location = T.unsafe(nil)); end # Create a new ImplicitNode node # - # source://yarp//lib/prism/dsl.rb#376 + # source://prism//lib/prism/dsl.rb#381 def ImplicitNode(value, location = T.unsafe(nil)); end # Create a new InNode node # - # source://yarp//lib/prism/dsl.rb#381 + # source://prism//lib/prism/dsl.rb#386 def InNode(pattern, statements, in_loc, then_loc, location = T.unsafe(nil)); end + # Create a new IndexAndWriteNode node + # + # source://prism//lib/prism/dsl.rb#391 + def IndexAndWriteNode(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new IndexOperatorWriteNode node + # + # source://prism//lib/prism/dsl.rb#396 + def IndexOperatorWriteNode(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator, operator_loc, value, location = T.unsafe(nil)); end + + # Create a new IndexOrWriteNode node + # + # source://prism//lib/prism/dsl.rb#401 + def IndexOrWriteNode(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location = T.unsafe(nil)); end + # Create a new InstanceVariableAndWriteNode node # - # source://yarp//lib/prism/dsl.rb#386 + # source://prism//lib/prism/dsl.rb#406 def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end # Create a new InstanceVariableOperatorWriteNode node # - # source://yarp//lib/prism/dsl.rb#391 + # source://prism//lib/prism/dsl.rb#411 def InstanceVariableOperatorWriteNode(name, name_loc, operator_loc, value, operator, location = T.unsafe(nil)); end # Create a new InstanceVariableOrWriteNode node # - # source://yarp//lib/prism/dsl.rb#396 + # source://prism//lib/prism/dsl.rb#416 def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end # Create a new InstanceVariableReadNode node # - # source://yarp//lib/prism/dsl.rb#401 + # source://prism//lib/prism/dsl.rb#421 def InstanceVariableReadNode(name, location = T.unsafe(nil)); end # Create a new InstanceVariableTargetNode node # - # source://yarp//lib/prism/dsl.rb#406 + # source://prism//lib/prism/dsl.rb#426 def InstanceVariableTargetNode(name, location = T.unsafe(nil)); end # Create a new InstanceVariableWriteNode node # - # source://yarp//lib/prism/dsl.rb#411 + # source://prism//lib/prism/dsl.rb#431 def InstanceVariableWriteNode(name, name_loc, value, operator_loc, location = T.unsafe(nil)); end # Create a new IntegerNode node # - # source://yarp//lib/prism/dsl.rb#416 + # source://prism//lib/prism/dsl.rb#436 def IntegerNode(flags, location = T.unsafe(nil)); end # Create a new InterpolatedMatchLastLineNode node # - # source://yarp//lib/prism/dsl.rb#421 + # source://prism//lib/prism/dsl.rb#441 def InterpolatedMatchLastLineNode(opening_loc, parts, closing_loc, flags, location = T.unsafe(nil)); end # Create a new InterpolatedRegularExpressionNode node # - # source://yarp//lib/prism/dsl.rb#426 + # source://prism//lib/prism/dsl.rb#446 def InterpolatedRegularExpressionNode(opening_loc, parts, closing_loc, flags, location = T.unsafe(nil)); end # Create a new InterpolatedStringNode node # - # source://yarp//lib/prism/dsl.rb#431 + # source://prism//lib/prism/dsl.rb#451 def InterpolatedStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end # Create a new InterpolatedSymbolNode node # - # source://yarp//lib/prism/dsl.rb#436 + # source://prism//lib/prism/dsl.rb#456 def InterpolatedSymbolNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end # Create a new InterpolatedXStringNode node # - # source://yarp//lib/prism/dsl.rb#441 + # source://prism//lib/prism/dsl.rb#461 def InterpolatedXStringNode(opening_loc, parts, closing_loc, location = T.unsafe(nil)); end # Create a new KeywordHashNode node # - # source://yarp//lib/prism/dsl.rb#446 + # source://prism//lib/prism/dsl.rb#466 def KeywordHashNode(elements, location = T.unsafe(nil)); end - # Create a new KeywordParameterNode node - # - # source://yarp//lib/prism/dsl.rb#451 - def KeywordParameterNode(name, name_loc, value, location = T.unsafe(nil)); end - # Create a new KeywordRestParameterNode node # - # source://yarp//lib/prism/dsl.rb#456 + # source://prism//lib/prism/dsl.rb#471 def KeywordRestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end # Create a new LambdaNode node # - # source://yarp//lib/prism/dsl.rb#461 + # source://prism//lib/prism/dsl.rb#476 def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, location = T.unsafe(nil)); end # Create a new LocalVariableAndWriteNode node # - # source://yarp//lib/prism/dsl.rb#466 + # source://prism//lib/prism/dsl.rb#481 def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end # Create a new LocalVariableOperatorWriteNode node # - # source://yarp//lib/prism/dsl.rb#471 + # source://prism//lib/prism/dsl.rb#486 def LocalVariableOperatorWriteNode(name_loc, operator_loc, value, name, operator, depth, location = T.unsafe(nil)); end # Create a new LocalVariableOrWriteNode node # - # source://yarp//lib/prism/dsl.rb#476 + # source://prism//lib/prism/dsl.rb#491 def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, location = T.unsafe(nil)); end # Create a new LocalVariableReadNode node # - # source://yarp//lib/prism/dsl.rb#481 + # source://prism//lib/prism/dsl.rb#496 def LocalVariableReadNode(name, depth, location = T.unsafe(nil)); end # Create a new LocalVariableTargetNode node # - # source://yarp//lib/prism/dsl.rb#486 + # source://prism//lib/prism/dsl.rb#501 def LocalVariableTargetNode(name, depth, location = T.unsafe(nil)); end # Create a new LocalVariableWriteNode node # - # source://yarp//lib/prism/dsl.rb#491 + # source://prism//lib/prism/dsl.rb#506 def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, location = T.unsafe(nil)); end # Create a new Location object # - # source://yarp//lib/prism/dsl.rb#41 + # 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://yarp//lib/prism/dsl.rb#496 + # source://prism//lib/prism/dsl.rb#511 def MatchLastLineNode(opening_loc, content_loc, closing_loc, unescaped, flags, location = T.unsafe(nil)); end # Create a new MatchPredicateNode node # - # source://yarp//lib/prism/dsl.rb#501 + # source://prism//lib/prism/dsl.rb#516 def MatchPredicateNode(value, pattern, operator_loc, location = T.unsafe(nil)); end # Create a new MatchRequiredNode node # - # source://yarp//lib/prism/dsl.rb#506 + # source://prism//lib/prism/dsl.rb#521 def MatchRequiredNode(value, pattern, operator_loc, location = T.unsafe(nil)); end # Create a new MatchWriteNode node # - # source://yarp//lib/prism/dsl.rb#511 - def MatchWriteNode(call, locals, location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#526 + def MatchWriteNode(call, targets, location = T.unsafe(nil)); end # Create a new MissingNode node # - # source://yarp//lib/prism/dsl.rb#516 + # source://prism//lib/prism/dsl.rb#531 def MissingNode(location = T.unsafe(nil)); end # Create a new ModuleNode node # - # source://yarp//lib/prism/dsl.rb#521 + # source://prism//lib/prism/dsl.rb#536 def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location = T.unsafe(nil)); end # Create a new MultiTargetNode node # - # source://yarp//lib/prism/dsl.rb#526 - def MultiTargetNode(targets, lparen_loc, rparen_loc, location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#541 + def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, location = T.unsafe(nil)); end # Create a new MultiWriteNode node # - # source://yarp//lib/prism/dsl.rb#531 - def MultiWriteNode(targets, lparen_loc, rparen_loc, operator_loc, value, location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#546 + def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location = T.unsafe(nil)); end # Create a new NextNode node # - # source://yarp//lib/prism/dsl.rb#536 + # source://prism//lib/prism/dsl.rb#551 def NextNode(arguments, keyword_loc, location = T.unsafe(nil)); end # Create a new NilNode node # - # source://yarp//lib/prism/dsl.rb#541 + # source://prism//lib/prism/dsl.rb#556 def NilNode(location = T.unsafe(nil)); end # Create a new NoKeywordsParameterNode node # - # source://yarp//lib/prism/dsl.rb#546 + # source://prism//lib/prism/dsl.rb#561 def NoKeywordsParameterNode(operator_loc, keyword_loc, location = T.unsafe(nil)); end # Create a new NumberedReferenceReadNode node # - # source://yarp//lib/prism/dsl.rb#551 + # source://prism//lib/prism/dsl.rb#566 def NumberedReferenceReadNode(number, location = T.unsafe(nil)); end + # Create a new OptionalKeywordParameterNode node + # + # source://prism//lib/prism/dsl.rb#571 + def OptionalKeywordParameterNode(name, name_loc, value, location = T.unsafe(nil)); end + # Create a new OptionalParameterNode node # - # source://yarp//lib/prism/dsl.rb#556 + # source://prism//lib/prism/dsl.rb#576 def OptionalParameterNode(name, name_loc, operator_loc, value, location = T.unsafe(nil)); end # Create a new OrNode node # - # source://yarp//lib/prism/dsl.rb#561 + # source://prism//lib/prism/dsl.rb#581 def OrNode(left, right, operator_loc, location = T.unsafe(nil)); end # Create a new ParametersNode node # - # source://yarp//lib/prism/dsl.rb#566 + # source://prism//lib/prism/dsl.rb#586 def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, location = T.unsafe(nil)); end # Create a new ParenthesesNode node # - # source://yarp//lib/prism/dsl.rb#571 + # source://prism//lib/prism/dsl.rb#591 def ParenthesesNode(body, opening_loc, closing_loc, location = T.unsafe(nil)); end # Create a new PinnedExpressionNode node # - # source://yarp//lib/prism/dsl.rb#576 + # source://prism//lib/prism/dsl.rb#596 def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, location = T.unsafe(nil)); end # Create a new PinnedVariableNode node # - # source://yarp//lib/prism/dsl.rb#581 + # source://prism//lib/prism/dsl.rb#601 def PinnedVariableNode(variable, operator_loc, location = T.unsafe(nil)); end # Create a new PostExecutionNode node # - # source://yarp//lib/prism/dsl.rb#586 + # source://prism//lib/prism/dsl.rb#606 def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end # Create a new PreExecutionNode node # - # source://yarp//lib/prism/dsl.rb#591 + # source://prism//lib/prism/dsl.rb#611 def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, location = T.unsafe(nil)); end # Create a new ProgramNode node # - # source://yarp//lib/prism/dsl.rb#596 + # source://prism//lib/prism/dsl.rb#616 def ProgramNode(locals, statements, location = T.unsafe(nil)); end # Create a new RangeNode node # - # source://yarp//lib/prism/dsl.rb#601 + # source://prism//lib/prism/dsl.rb#621 def RangeNode(left, right, operator_loc, flags, location = T.unsafe(nil)); end # Create a new RationalNode node # - # source://yarp//lib/prism/dsl.rb#606 + # source://prism//lib/prism/dsl.rb#626 def RationalNode(numeric, location = T.unsafe(nil)); end # Create a new RedoNode node # - # source://yarp//lib/prism/dsl.rb#611 + # source://prism//lib/prism/dsl.rb#631 def RedoNode(location = T.unsafe(nil)); end # Create a new RegularExpressionNode node # - # source://yarp//lib/prism/dsl.rb#616 + # source://prism//lib/prism/dsl.rb#636 def RegularExpressionNode(opening_loc, content_loc, closing_loc, unescaped, flags, location = T.unsafe(nil)); end - # Create a new RequiredDestructuredParameterNode node + # Create a new RequiredKeywordParameterNode node # - # source://yarp//lib/prism/dsl.rb#621 - def RequiredDestructuredParameterNode(parameters, opening_loc, closing_loc, location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#641 + def RequiredKeywordParameterNode(name, name_loc, location = T.unsafe(nil)); end # Create a new RequiredParameterNode node # - # source://yarp//lib/prism/dsl.rb#626 + # source://prism//lib/prism/dsl.rb#646 def RequiredParameterNode(name, location = T.unsafe(nil)); end # Create a new RescueModifierNode node # - # source://yarp//lib/prism/dsl.rb#631 + # source://prism//lib/prism/dsl.rb#651 def RescueModifierNode(expression, keyword_loc, rescue_expression, location = T.unsafe(nil)); end # Create a new RescueNode node # - # source://yarp//lib/prism/dsl.rb#636 + # source://prism//lib/prism/dsl.rb#656 def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, location = T.unsafe(nil)); end # Create a new RestParameterNode node # - # source://yarp//lib/prism/dsl.rb#641 + # source://prism//lib/prism/dsl.rb#661 def RestParameterNode(name, name_loc, operator_loc, location = T.unsafe(nil)); end # Create a new RetryNode node # - # source://yarp//lib/prism/dsl.rb#646 + # source://prism//lib/prism/dsl.rb#666 def RetryNode(location = T.unsafe(nil)); end # Create a new ReturnNode node # - # source://yarp//lib/prism/dsl.rb#651 + # source://prism//lib/prism/dsl.rb#671 def ReturnNode(keyword_loc, arguments, location = T.unsafe(nil)); end # Create a new SelfNode node # - # source://yarp//lib/prism/dsl.rb#656 + # source://prism//lib/prism/dsl.rb#676 def SelfNode(location = T.unsafe(nil)); end # Create a new SingletonClassNode node # - # source://yarp//lib/prism/dsl.rb#661 + # source://prism//lib/prism/dsl.rb#681 def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location = T.unsafe(nil)); end # Create a new SourceEncodingNode node # - # source://yarp//lib/prism/dsl.rb#666 + # source://prism//lib/prism/dsl.rb#686 def SourceEncodingNode(location = T.unsafe(nil)); end # Create a new SourceFileNode node # - # source://yarp//lib/prism/dsl.rb#671 + # source://prism//lib/prism/dsl.rb#691 def SourceFileNode(filepath, location = T.unsafe(nil)); end # Create a new SourceLineNode node # - # source://yarp//lib/prism/dsl.rb#676 + # source://prism//lib/prism/dsl.rb#696 def SourceLineNode(location = T.unsafe(nil)); end # Create a new SplatNode node # - # source://yarp//lib/prism/dsl.rb#681 + # source://prism//lib/prism/dsl.rb#701 def SplatNode(operator_loc, expression, location = T.unsafe(nil)); end # Create a new StatementsNode node # - # source://yarp//lib/prism/dsl.rb#686 + # source://prism//lib/prism/dsl.rb#706 def StatementsNode(body, location = T.unsafe(nil)); end - # Create a new StringConcatNode node - # - # source://yarp//lib/prism/dsl.rb#691 - def StringConcatNode(left, right, location = T.unsafe(nil)); end - # Create a new StringNode node # - # source://yarp//lib/prism/dsl.rb#696 + # source://prism//lib/prism/dsl.rb#711 def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end # Create a new SuperNode node # - # source://yarp//lib/prism/dsl.rb#701 + # source://prism//lib/prism/dsl.rb#716 def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, location = T.unsafe(nil)); end # Create a new SymbolNode node # - # source://yarp//lib/prism/dsl.rb#706 + # source://prism//lib/prism/dsl.rb#721 def SymbolNode(opening_loc, value_loc, closing_loc, unescaped, location = T.unsafe(nil)); end # Create a new TrueNode node # - # source://yarp//lib/prism/dsl.rb#711 + # source://prism//lib/prism/dsl.rb#726 def TrueNode(location = T.unsafe(nil)); end # Create a new UndefNode node # - # source://yarp//lib/prism/dsl.rb#716 + # source://prism//lib/prism/dsl.rb#731 def UndefNode(names, keyword_loc, location = T.unsafe(nil)); end # Create a new UnlessNode node # - # source://yarp//lib/prism/dsl.rb#721 - def UnlessNode(keyword_loc, predicate, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#736 + def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location = T.unsafe(nil)); end # Create a new UntilNode node # - # source://yarp//lib/prism/dsl.rb#726 + # source://prism//lib/prism/dsl.rb#741 def UntilNode(keyword_loc, closing_loc, predicate, statements, flags, location = T.unsafe(nil)); end # Create a new WhenNode node # - # source://yarp//lib/prism/dsl.rb#731 + # source://prism//lib/prism/dsl.rb#746 def WhenNode(keyword_loc, conditions, statements, location = T.unsafe(nil)); end # Create a new WhileNode node # - # source://yarp//lib/prism/dsl.rb#736 + # source://prism//lib/prism/dsl.rb#751 def WhileNode(keyword_loc, closing_loc, predicate, statements, flags, location = T.unsafe(nil)); end # Create a new XStringNode node # - # source://yarp//lib/prism/dsl.rb#741 + # source://prism//lib/prism/dsl.rb#756 def XStringNode(opening_loc, content_loc, closing_loc, unescaped, location = T.unsafe(nil)); end # Create a new YieldNode node # - # source://yarp//lib/prism/dsl.rb#746 + # source://prism//lib/prism/dsl.rb#761 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://yarp//lib/prism/debug.rb#6 +# 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://yarp//lib/prism/debug.rb#47 + # 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 - # source://yarp//lib/prism/debug.rb#149 + # :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#191 def newlines(source); end - # source://yarp//lib/prism/debug.rb#153 - def parse_serialize_file(filepath); end - - def parse_serialize_file_metadata(_arg0, _arg1); 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://yarp//lib/prism/debug.rb#82 + # source://prism//lib/prism/debug.rb#98 def prism_locals(source); end def profile_file(_arg0); end - def unescape_all(_arg0); end - def unescape_minimal(_arg0); end - def unescape_none(_arg0); end - def unescape_whitespace(_arg0); end end end -# source://yarp//lib/prism/debug.rb#7 +# 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://yarp//lib/prism/debug.rb#10 + # source://prism//lib/prism/debug.rb#12 def initialize(parts); end - # source://yarp//lib/prism/debug.rb#26 + # source://prism//lib/prism/debug.rb#28 def each_child; end - # source://yarp//lib/prism/debug.rb#22 + # source://prism//lib/prism/debug.rb#24 def instructions; end - # source://yarp//lib/prism/debug.rb#18 + # source://prism//lib/prism/debug.rb#20 def local_table; end - # Returns the value of attribute parts. - # - # source://yarp//lib/prism/debug.rb#8 + # source://prism//lib/prism/debug.rb#10 def parts; end - # source://yarp//lib/prism/debug.rb#14 + # source://prism//lib/prism/debug.rb#16 def type; end end @@ -6053,142 +7779,188 @@ end # end # ^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#4529 +# source://prism//lib/prism/node.rb#5054 class Prism::DefNode < ::Prism::Node # def initialize: (name: Symbol, name_loc: Location, receiver: Node?, parameters: ParametersNode?, body: Node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location) -> void # # @return [DefNode] a new instance of DefNode # - # source://yarp//lib/prism/node.rb#4567 + # source://prism//lib/prism/node.rb#5092 + 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 + ).void + end def initialize(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#4584 + # source://prism//lib/prism/node.rb#5109 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # - # source://yarp//lib/prism/node.rb#4543 + # source://prism//lib/prism/node.rb#5068 + sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4589 + # source://prism//lib/prism/node.rb#5114 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#4603 + # source://prism//lib/prism/node.rb#5128 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#4594 + # source://prism//lib/prism/node.rb#5119 def compact_child_nodes; end # def copy: (**params) -> DefNode # - # source://yarp//lib/prism/node.rb#4608 + # source://prism//lib/prism/node.rb#5133 + sig { params(params: T.untyped).returns(Prism::DefNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4589 + # source://prism//lib/prism/node.rb#5114 + 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://yarp//lib/prism/node.rb#4630 + # source://prism//lib/prism/node.rb#5155 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#4635 + # source://prism//lib/prism/node.rb#5160 + sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#4549 + # source://prism//lib/prism/node.rb#5074 + sig { returns(Prism::Location) } def def_keyword_loc; end # def end_keyword: () -> String? # - # source://yarp//lib/prism/node.rb#4660 + # source://prism//lib/prism/node.rb#5185 + sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://yarp//lib/prism/node.rb#4564 + # source://prism//lib/prism/node.rb#5089 + sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # - # source://yarp//lib/prism/node.rb#4655 + # source://prism//lib/prism/node.rb#5180 + sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # - # source://yarp//lib/prism/node.rb#4561 + # source://prism//lib/prism/node.rb#5086 + sig { returns(T.nilable(Prism::Location)) } def equal_loc; end - # source://yarp//lib/prism/node.rb#4664 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5190 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://yarp//lib/prism/node.rb#4546 + # source://prism//lib/prism/node.rb#5071 + sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # - # source://yarp//lib/prism/node.rb#4645 + # source://prism//lib/prism/node.rb#5170 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://yarp//lib/prism/node.rb#4555 + # source://prism//lib/prism/node.rb#5080 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#4531 + # source://prism//lib/prism/node.rb#5056 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#4534 + # source://prism//lib/prism/node.rb#5059 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # - # source://yarp//lib/prism/node.rb#4640 + # source://prism//lib/prism/node.rb#5165 + sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://yarp//lib/prism/node.rb#4552 + # source://prism//lib/prism/node.rb#5077 + sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # - # source://yarp//lib/prism/node.rb#4540 + # source://prism//lib/prism/node.rb#5065 + sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # attr_reader receiver: Node? # - # source://yarp//lib/prism/node.rb#4537 + # source://prism//lib/prism/node.rb#5062 + sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # - # source://yarp//lib/prism/node.rb#4650 + # source://prism//lib/prism/node.rb#5175 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://yarp//lib/prism/node.rb#4558 + # source://prism//lib/prism/node.rb#5083 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Sometimes you want to check an instance of a node against a list of @@ -6206,8 +7978,20 @@ class Prism::DefNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#4710 + # source://prism//lib/prism/node.rb#5236 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#5246 + def type; end + end end # Represents the use of the `defined?` keyword. @@ -6215,82 +7999,108 @@ end # defined?(a) # ^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#4719 +# source://prism//lib/prism/node.rb#5255 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://yarp//lib/prism/node.rb#4733 + # source://prism//lib/prism/node.rb#5269 + 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://yarp//lib/prism/node.rb#4742 + # source://prism//lib/prism/node.rb#5278 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4747 + # source://prism//lib/prism/node.rb#5283 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#4757 + # source://prism//lib/prism/node.rb#5293 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#4752 + # source://prism//lib/prism/node.rb#5288 def compact_child_nodes; end # def copy: (**params) -> DefinedNode # - # source://yarp//lib/prism/node.rb#4762 + # source://prism//lib/prism/node.rb#5298 + sig { params(params: T.untyped).returns(Prism::DefinedNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#4747 + # source://prism//lib/prism/node.rb#5283 + 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://yarp//lib/prism/node.rb#4776 + # source://prism//lib/prism/node.rb#5312 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#4795 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5332 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#4791 + # source://prism//lib/prism/node.rb#5327 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#4730 + # source://prism//lib/prism/node.rb#5266 + sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://yarp//lib/prism/node.rb#4781 + # source://prism//lib/prism/node.rb#5317 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://yarp//lib/prism/node.rb#4721 + # source://prism//lib/prism/node.rb#5257 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://yarp//lib/prism/node.rb#4786 + # source://prism//lib/prism/node.rb#5322 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://yarp//lib/prism/node.rb#4727 + # source://prism//lib/prism/node.rb#5263 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Sometimes you want to check an instance of a node against a list of @@ -6308,19 +8118,32 @@ class Prism::DefinedNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#4819 + # source://prism//lib/prism/node.rb#5356 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#4724 + # source://prism//lib/prism/node.rb#5260 + 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#5366 + 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://yarp//lib/prism/desugar_compiler.rb#6 +# source://prism//lib/prism/desugar_compiler.rb#6 class Prism::DesugarCompiler < ::Prism::MutationCompiler # @@foo &&= bar # @@ -6328,7 +8151,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # @@foo && @@foo = bar # - # source://yarp//lib/prism/desugar_compiler.rb#12 + # source://prism//lib/prism/desugar_compiler.rb#12 def visit_class_variable_and_write_node(node); end # @@foo += bar @@ -6337,7 +8160,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # @@foo = @@foo + bar # - # source://yarp//lib/prism/desugar_compiler.rb#30 + # source://prism//lib/prism/desugar_compiler.rb#30 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar @@ -6346,7 +8169,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(@@foo) ? @@foo : @@foo = bar # - # source://yarp//lib/prism/desugar_compiler.rb#21 + # source://prism//lib/prism/desugar_compiler.rb#21 def visit_class_variable_or_write_node(node); end # Foo &&= bar @@ -6355,7 +8178,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo && Foo = bar # - # source://yarp//lib/prism/desugar_compiler.rb#39 + # source://prism//lib/prism/desugar_compiler.rb#39 def visit_constant_and_write_node(node); end # Foo += bar @@ -6364,7 +8187,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo = Foo + bar # - # source://yarp//lib/prism/desugar_compiler.rb#57 + # source://prism//lib/prism/desugar_compiler.rb#57 def visit_constant_operator_write_node(node); end # Foo ||= bar @@ -6373,7 +8196,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(Foo) ? Foo : Foo = bar # - # source://yarp//lib/prism/desugar_compiler.rb#48 + # source://prism//lib/prism/desugar_compiler.rb#48 def visit_constant_or_write_node(node); end # $foo &&= bar @@ -6382,7 +8205,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo && $foo = bar # - # source://yarp//lib/prism/desugar_compiler.rb#66 + # source://prism//lib/prism/desugar_compiler.rb#66 def visit_global_variable_and_write_node(node); end # $foo += bar @@ -6391,7 +8214,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo = $foo + bar # - # source://yarp//lib/prism/desugar_compiler.rb#84 + # source://prism//lib/prism/desugar_compiler.rb#84 def visit_global_variable_operator_write_node(node); end # $foo ||= bar @@ -6400,22 +8223,22 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?($foo) ? $foo : $foo = bar # - # source://yarp//lib/prism/desugar_compiler.rb#75 + # source://prism//lib/prism/desugar_compiler.rb#75 def visit_global_variable_or_write_node(node); end # becomes # - # source://yarp//lib/prism/desugar_compiler.rb#93 + # source://prism//lib/prism/desugar_compiler.rb#93 def visit_instance_variable_and_write_node(node); end # becomes # - # source://yarp//lib/prism/desugar_compiler.rb#111 + # source://prism//lib/prism/desugar_compiler.rb#111 def visit_instance_variable_operator_write_node(node); end # becomes # - # source://yarp//lib/prism/desugar_compiler.rb#102 + # source://prism//lib/prism/desugar_compiler.rb#102 def visit_instance_variable_or_write_node(node); end # foo &&= bar @@ -6424,7 +8247,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo && foo = bar # - # source://yarp//lib/prism/desugar_compiler.rb#120 + # source://prism//lib/prism/desugar_compiler.rb#120 def visit_local_variable_and_write_node(node); end # foo += bar @@ -6433,7 +8256,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo = foo + bar # - # source://yarp//lib/prism/desugar_compiler.rb#138 + # source://prism//lib/prism/desugar_compiler.rb#138 def visit_local_variable_operator_write_node(node); end # foo ||= bar @@ -6442,29 +8265,29 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo || foo = bar # - # source://yarp//lib/prism/desugar_compiler.rb#129 + # 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://yarp//lib/prism/desugar_compiler.rb#145 + # 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://yarp//lib/prism/desugar_compiler.rb#155 + # 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://yarp//lib/prism/desugar_compiler.rb#187 + # 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://yarp//lib/prism/desugar_compiler.rb#177 + # source://prism//lib/prism/desugar_compiler.rb#177 def desugar_or_write_node(node, read_class, write_class, *arguments); end end @@ -6499,1785 +8322,2773 @@ end # integer = result.value.statements.body.first.receiver.receiver # dispatcher.dispatch_once(integer) # -# source://yarp//lib/prism/dispatcher.rb#40 +# source://prism//lib/prism/dispatcher.rb#40 class Prism::Dispatcher < ::Prism::Visitor + # Initialize a new dispatcher. + # # @return [Dispatcher] a new instance of Dispatcher # - # source://yarp//lib/prism/dispatcher.rb#44 + # source://prism//lib/prism/dispatcher.rb#45 def initialize; end - # Walks `root` dispatching events to all registered listeners + # Walks `root` dispatching events to all registered listeners. # # def dispatch: (Node) -> void # - # source://yarp//lib/prism/visitor.rb#14 + # source://prism//lib/prism/visitor.rb#16 def dispatch(node); end - # Dispatches a single event for `node` to all registered listeners + # Dispatches a single event for `node` to all registered listeners. # # def dispatch_once: (Node) -> void # - # source://yarp//lib/prism/dispatcher.rb#63 + # source://prism//lib/prism/dispatcher.rb#64 def dispatch_once(node); end # attr_reader listeners: Hash[Symbol, Array[Listener]] # - # source://yarp//lib/prism/dispatcher.rb#42 + # source://prism//lib/prism/dispatcher.rb#42 def listeners; end - # Register a listener for one or more events + # Register a listener for one or more events. # # def register: (Listener, *Symbol) -> void # - # source://yarp//lib/prism/dispatcher.rb#51 + # 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://yarp//lib/prism/dispatcher.rb#69 + # 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://yarp//lib/prism/dispatcher.rb#77 + # 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://yarp//lib/prism/dispatcher.rb#85 + # 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://yarp//lib/prism/dispatcher.rb#93 + # 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://yarp//lib/prism/dispatcher.rb#101 + # 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://yarp//lib/prism/dispatcher.rb#109 + # 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://yarp//lib/prism/dispatcher.rb#117 + # 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://yarp//lib/prism/dispatcher.rb#125 + # 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://yarp//lib/prism/dispatcher.rb#133 + # 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://yarp//lib/prism/dispatcher.rb#141 + # 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://yarp//lib/prism/dispatcher.rb#149 + # 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://yarp//lib/prism/dispatcher.rb#157 + # 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://yarp//lib/prism/dispatcher.rb#165 + # 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://yarp//lib/prism/dispatcher.rb#173 + # 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://yarp//lib/prism/dispatcher.rb#181 + # 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://yarp//lib/prism/dispatcher.rb#189 + # 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://yarp//lib/prism/dispatcher.rb#197 + # 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://yarp//lib/prism/dispatcher.rb#205 + # 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://yarp//lib/prism/dispatcher.rb#213 + # 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://yarp//lib/prism/dispatcher.rb#221 + # 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://yarp//lib/prism/dispatcher.rb#229 + # source://prism//lib/prism/dispatcher.rb#230 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#237 + # source://prism//lib/prism/dispatcher.rb#238 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#246 + def visit_case_match_node(node); end + # Dispatch enter and leave events for CaseNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#245 + # source://prism//lib/prism/dispatcher.rb#254 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#253 + # source://prism//lib/prism/dispatcher.rb#262 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#261 + # source://prism//lib/prism/dispatcher.rb#270 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#269 + # source://prism//lib/prism/dispatcher.rb#278 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#277 + # source://prism//lib/prism/dispatcher.rb#286 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#285 + # source://prism//lib/prism/dispatcher.rb#294 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#293 + # source://prism//lib/prism/dispatcher.rb#302 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#301 + # source://prism//lib/prism/dispatcher.rb#310 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#309 + # source://prism//lib/prism/dispatcher.rb#318 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#317 + # source://prism//lib/prism/dispatcher.rb#326 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#325 + # source://prism//lib/prism/dispatcher.rb#334 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#333 + # source://prism//lib/prism/dispatcher.rb#342 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#341 + # source://prism//lib/prism/dispatcher.rb#350 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#349 + # source://prism//lib/prism/dispatcher.rb#358 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#357 + # source://prism//lib/prism/dispatcher.rb#366 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#365 + # source://prism//lib/prism/dispatcher.rb#374 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#373 + # source://prism//lib/prism/dispatcher.rb#382 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#381 + # source://prism//lib/prism/dispatcher.rb#390 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#389 + # source://prism//lib/prism/dispatcher.rb#398 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#397 + # source://prism//lib/prism/dispatcher.rb#406 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#405 + # source://prism//lib/prism/dispatcher.rb#414 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#413 + # source://prism//lib/prism/dispatcher.rb#422 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#421 + # source://prism//lib/prism/dispatcher.rb#430 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#429 + # source://prism//lib/prism/dispatcher.rb#438 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#437 + # source://prism//lib/prism/dispatcher.rb#446 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#445 + # source://prism//lib/prism/dispatcher.rb#454 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#453 + # source://prism//lib/prism/dispatcher.rb#462 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#461 + # source://prism//lib/prism/dispatcher.rb#470 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#469 + # source://prism//lib/prism/dispatcher.rb#478 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#477 + # source://prism//lib/prism/dispatcher.rb#486 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#485 + # source://prism//lib/prism/dispatcher.rb#494 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#493 + # source://prism//lib/prism/dispatcher.rb#502 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#501 + # source://prism//lib/prism/dispatcher.rb#510 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#509 + # source://prism//lib/prism/dispatcher.rb#518 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#517 + # source://prism//lib/prism/dispatcher.rb#526 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#525 + # source://prism//lib/prism/dispatcher.rb#534 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#533 + # source://prism//lib/prism/dispatcher.rb#542 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#541 + # source://prism//lib/prism/dispatcher.rb#550 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#549 + # source://prism//lib/prism/dispatcher.rb#558 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#557 + # source://prism//lib/prism/dispatcher.rb#566 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#565 + # source://prism//lib/prism/dispatcher.rb#574 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#573 + # source://prism//lib/prism/dispatcher.rb#582 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#581 + # source://prism//lib/prism/dispatcher.rb#590 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#589 + # source://prism//lib/prism/dispatcher.rb#598 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#597 + # source://prism//lib/prism/dispatcher.rb#606 def visit_implicit_node(node); end # Dispatch enter and leave events for InNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#605 + # source://prism//lib/prism/dispatcher.rb#614 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#622 + 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#630 + 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#638 + def visit_index_or_write_node(node); end + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#613 + # source://prism//lib/prism/dispatcher.rb#646 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#621 + # source://prism//lib/prism/dispatcher.rb#654 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#629 + # source://prism//lib/prism/dispatcher.rb#662 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#637 + # source://prism//lib/prism/dispatcher.rb#670 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#645 + # source://prism//lib/prism/dispatcher.rb#678 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#653 + # source://prism//lib/prism/dispatcher.rb#686 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#661 + # source://prism//lib/prism/dispatcher.rb#694 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#669 + # source://prism//lib/prism/dispatcher.rb#702 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#677 + # source://prism//lib/prism/dispatcher.rb#710 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#685 + # source://prism//lib/prism/dispatcher.rb#718 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#693 + # source://prism//lib/prism/dispatcher.rb#726 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#701 + # source://prism//lib/prism/dispatcher.rb#734 def visit_interpolated_x_string_node(node); end # Dispatch enter and leave events for KeywordHashNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#709 + # source://prism//lib/prism/dispatcher.rb#742 def visit_keyword_hash_node(node); end - # Dispatch enter and leave events for KeywordParameterNode nodes and continue - # walking the tree. - # - # source://yarp//lib/prism/dispatcher.rb#717 - def visit_keyword_parameter_node(node); end - # Dispatch enter and leave events for KeywordRestParameterNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#725 + # source://prism//lib/prism/dispatcher.rb#750 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#733 + # source://prism//lib/prism/dispatcher.rb#758 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#741 + # source://prism//lib/prism/dispatcher.rb#766 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#749 + # source://prism//lib/prism/dispatcher.rb#774 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#757 + # source://prism//lib/prism/dispatcher.rb#782 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#765 + # source://prism//lib/prism/dispatcher.rb#790 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#773 + # source://prism//lib/prism/dispatcher.rb#798 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#781 + # source://prism//lib/prism/dispatcher.rb#806 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#789 + # source://prism//lib/prism/dispatcher.rb#814 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#797 + # source://prism//lib/prism/dispatcher.rb#822 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#805 + # source://prism//lib/prism/dispatcher.rb#830 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#813 + # source://prism//lib/prism/dispatcher.rb#838 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#821 + # source://prism//lib/prism/dispatcher.rb#846 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#829 + # source://prism//lib/prism/dispatcher.rb#854 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#837 + # source://prism//lib/prism/dispatcher.rb#862 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#845 + # source://prism//lib/prism/dispatcher.rb#870 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#853 + # source://prism//lib/prism/dispatcher.rb#878 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#861 + # source://prism//lib/prism/dispatcher.rb#886 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#869 + # source://prism//lib/prism/dispatcher.rb#894 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#877 + # source://prism//lib/prism/dispatcher.rb#902 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#910 + def visit_optional_keyword_parameter_node(node); end + # Dispatch enter and leave events for OptionalParameterNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#885 + # source://prism//lib/prism/dispatcher.rb#918 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#893 + # source://prism//lib/prism/dispatcher.rb#926 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#901 + # source://prism//lib/prism/dispatcher.rb#934 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#909 + # source://prism//lib/prism/dispatcher.rb#942 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#917 + # source://prism//lib/prism/dispatcher.rb#950 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#925 + # source://prism//lib/prism/dispatcher.rb#958 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#933 + # source://prism//lib/prism/dispatcher.rb#966 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#941 + # source://prism//lib/prism/dispatcher.rb#974 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#949 + # source://prism//lib/prism/dispatcher.rb#982 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#957 + # source://prism//lib/prism/dispatcher.rb#990 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#965 + # source://prism//lib/prism/dispatcher.rb#998 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#973 + # source://prism//lib/prism/dispatcher.rb#1006 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#981 + # source://prism//lib/prism/dispatcher.rb#1014 def visit_regular_expression_node(node); end - # Dispatch enter and leave events for RequiredDestructuredParameterNode nodes and continue + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#989 - def visit_required_destructured_parameter_node(node); end + # source://prism//lib/prism/dispatcher.rb#1022 + def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#997 + # source://prism//lib/prism/dispatcher.rb#1030 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1005 + # source://prism//lib/prism/dispatcher.rb#1038 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1013 + # source://prism//lib/prism/dispatcher.rb#1046 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1021 + # source://prism//lib/prism/dispatcher.rb#1054 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1029 + # source://prism//lib/prism/dispatcher.rb#1062 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1037 + # source://prism//lib/prism/dispatcher.rb#1070 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1045 + # source://prism//lib/prism/dispatcher.rb#1078 def visit_self_node(node); end # Dispatch enter and leave events for SingletonClassNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1053 + # source://prism//lib/prism/dispatcher.rb#1086 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1061 + # source://prism//lib/prism/dispatcher.rb#1094 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1069 + # source://prism//lib/prism/dispatcher.rb#1102 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1077 + # source://prism//lib/prism/dispatcher.rb#1110 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1085 + # source://prism//lib/prism/dispatcher.rb#1118 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1093 + # source://prism//lib/prism/dispatcher.rb#1126 def visit_statements_node(node); end - # Dispatch enter and leave events for StringConcatNode nodes and continue - # walking the tree. - # - # source://yarp//lib/prism/dispatcher.rb#1101 - def visit_string_concat_node(node); end - # Dispatch enter and leave events for StringNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1109 + # source://prism//lib/prism/dispatcher.rb#1134 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1117 + # source://prism//lib/prism/dispatcher.rb#1142 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1125 + # source://prism//lib/prism/dispatcher.rb#1150 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1133 + # source://prism//lib/prism/dispatcher.rb#1158 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1141 + # source://prism//lib/prism/dispatcher.rb#1166 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1149 + # source://prism//lib/prism/dispatcher.rb#1174 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1157 + # source://prism//lib/prism/dispatcher.rb#1182 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1165 + # source://prism//lib/prism/dispatcher.rb#1190 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1173 + # source://prism//lib/prism/dispatcher.rb#1198 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1181 + # source://prism//lib/prism/dispatcher.rb#1206 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes and continue # walking the tree. # - # source://yarp//lib/prism/dispatcher.rb#1189 + # source://prism//lib/prism/dispatcher.rb#1214 def visit_yield_node(node); end end -# source://yarp//lib/prism/dispatcher.rb#1195 +# source://prism//lib/prism/dispatcher.rb#1220 class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor # @return [DispatchOnce] a new instance of DispatchOnce # - # source://yarp//lib/prism/dispatcher.rb#1198 + # source://prism//lib/prism/dispatcher.rb#1223 def initialize(listeners); end # Returns the value of attribute listeners. # - # source://yarp//lib/prism/dispatcher.rb#1196 + # source://prism//lib/prism/dispatcher.rb#1221 def listeners; end # Dispatch enter and leave events for AliasGlobalVariableNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1203 + # source://prism//lib/prism/dispatcher.rb#1228 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1209 + # source://prism//lib/prism/dispatcher.rb#1234 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1215 + # source://prism//lib/prism/dispatcher.rb#1240 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1221 + # source://prism//lib/prism/dispatcher.rb#1246 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1227 + # source://prism//lib/prism/dispatcher.rb#1252 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1233 + # source://prism//lib/prism/dispatcher.rb#1258 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1239 + # source://prism//lib/prism/dispatcher.rb#1264 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1245 + # source://prism//lib/prism/dispatcher.rb#1270 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1251 + # source://prism//lib/prism/dispatcher.rb#1276 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1257 + # source://prism//lib/prism/dispatcher.rb#1282 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1263 + # source://prism//lib/prism/dispatcher.rb#1288 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1269 + # source://prism//lib/prism/dispatcher.rb#1294 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1275 + # source://prism//lib/prism/dispatcher.rb#1300 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1281 + # source://prism//lib/prism/dispatcher.rb#1306 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1287 + # source://prism//lib/prism/dispatcher.rb#1312 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1293 + # source://prism//lib/prism/dispatcher.rb#1318 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1299 + # source://prism//lib/prism/dispatcher.rb#1324 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1305 + # source://prism//lib/prism/dispatcher.rb#1330 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1311 + # source://prism//lib/prism/dispatcher.rb#1336 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1317 + # source://prism//lib/prism/dispatcher.rb#1342 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1323 + # source://prism//lib/prism/dispatcher.rb#1348 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1329 + # source://prism//lib/prism/dispatcher.rb#1354 def visit_capture_pattern_node(node); end + # Dispatch enter and leave events for CaseMatchNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1360 + def visit_case_match_node(node); end + # Dispatch enter and leave events for CaseNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1335 + # source://prism//lib/prism/dispatcher.rb#1366 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1341 + # source://prism//lib/prism/dispatcher.rb#1372 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1347 + # source://prism//lib/prism/dispatcher.rb#1378 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1353 + # source://prism//lib/prism/dispatcher.rb#1384 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1359 + # source://prism//lib/prism/dispatcher.rb#1390 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1365 + # source://prism//lib/prism/dispatcher.rb#1396 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1371 + # source://prism//lib/prism/dispatcher.rb#1402 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1377 + # source://prism//lib/prism/dispatcher.rb#1408 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1383 + # source://prism//lib/prism/dispatcher.rb#1414 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1389 + # source://prism//lib/prism/dispatcher.rb#1420 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1395 + # source://prism//lib/prism/dispatcher.rb#1426 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1401 + # source://prism//lib/prism/dispatcher.rb#1432 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1407 + # source://prism//lib/prism/dispatcher.rb#1438 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1413 + # source://prism//lib/prism/dispatcher.rb#1444 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1419 + # source://prism//lib/prism/dispatcher.rb#1450 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1425 + # source://prism//lib/prism/dispatcher.rb#1456 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1431 + # source://prism//lib/prism/dispatcher.rb#1462 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1437 + # source://prism//lib/prism/dispatcher.rb#1468 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1443 + # source://prism//lib/prism/dispatcher.rb#1474 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1449 + # source://prism//lib/prism/dispatcher.rb#1480 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1455 + # source://prism//lib/prism/dispatcher.rb#1486 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1461 + # source://prism//lib/prism/dispatcher.rb#1492 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1467 + # source://prism//lib/prism/dispatcher.rb#1498 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1473 + # source://prism//lib/prism/dispatcher.rb#1504 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1479 + # source://prism//lib/prism/dispatcher.rb#1510 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1485 + # source://prism//lib/prism/dispatcher.rb#1516 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1491 + # source://prism//lib/prism/dispatcher.rb#1522 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1497 + # source://prism//lib/prism/dispatcher.rb#1528 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1503 + # source://prism//lib/prism/dispatcher.rb#1534 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1509 + # source://prism//lib/prism/dispatcher.rb#1540 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1515 + # source://prism//lib/prism/dispatcher.rb#1546 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1521 + # source://prism//lib/prism/dispatcher.rb#1552 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1527 + # source://prism//lib/prism/dispatcher.rb#1558 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1533 + # source://prism//lib/prism/dispatcher.rb#1564 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1539 + # source://prism//lib/prism/dispatcher.rb#1570 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1545 + # source://prism//lib/prism/dispatcher.rb#1576 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1551 + # source://prism//lib/prism/dispatcher.rb#1582 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1557 + # source://prism//lib/prism/dispatcher.rb#1588 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1563 + # source://prism//lib/prism/dispatcher.rb#1594 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1569 + # source://prism//lib/prism/dispatcher.rb#1600 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1575 + # source://prism//lib/prism/dispatcher.rb#1606 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1581 + # source://prism//lib/prism/dispatcher.rb#1612 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1587 + # source://prism//lib/prism/dispatcher.rb#1618 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1593 + # source://prism//lib/prism/dispatcher.rb#1624 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1599 + # source://prism//lib/prism/dispatcher.rb#1630 def visit_implicit_node(node); end # Dispatch enter and leave events for InNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1605 + # source://prism//lib/prism/dispatcher.rb#1636 def visit_in_node(node); end + # Dispatch enter and leave events for IndexAndWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1642 + def visit_index_and_write_node(node); end + + # Dispatch enter and leave events for IndexOperatorWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1648 + def visit_index_operator_write_node(node); end + + # Dispatch enter and leave events for IndexOrWriteNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1654 + def visit_index_or_write_node(node); end + # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1611 + # source://prism//lib/prism/dispatcher.rb#1660 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1617 + # source://prism//lib/prism/dispatcher.rb#1666 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1623 + # source://prism//lib/prism/dispatcher.rb#1672 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1629 + # source://prism//lib/prism/dispatcher.rb#1678 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1635 + # source://prism//lib/prism/dispatcher.rb#1684 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1641 + # source://prism//lib/prism/dispatcher.rb#1690 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1647 + # source://prism//lib/prism/dispatcher.rb#1696 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1653 + # source://prism//lib/prism/dispatcher.rb#1702 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1659 + # source://prism//lib/prism/dispatcher.rb#1708 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1665 + # source://prism//lib/prism/dispatcher.rb#1714 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1671 + # source://prism//lib/prism/dispatcher.rb#1720 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1677 + # source://prism//lib/prism/dispatcher.rb#1726 def visit_interpolated_x_string_node(node); end # Dispatch enter and leave events for KeywordHashNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1683 + # source://prism//lib/prism/dispatcher.rb#1732 def visit_keyword_hash_node(node); end - # Dispatch enter and leave events for KeywordParameterNode nodes. - # - # source://yarp//lib/prism/dispatcher.rb#1689 - def visit_keyword_parameter_node(node); end - # Dispatch enter and leave events for KeywordRestParameterNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1695 + # source://prism//lib/prism/dispatcher.rb#1738 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1701 + # source://prism//lib/prism/dispatcher.rb#1744 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1707 + # source://prism//lib/prism/dispatcher.rb#1750 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1713 + # source://prism//lib/prism/dispatcher.rb#1756 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1719 + # source://prism//lib/prism/dispatcher.rb#1762 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1725 + # source://prism//lib/prism/dispatcher.rb#1768 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1731 + # source://prism//lib/prism/dispatcher.rb#1774 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1737 + # source://prism//lib/prism/dispatcher.rb#1780 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1743 + # source://prism//lib/prism/dispatcher.rb#1786 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1749 + # source://prism//lib/prism/dispatcher.rb#1792 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1755 + # source://prism//lib/prism/dispatcher.rb#1798 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1761 + # source://prism//lib/prism/dispatcher.rb#1804 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1767 + # source://prism//lib/prism/dispatcher.rb#1810 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1773 + # source://prism//lib/prism/dispatcher.rb#1816 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1779 + # source://prism//lib/prism/dispatcher.rb#1822 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1785 + # source://prism//lib/prism/dispatcher.rb#1828 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1791 + # source://prism//lib/prism/dispatcher.rb#1834 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1797 + # source://prism//lib/prism/dispatcher.rb#1840 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1803 + # source://prism//lib/prism/dispatcher.rb#1846 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1809 + # source://prism//lib/prism/dispatcher.rb#1852 def visit_numbered_reference_read_node(node); end + # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. + # + # source://prism//lib/prism/dispatcher.rb#1858 + def visit_optional_keyword_parameter_node(node); end + # Dispatch enter and leave events for OptionalParameterNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1815 + # source://prism//lib/prism/dispatcher.rb#1864 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1821 + # source://prism//lib/prism/dispatcher.rb#1870 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1827 + # source://prism//lib/prism/dispatcher.rb#1876 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1833 + # source://prism//lib/prism/dispatcher.rb#1882 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1839 + # source://prism//lib/prism/dispatcher.rb#1888 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1845 + # source://prism//lib/prism/dispatcher.rb#1894 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1851 + # source://prism//lib/prism/dispatcher.rb#1900 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1857 + # source://prism//lib/prism/dispatcher.rb#1906 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1863 + # source://prism//lib/prism/dispatcher.rb#1912 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1869 + # source://prism//lib/prism/dispatcher.rb#1918 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1875 + # source://prism//lib/prism/dispatcher.rb#1924 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1881 + # source://prism//lib/prism/dispatcher.rb#1930 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1887 + # source://prism//lib/prism/dispatcher.rb#1936 def visit_regular_expression_node(node); end - # Dispatch enter and leave events for RequiredDestructuredParameterNode nodes. + # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1893 - def visit_required_destructured_parameter_node(node); end + # source://prism//lib/prism/dispatcher.rb#1942 + def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1899 + # source://prism//lib/prism/dispatcher.rb#1948 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1905 + # source://prism//lib/prism/dispatcher.rb#1954 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1911 + # source://prism//lib/prism/dispatcher.rb#1960 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1917 + # source://prism//lib/prism/dispatcher.rb#1966 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1923 + # source://prism//lib/prism/dispatcher.rb#1972 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1929 + # source://prism//lib/prism/dispatcher.rb#1978 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1935 + # source://prism//lib/prism/dispatcher.rb#1984 def visit_self_node(node); end # Dispatch enter and leave events for SingletonClassNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1941 + # source://prism//lib/prism/dispatcher.rb#1990 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1947 + # source://prism//lib/prism/dispatcher.rb#1996 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1953 + # source://prism//lib/prism/dispatcher.rb#2002 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1959 + # source://prism//lib/prism/dispatcher.rb#2008 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1965 + # source://prism//lib/prism/dispatcher.rb#2014 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1971 + # source://prism//lib/prism/dispatcher.rb#2020 def visit_statements_node(node); end - # Dispatch enter and leave events for StringConcatNode nodes. - # - # source://yarp//lib/prism/dispatcher.rb#1977 - def visit_string_concat_node(node); end - # Dispatch enter and leave events for StringNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1983 + # source://prism//lib/prism/dispatcher.rb#2026 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1989 + # source://prism//lib/prism/dispatcher.rb#2032 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#1995 + # source://prism//lib/prism/dispatcher.rb#2038 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#2001 + # source://prism//lib/prism/dispatcher.rb#2044 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#2007 + # source://prism//lib/prism/dispatcher.rb#2050 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#2013 + # source://prism//lib/prism/dispatcher.rb#2056 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#2019 + # source://prism//lib/prism/dispatcher.rb#2062 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#2025 + # source://prism//lib/prism/dispatcher.rb#2068 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#2031 + # source://prism//lib/prism/dispatcher.rb#2074 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#2037 + # source://prism//lib/prism/dispatcher.rb#2080 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes. # - # source://yarp//lib/prism/dispatcher.rb#2043 + # source://prism//lib/prism/dispatcher.rb#2086 def visit_yield_node(node); end end -# Represents an `else` clause in a `case`, `if`, or `unless` statement. -# -# if a then b else c end -# ^^^^^^^^^^ +# This visitor provides the ability to call Node#to_dot, which converts a +# subtree into a graphviz dot graph. # -# source://yarp//lib/prism/node.rb#4828 -class Prism::ElseNode < ::Prism::Node - # def initialize: (else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location) -> void +# source://prism//lib/prism/dot_visitor.rb#13 +class Prism::DotVisitor < ::Prism::Visitor + # Initialize a new dot visitor. # - # @return [ElseNode] a new instance of ElseNode + # @return [DotVisitor] a new instance of DotVisitor # - # source://yarp//lib/prism/node.rb#4839 - def initialize(else_keyword_loc, statements, end_keyword_loc, location); end + # source://prism//lib/prism/dot_visitor.rb#105 + def initialize; end - # def accept: (visitor: Visitor) -> void + # The digraph that is being built. # - # source://yarp//lib/prism/node.rb#4847 - def accept(visitor); end + # source://prism//lib/prism/dot_visitor.rb#102 + def digraph; end - # def child_nodes: () -> Array[nil | Node] + # Convert this visitor into a graphviz dot graph string. # - # source://yarp//lib/prism/node.rb#4852 - def child_nodes; end + # source://prism//lib/prism/dot_visitor.rb#110 + def to_dot; end - # def comment_targets: () -> Array[Node | Location] + # Visit a AliasGlobalVariableNode node. # - # source://yarp//lib/prism/node.rb#4864 - def comment_targets; end + # source://prism//lib/prism/dot_visitor.rb#115 + def visit_alias_global_variable_node(node); end - # def compact_child_nodes: () -> Array[Node] + # Visit a AliasMethodNode node. # - # source://yarp//lib/prism/node.rb#4857 - def compact_child_nodes; end + # source://prism//lib/prism/dot_visitor.rb#140 + def visit_alias_method_node(node); end - # def copy: (**params) -> ElseNode + # Visit a AlternationPatternNode node. # - # source://yarp//lib/prism/node.rb#4869 - def copy(**params); end + # source://prism//lib/prism/dot_visitor.rb#165 + def visit_alternation_pattern_node(node); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # Visit a AndNode node. # - # source://yarp//lib/prism/node.rb#4852 - def deconstruct; end + # source://prism//lib/prism/dot_visitor.rb#190 + def visit_and_node(node); end - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # Visit a ArgumentsNode node. # - # source://yarp//lib/prism/node.rb#4882 - def deconstruct_keys(keys); end + # source://prism//lib/prism/dot_visitor.rb#215 + def visit_arguments_node(node); end - # def else_keyword: () -> String + # Visit a ArrayNode node. # - # source://yarp//lib/prism/node.rb#4887 - def else_keyword; end + # source://prism//lib/prism/dot_visitor.rb#241 + def visit_array_node(node); end - # attr_reader else_keyword_loc: Location + # Visit a ArrayPatternNode node. # - # source://yarp//lib/prism/node.rb#4830 - def else_keyword_loc; end + # source://prism//lib/prism/dot_visitor.rb#274 + def visit_array_pattern_node(node); end - # def end_keyword: () -> String? + # Visit a AssocNode node. # - # source://yarp//lib/prism/node.rb#4892 - def end_keyword; end + # source://prism//lib/prism/dot_visitor.rb#328 + def visit_assoc_node(node); end - # attr_reader end_keyword_loc: Location? + # Visit a AssocSplatNode node. # - # source://yarp//lib/prism/node.rb#4836 - def end_keyword_loc; end + # source://prism//lib/prism/dot_visitor.rb#357 + def visit_assoc_splat_node(node); end - # source://yarp//lib/prism/node.rb#4896 - def inspect(inspector = T.unsafe(nil)); end + # Visit a BackReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#380 + def visit_back_reference_read_node(node); end - # attr_reader statements: StatementsNode? + # Visit a BeginNode node. # - # source://yarp//lib/prism/node.rb#4833 - def statements; end + # source://prism//lib/prism/dot_visitor.rb#397 + def visit_begin_node(node); end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Visit a BlockArgumentNode node. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # source://prism//lib/prism/dot_visitor.rb#445 + def visit_block_argument_node(node); end + + # Visit a BlockLocalVariableNode node. # - # def type: () -> Symbol + # source://prism//lib/prism/dot_visitor.rb#468 + def visit_block_local_variable_node(node); end + + # Visit a BlockNode node. # - # source://yarp//lib/prism/node.rb#4923 - def type; end -end + # source://prism//lib/prism/dot_visitor.rb#485 + def visit_block_node(node); end -# Represents an interpolated set of statements. -# -# "foo #{bar}" -# ^^^^^^ -# -# source://yarp//lib/prism/node.rb#4932 -class Prism::EmbeddedStatementsNode < ::Prism::Node - # def initialize: (opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location) -> void + # Visit a BlockParameterNode node. # - # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode + # source://prism//lib/prism/dot_visitor.rb#520 + def visit_block_parameter_node(node); end + + # Visit a BlockParametersNode node. # - # source://yarp//lib/prism/node.rb#4943 - def initialize(opening_loc, statements, closing_loc, location); end + # source://prism//lib/prism/dot_visitor.rb#545 + def visit_block_parameters_node(node); end - # def accept: (visitor: Visitor) -> void + # Visit a BreakNode node. # - # source://yarp//lib/prism/node.rb#4951 - def accept(visitor); end + # source://prism//lib/prism/dot_visitor.rb#584 + def visit_break_node(node); end - # def child_nodes: () -> Array[nil | Node] + # Visit a CallAndWriteNode node. # - # source://yarp//lib/prism/node.rb#4956 - def child_nodes; end + # source://prism//lib/prism/dot_visitor.rb#607 + def visit_call_and_write_node(node); end - # def closing: () -> String + # Visit a CallNode node. # - # source://yarp//lib/prism/node.rb#4996 - def closing; end + # source://prism//lib/prism/dot_visitor.rb#653 + def visit_call_node(node); end - # attr_reader closing_loc: Location + # Visit a CallOperatorWriteNode node. # - # source://yarp//lib/prism/node.rb#4940 - def closing_loc; end + # source://prism//lib/prism/dot_visitor.rb#711 + def visit_call_operator_write_node(node); end - # def comment_targets: () -> Array[Node | Location] + # Visit a CallOrWriteNode node. # - # source://yarp//lib/prism/node.rb#4968 - def comment_targets; end + # source://prism//lib/prism/dot_visitor.rb#760 + def visit_call_or_write_node(node); end - # def compact_child_nodes: () -> Array[Node] + # Visit a CapturePatternNode node. # - # source://yarp//lib/prism/node.rb#4961 - def compact_child_nodes; end + # source://prism//lib/prism/dot_visitor.rb#806 + def visit_capture_pattern_node(node); end - # def copy: (**params) -> EmbeddedStatementsNode + # Visit a CaseMatchNode node. # - # source://yarp//lib/prism/node.rb#4973 - def copy(**params); end + # source://prism//lib/prism/dot_visitor.rb#831 + def visit_case_match_node(node); end - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] + # Visit a CaseNode node. # - # source://yarp//lib/prism/node.rb#4956 - def deconstruct; end + # source://prism//lib/prism/dot_visitor.rb#872 + def visit_case_node(node); end - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # Visit a ClassNode node. # - # source://yarp//lib/prism/node.rb#4986 - def deconstruct_keys(keys); end + # source://prism//lib/prism/dot_visitor.rb#913 + def visit_class_node(node); end - # source://yarp//lib/prism/node.rb#5000 - def inspect(inspector = T.unsafe(nil)); end + # Visit a ClassVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#960 + def visit_class_variable_and_write_node(node); end - # def opening: () -> String + # Visit a ClassVariableOperatorWriteNode node. # - # source://yarp//lib/prism/node.rb#4991 - def opening; end + # source://prism//lib/prism/dot_visitor.rb#987 + def visit_class_variable_operator_write_node(node); end - # attr_reader opening_loc: Location + # Visit a ClassVariableOrWriteNode node. # - # source://yarp//lib/prism/node.rb#4934 - def opening_loc; end + # source://prism//lib/prism/dot_visitor.rb#1017 + def visit_class_variable_or_write_node(node); end - # attr_reader statements: StatementsNode? + # Visit a ClassVariableReadNode node. # - # source://yarp//lib/prism/node.rb#4937 - def statements; end + # source://prism//lib/prism/dot_visitor.rb#1044 + def visit_class_variable_read_node(node); end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Visit a ClassVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1061 + def visit_class_variable_target_node(node); end + + # Visit a ClassVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1078 + def visit_class_variable_write_node(node); end + + # Visit a ConstantAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1107 + def visit_constant_and_write_node(node); end + + # Visit a ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1134 + def visit_constant_operator_write_node(node); end + + # Visit a ConstantOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1164 + def visit_constant_or_write_node(node); end + + # Visit a ConstantPathAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1191 + def visit_constant_path_and_write_node(node); end + + # Visit a ConstantPathNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1216 + def visit_constant_path_node(node); end + + # Visit a ConstantPathOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1243 + def visit_constant_path_operator_write_node(node); end + + # Visit a ConstantPathOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1271 + def visit_constant_path_or_write_node(node); end + + # Visit a ConstantPathTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1296 + def visit_constant_path_target_node(node); end + + # Visit a ConstantPathWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1323 + def visit_constant_path_write_node(node); end + + # Visit a ConstantReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1348 + def visit_constant_read_node(node); end + + # Visit a ConstantTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1365 + def visit_constant_target_node(node); end + + # Visit a ConstantWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1382 + def visit_constant_write_node(node); end + + # Visit a DefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1409 + def visit_def_node(node); end + + # Visit a DefinedNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1478 + def visit_defined_node(node); end + + # Visit a ElseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1509 + def visit_else_node(node); end + + # Visit a EmbeddedStatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1537 + def visit_embedded_statements_node(node); end + + # Visit a EmbeddedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1563 + def visit_embedded_variable_node(node); end + + # Visit a EnsureNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1584 + def visit_ensure_node(node); end + + # Visit a FalseNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1610 + def visit_false_node(node); end + + # Visit a FindPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1624 + def visit_find_pattern_node(node); end + + # Visit a FlipFlopNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1671 + def visit_flip_flop_node(node); end + + # Visit a FloatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1703 + def visit_float_node(node); end + + # Visit a ForNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1717 + def visit_for_node(node); end + + # Visit a ForwardingArgumentsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1759 + def visit_forwarding_arguments_node(node); end + + # Visit a ForwardingParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1773 + def visit_forwarding_parameter_node(node); end + + # Visit a ForwardingSuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1787 + def visit_forwarding_super_node(node); end + + # Visit a GlobalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1807 + def visit_global_variable_and_write_node(node); end + + # Visit a GlobalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1834 + def visit_global_variable_operator_write_node(node); end + + # Visit a GlobalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1864 + def visit_global_variable_or_write_node(node); end + + # Visit a GlobalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1891 + def visit_global_variable_read_node(node); end + + # Visit a GlobalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1908 + def visit_global_variable_target_node(node); end + + # Visit a GlobalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1925 + def visit_global_variable_write_node(node); end + + # Visit a HashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1952 + def visit_hash_node(node); end + + # Visit a HashPatternNode node. + # + # source://prism//lib/prism/dot_visitor.rb#1981 + def visit_hash_pattern_node(node); end + + # Visit a IfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2026 + def visit_if_node(node); end + + # Visit a ImaginaryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2071 + def visit_imaginary_node(node); end + + # Visit a ImplicitNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2089 + def visit_implicit_node(node); end + + # Visit a InNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2107 + def visit_in_node(node); end + + # Visit a IndexAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2139 + def visit_index_and_write_node(node); end + + # Visit a IndexOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2192 + def visit_index_operator_write_node(node); end + + # Visit a IndexOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2248 + def visit_index_or_write_node(node); end + + # Visit a InstanceVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2301 + def visit_instance_variable_and_write_node(node); end + + # Visit a InstanceVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2328 + def visit_instance_variable_operator_write_node(node); end + + # Visit a InstanceVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2358 + def visit_instance_variable_or_write_node(node); end + + # Visit a InstanceVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2385 + def visit_instance_variable_read_node(node); end + + # Visit a InstanceVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2402 + def visit_instance_variable_target_node(node); end + + # Visit a InstanceVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2419 + def visit_instance_variable_write_node(node); end + + # Visit a IntegerNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2446 + def visit_integer_node(node); end + + # Visit a InterpolatedMatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2463 + def visit_interpolated_match_last_line_node(node); end + + # Visit a InterpolatedRegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2495 + def visit_interpolated_regular_expression_node(node); end + + # Visit a InterpolatedStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2527 + def visit_interpolated_string_node(node); end + + # Visit a InterpolatedSymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2560 + def visit_interpolated_symbol_node(node); end + + # Visit a InterpolatedXStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2593 + def visit_interpolated_x_string_node(node); end + + # Visit a KeywordHashNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2622 + def visit_keyword_hash_node(node); end + + # Visit a KeywordRestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2645 + def visit_keyword_rest_parameter_node(node); end + + # Visit a LambdaNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2670 + def visit_lambda_node(node); end + + # Visit a LocalVariableAndWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2708 + def visit_local_variable_and_write_node(node); end + + # Visit a LocalVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2738 + def visit_local_variable_operator_write_node(node); end + + # Visit a LocalVariableOrWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2771 + def visit_local_variable_or_write_node(node); end + + # Visit a LocalVariableReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2801 + def visit_local_variable_read_node(node); end + + # Visit a LocalVariableTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2821 + def visit_local_variable_target_node(node); end + + # Visit a LocalVariableWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2841 + def visit_local_variable_write_node(node); end + + # Visit a MatchLastLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2871 + def visit_match_last_line_node(node); end + + # Visit a MatchPredicateNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2900 + def visit_match_predicate_node(node); end + + # Visit a MatchRequiredNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2925 + def visit_match_required_node(node); end + + # Visit a MatchWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2950 + def visit_match_write_node(node); end + + # Visit a MissingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2977 + def visit_missing_node(node); end + + # Visit a ModuleNode node. + # + # source://prism//lib/prism/dot_visitor.rb#2991 + def visit_module_node(node); end + + # Visit a MultiTargetNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3027 + def visit_multi_target_node(node); end + + # Visit a MultiWriteNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3075 + def visit_multi_write_node(node); end + + # Visit a NextNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3130 + def visit_next_node(node); end + + # Visit a NilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3153 + def visit_nil_node(node); end + + # Visit a NoKeywordsParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3167 + def visit_no_keywords_parameter_node(node); end + + # Visit a NumberedReferenceReadNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3187 + def visit_numbered_reference_read_node(node); end + + # Visit a OptionalKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3204 + def visit_optional_keyword_parameter_node(node); end + + # Visit a OptionalParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3228 + def visit_optional_parameter_node(node); end + + # Visit a OrNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3255 + def visit_or_node(node); end + + # Visit a ParametersNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3280 + def visit_parameters_node(node); end + + # Visit a ParenthesesNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3348 + def visit_parentheses_node(node); end + + # Visit a PinnedExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3374 + def visit_pinned_expression_node(node); end + + # Visit a PinnedVariableNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3401 + def visit_pinned_variable_node(node); end + + # Visit a PostExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3422 + def visit_post_execution_node(node); end + + # Visit a PreExecutionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3451 + def visit_pre_execution_node(node); end + + # Visit a ProgramNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3480 + def visit_program_node(node); end + + # Visit a RangeNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3501 + def visit_range_node(node); end + + # Visit a RationalNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3533 + def visit_rational_node(node); end + + # Visit a RedoNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3551 + def visit_redo_node(node); end + + # Visit a RegularExpressionNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3565 + def visit_regular_expression_node(node); end + + # Visit a RequiredKeywordParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3594 + def visit_required_keyword_parameter_node(node); end + + # Visit a RequiredParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3614 + def visit_required_parameter_node(node); end + + # Visit a RescueModifierNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3631 + def visit_rescue_modifier_node(node); end + + # Visit a RescueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3656 + def visit_rescue_node(node); end + + # Visit a RestParameterNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3705 + def visit_rest_parameter_node(node); end + + # Visit a RetryNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3730 + def visit_retry_node(node); end + + # Visit a ReturnNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3744 + def visit_return_node(node); end + + # Visit a SelfNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3767 + def visit_self_node(node); end + + # Visit a SingletonClassNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3781 + def visit_singleton_class_node(node); end + + # Visit a SourceEncodingNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3817 + def visit_source_encoding_node(node); end + + # Visit a SourceFileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3831 + def visit_source_file_node(node); end + + # Visit a SourceLineNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3848 + def visit_source_line_node(node); end + + # Visit a SplatNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3862 + def visit_splat_node(node); end + + # Visit a StatementsNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3885 + def visit_statements_node(node); end + + # Visit a StringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3908 + def visit_string_node(node); end + + # Visit a SuperNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3941 + def visit_super_node(node); end + + # Visit a SymbolNode node. + # + # source://prism//lib/prism/dot_visitor.rb#3980 + def visit_symbol_node(node); end + + # Visit a TrueNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4012 + def visit_true_node(node); end + + # Visit a UndefNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4026 + def visit_undef_node(node); end + + # Visit a UnlessNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4052 + def visit_unless_node(node); end + + # Visit a UntilNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4095 + def visit_until_node(node); end + + # Visit a WhenNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4130 + def visit_when_node(node); end + + # Visit a WhileNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4162 + def visit_while_node(node); end + + # Visit a XStringNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4197 + def visit_x_string_node(node); end + + # Visit a YieldNode node. + # + # source://prism//lib/prism/dot_visitor.rb#4223 + 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#4269 + def arguments_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#4277 + def call_node_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#4286 + def integer_base_flags_inspect(node); end + + # Inspect a location to display the start and end line and column numbers. + # + # source://prism//lib/prism/dot_visitor.rb#4263 + 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#4297 + def loop_flags_inspect(node); end + + # Generate a unique node ID for a node throughout the digraph. + # + # source://prism//lib/prism/dot_visitor.rb#4258 + 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#4305 + 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#4313 + 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#4328 + def string_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#5375 +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#5386 + 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#5394 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5399 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5411 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5404 + def compact_child_nodes; end + + # def copy: (**params) -> ElseNode + # + # source://prism//lib/prism/node.rb#5416 + 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#5399 + 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#5429 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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#5434 + sig { returns(String) } + def else_keyword; end + + # attr_reader else_keyword_loc: Location + # + # source://prism//lib/prism/node.rb#5377 + sig { returns(Prism::Location) } + def else_keyword_loc; end + + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#5439 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#5383 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5444 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5380 + 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#5471 + 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#5481 + def type; end + end +end + +# EmbDocComment objects correspond to comments that are surrounded by =begin +# and =end. +# +# source://prism//lib/prism/parse_result.rb#265 +class Prism::EmbDocComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#267 + def inspect; end +end + +# Represents an interpolated set of statements. +# +# "foo #{bar}" +# ^^^^^^ +# +# source://prism//lib/prism/node.rb#5490 +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#5501 + 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#5509 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5514 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#5554 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#5498 + sig { returns(Prism::Location) } + def closing_loc; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#5526 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#5519 + def compact_child_nodes; end + + # def copy: (**params) -> EmbeddedStatementsNode + # + # source://prism//lib/prism/node.rb#5531 + 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#5514 + 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#5544 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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#5559 + def inspect(inspector = T.unsafe(nil)); end + + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#5549 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#5492 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader statements: StatementsNode? + # + # source://prism//lib/prism/node.rb#5495 + 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 @@ -8287,8 +11098,20 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#5027 + # source://prism//lib/prism/node.rb#5586 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#5596 + def type; end + end end # Represents an interpolated variable. @@ -8296,62 +11119,76 @@ end # "foo #@bar" # ^^^^^ # -# source://yarp//lib/prism/node.rb#5036 +# source://prism//lib/prism/node.rb#5605 class Prism::EmbeddedVariableNode < ::Prism::Node # def initialize: (operator_loc: Location, variable: Node, location: Location) -> void # # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode # - # source://yarp//lib/prism/node.rb#5044 + # source://prism//lib/prism/node.rb#5613 + 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://yarp//lib/prism/node.rb#5051 + # source://prism//lib/prism/node.rb#5620 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5056 + # source://prism//lib/prism/node.rb#5625 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#5066 + # source://prism//lib/prism/node.rb#5635 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#5061 + # source://prism//lib/prism/node.rb#5630 def compact_child_nodes; end # def copy: (**params) -> EmbeddedVariableNode # - # source://yarp//lib/prism/node.rb#5071 + # source://prism//lib/prism/node.rb#5640 + sig { params(params: T.untyped).returns(Prism::EmbeddedVariableNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5056 + # source://prism//lib/prism/node.rb#5625 + 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://yarp//lib/prism/node.rb#5083 + # source://prism//lib/prism/node.rb#5652 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#5092 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5662 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#5088 + # source://prism//lib/prism/node.rb#5657 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#5038 + # source://prism//lib/prism/node.rb#5607 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -8369,13 +11206,26 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#5114 + # source://prism//lib/prism/node.rb#5684 def type; end # attr_reader variable: Node # - # source://yarp//lib/prism/node.rb#5041 + # source://prism//lib/prism/node.rb#5610 + 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#5694 + def type; end + end end # Represents an `ensure` clause in a `begin` statement. @@ -8387,77 +11237,101 @@ end # bar # end # -# source://yarp//lib/prism/node.rb#5127 +# source://prism//lib/prism/node.rb#5707 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://yarp//lib/prism/node.rb#5138 + # source://prism//lib/prism/node.rb#5718 + 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://yarp//lib/prism/node.rb#5146 + # source://prism//lib/prism/node.rb#5726 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5151 + # source://prism//lib/prism/node.rb#5731 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#5163 + # source://prism//lib/prism/node.rb#5743 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#5156 + # source://prism//lib/prism/node.rb#5736 def compact_child_nodes; end # def copy: (**params) -> EnsureNode # - # source://yarp//lib/prism/node.rb#5168 + # source://prism//lib/prism/node.rb#5748 + sig { params(params: T.untyped).returns(Prism::EnsureNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5151 + # source://prism//lib/prism/node.rb#5731 + 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://yarp//lib/prism/node.rb#5181 + # source://prism//lib/prism/node.rb#5761 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#5191 + # source://prism//lib/prism/node.rb#5771 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#5135 + # source://prism//lib/prism/node.rb#5715 + sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # - # source://yarp//lib/prism/node.rb#5186 + # source://prism//lib/prism/node.rb#5766 + sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#5129 + # source://prism//lib/prism/node.rb#5709 + sig { returns(Prism::Location) } def ensure_keyword_loc; end - # source://yarp//lib/prism/node.rb#5195 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5776 def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # - # source://yarp//lib/prism/node.rb#5132 + # source://prism//lib/prism/node.rb#5712 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of @@ -8475,8 +11349,20 @@ class Prism::EnsureNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#5222 + # source://prism//lib/prism/node.rb#5803 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#5813 + def type; end + end end # Represents the use of the literal `false` keyword. @@ -8484,52 +11370,64 @@ end # false # ^^^^^ # -# source://yarp//lib/prism/node.rb#5231 +# source://prism//lib/prism/node.rb#5822 class Prism::FalseNode < ::Prism::Node # def initialize: (location: Location) -> void # # @return [FalseNode] a new instance of FalseNode # - # source://yarp//lib/prism/node.rb#5233 + # source://prism//lib/prism/node.rb#5824 + sig { params(location: Prism::Location).void } def initialize(location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#5238 + # source://prism//lib/prism/node.rb#5829 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5243 + # source://prism//lib/prism/node.rb#5834 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#5253 + # source://prism//lib/prism/node.rb#5844 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#5248 + # source://prism//lib/prism/node.rb#5839 def compact_child_nodes; end # def copy: (**params) -> FalseNode # - # source://yarp//lib/prism/node.rb#5258 + # source://prism//lib/prism/node.rb#5849 + sig { params(params: T.untyped).returns(Prism::FalseNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5243 + # source://prism//lib/prism/node.rb#5834 + 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://yarp//lib/prism/node.rb#5268 + # source://prism//lib/prism/node.rb#5859 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#5272 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5864 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -8547,107 +11445,149 @@ class Prism::FalseNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#5291 + # source://prism//lib/prism/node.rb#5883 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#5893 + 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://yarp//lib/prism/node.rb#5306 +# source://prism//lib/prism/node.rb#5908 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://yarp//lib/prism/node.rb#5326 + # source://prism//lib/prism/node.rb#5928 + 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://yarp//lib/prism/node.rb#5337 + # source://prism//lib/prism/node.rb#5939 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5342 + # source://prism//lib/prism/node.rb#5944 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://yarp//lib/prism/node.rb#5388 + # source://prism//lib/prism/node.rb#5990 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://yarp//lib/prism/node.rb#5323 + # source://prism//lib/prism/node.rb#5925 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#5357 + # source://prism//lib/prism/node.rb#5959 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#5347 + # source://prism//lib/prism/node.rb#5949 def compact_child_nodes; end # attr_reader constant: Node? # - # source://yarp//lib/prism/node.rb#5308 + # source://prism//lib/prism/node.rb#5910 + sig { returns(T.nilable(Prism::Node)) } def constant; end # def copy: (**params) -> FindPatternNode # - # source://yarp//lib/prism/node.rb#5362 + # source://prism//lib/prism/node.rb#5964 + sig { params(params: T.untyped).returns(Prism::FindPatternNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5342 + # source://prism//lib/prism/node.rb#5944 + 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://yarp//lib/prism/node.rb#5378 + # source://prism//lib/prism/node.rb#5980 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#5392 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#5995 def inspect(inspector = T.unsafe(nil)); end # attr_reader left: Node # - # source://yarp//lib/prism/node.rb#5311 + # source://prism//lib/prism/node.rb#5913 + sig { returns(Prism::Node) } def left; end # def opening: () -> String? # - # source://yarp//lib/prism/node.rb#5383 + # source://prism//lib/prism/node.rb#5985 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://yarp//lib/prism/node.rb#5320 + # source://prism//lib/prism/node.rb#5922 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader requireds: Array[Node] # - # source://yarp//lib/prism/node.rb#5314 + # source://prism//lib/prism/node.rb#5916 + sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader right: Node # - # source://yarp//lib/prism/node.rb#5317 + # source://prism//lib/prism/node.rb#5919 + sig { returns(Prism::Node) } def right; end # Sometimes you want to check an instance of a node against a list of @@ -8665,8 +11605,20 @@ class Prism::FindPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#5424 + # source://prism//lib/prism/node.rb#6027 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#6037 + def type; end + end end # Represents the use of the `..` or `...` operators to create flip flops. @@ -8674,79 +11626,104 @@ end # baz if foo .. bar # ^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#5433 +# source://prism//lib/prism/node.rb#6046 class Prism::FlipFlopNode < ::Prism::Node # def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void # # @return [FlipFlopNode] a new instance of FlipFlopNode # - # source://yarp//lib/prism/node.rb#5447 + # source://prism//lib/prism/node.rb#6060 + sig do + params( + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + flags: Integer, + location: Prism::Location + ).void + end def initialize(left, right, operator_loc, flags, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#5456 + # source://prism//lib/prism/node.rb#6069 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5461 + # source://prism//lib/prism/node.rb#6074 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#5474 + # source://prism//lib/prism/node.rb#6087 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#5466 + # source://prism//lib/prism/node.rb#6079 def compact_child_nodes; end # def copy: (**params) -> FlipFlopNode # - # source://yarp//lib/prism/node.rb#5479 + # source://prism//lib/prism/node.rb#6092 + sig { params(params: T.untyped).returns(Prism::FlipFlopNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5461 + # source://prism//lib/prism/node.rb#6074 + 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://yarp//lib/prism/node.rb#5493 + # source://prism//lib/prism/node.rb#6106 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#5503 + # source://prism//lib/prism/node.rb#6116 + sig { returns(T::Boolean) } def exclude_end?; end - # source://yarp//lib/prism/node.rb#5507 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6121 def inspect(inspector = T.unsafe(nil)); end # attr_reader left: Node? # - # source://yarp//lib/prism/node.rb#5435 + # source://prism//lib/prism/node.rb#6048 + sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#5498 + # source://prism//lib/prism/node.rb#6111 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#5441 + # source://prism//lib/prism/node.rb#6054 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Node? # - # source://yarp//lib/prism/node.rb#5438 + # source://prism//lib/prism/node.rb#6051 + sig { returns(T.nilable(Prism::Node)) } def right; end # Sometimes you want to check an instance of a node against a list of @@ -8764,15 +11741,28 @@ class Prism::FlipFlopNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#5541 + # source://prism//lib/prism/node.rb#6155 def type; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#5444 + # source://prism//lib/prism/node.rb#6057 + 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#6165 + def type; end + end end # Represents a floating point number literal. @@ -8780,52 +11770,64 @@ end # 1.0 # ^^^ # -# source://yarp//lib/prism/node.rb#5550 +# source://prism//lib/prism/node.rb#6174 class Prism::FloatNode < ::Prism::Node # def initialize: (location: Location) -> void # # @return [FloatNode] a new instance of FloatNode # - # source://yarp//lib/prism/node.rb#5552 + # source://prism//lib/prism/node.rb#6176 + sig { params(location: Prism::Location).void } def initialize(location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#5557 + # source://prism//lib/prism/node.rb#6181 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5562 + # source://prism//lib/prism/node.rb#6186 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#5572 + # source://prism//lib/prism/node.rb#6196 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#5567 + # source://prism//lib/prism/node.rb#6191 def compact_child_nodes; end # def copy: (**params) -> FloatNode # - # source://yarp//lib/prism/node.rb#5577 + # source://prism//lib/prism/node.rb#6201 + sig { params(params: T.untyped).returns(Prism::FloatNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5562 + # source://prism//lib/prism/node.rb#6186 + 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://yarp//lib/prism/node.rb#5587 + # source://prism//lib/prism/node.rb#6211 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#5591 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6216 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -8843,13 +11845,25 @@ class Prism::FloatNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#5610 + # source://prism//lib/prism/node.rb#6235 def type; end # Returns the value of the node as a Ruby Float. # - # source://yarp//lib/prism/node_ext.rb#8 + # source://prism//lib/prism/node_ext.rb#21 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#6245 + def type; end + end end # Represents the use of the `for` keyword. @@ -8857,107 +11871,141 @@ end # for i in a end # ^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#5619 +# source://prism//lib/prism/node.rb#6254 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://yarp//lib/prism/node.rb#5642 + # source://prism//lib/prism/node.rb#6277 + 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://yarp//lib/prism/node.rb#5654 + # source://prism//lib/prism/node.rb#6289 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5659 + # source://prism//lib/prism/node.rb#6294 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # attr_reader collection: Node # - # source://yarp//lib/prism/node.rb#5624 + # source://prism//lib/prism/node.rb#6259 + sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#5673 + # source://prism//lib/prism/node.rb#6308 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#5664 + # source://prism//lib/prism/node.rb#6299 def compact_child_nodes; end # def copy: (**params) -> ForNode # - # source://yarp//lib/prism/node.rb#5678 + # source://prism//lib/prism/node.rb#6313 + sig { params(params: T.untyped).returns(Prism::ForNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5659 + # source://prism//lib/prism/node.rb#6294 + 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://yarp//lib/prism/node.rb#5695 + # source://prism//lib/prism/node.rb#6330 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#5710 + # source://prism//lib/prism/node.rb#6345 + sig { returns(T.nilable(String)) } def do_keyword; end # attr_reader do_keyword_loc: Location? # - # source://yarp//lib/prism/node.rb#5636 + # source://prism//lib/prism/node.rb#6271 + sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def end_keyword: () -> String # - # source://yarp//lib/prism/node.rb#5715 + # source://prism//lib/prism/node.rb#6350 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#5639 + # source://prism//lib/prism/node.rb#6274 + sig { returns(Prism::Location) } def end_keyword_loc; end # def for_keyword: () -> String # - # source://yarp//lib/prism/node.rb#5700 + # source://prism//lib/prism/node.rb#6335 + sig { returns(String) } def for_keyword; end # attr_reader for_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#5630 + # source://prism//lib/prism/node.rb#6265 + sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # - # source://yarp//lib/prism/node.rb#5705 + # source://prism//lib/prism/node.rb#6340 + sig { returns(String) } def in_keyword; end # attr_reader in_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#5633 + # source://prism//lib/prism/node.rb#6268 + sig { returns(Prism::Location) } def in_keyword_loc; end # attr_reader index: Node # - # source://yarp//lib/prism/node.rb#5621 + # source://prism//lib/prism/node.rb#6256 + sig { returns(Prism::Node) } def index; end - # source://yarp//lib/prism/node.rb#5719 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6355 def inspect(inspector = T.unsafe(nil)); end # attr_reader statements: StatementsNode? # - # source://yarp//lib/prism/node.rb#5627 + # source://prism//lib/prism/node.rb#6262 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of @@ -8975,63 +12023,87 @@ class Prism::ForNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#5752 + # source://prism//lib/prism/node.rb#6388 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#6398 + def type; end + end end # Represents forwarding all arguments to this method to another method. # # def foo(...) # bar(...) -# ^^^^^^^^ +# ^^^ # end # -# source://yarp//lib/prism/node.rb#5763 +# source://prism//lib/prism/node.rb#6409 class Prism::ForwardingArgumentsNode < ::Prism::Node # def initialize: (location: Location) -> void # # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode # - # source://yarp//lib/prism/node.rb#5765 + # source://prism//lib/prism/node.rb#6411 + sig { params(location: Prism::Location).void } def initialize(location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#5770 + # source://prism//lib/prism/node.rb#6416 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5775 + # source://prism//lib/prism/node.rb#6421 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#5785 + # source://prism//lib/prism/node.rb#6431 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#5780 + # source://prism//lib/prism/node.rb#6426 def compact_child_nodes; end # def copy: (**params) -> ForwardingArgumentsNode # - # source://yarp//lib/prism/node.rb#5790 + # source://prism//lib/prism/node.rb#6436 + sig { params(params: T.untyped).returns(Prism::ForwardingArgumentsNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5775 + # source://prism//lib/prism/node.rb#6421 + 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://yarp//lib/prism/node.rb#5800 + # source://prism//lib/prism/node.rb#6446 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#5804 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6451 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -9049,8 +12121,20 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#5823 + # source://prism//lib/prism/node.rb#6470 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#6480 + def type; end + end end # Represents the use of the forwarding parameter in a method, block, or lambda declaration. @@ -9059,54 +12143,431 @@ end # ^^^ # end # -# source://yarp//lib/prism/node.rb#5833 -class Prism::ForwardingParameterNode < ::Prism::Node - # def initialize: (location: Location) -> void +# source://prism//lib/prism/node.rb#6490 +class Prism::ForwardingParameterNode < ::Prism::Node + # def initialize: (location: Location) -> void + # + # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#6492 + sig { params(location: Prism::Location).void } + def initialize(location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#6497 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6502 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6512 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6507 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingParameterNode + # + # source://prism//lib/prism/node.rb#6517 + 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#6502 + 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#6527 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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#6532 + 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#6551 + 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#6561 + def type; end + end +end + +# Represents the use of the `super` keyword without parentheses or arguments. +# +# super +# ^^^^^ +# +# source://prism//lib/prism/node.rb#6570 +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#6575 + 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#6581 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader block: BlockNode? + # + # source://prism//lib/prism/node.rb#6572 + sig { returns(T.nilable(Prism::BlockNode)) } + def block; end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#6586 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#6598 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#6591 + def compact_child_nodes; end + + # def copy: (**params) -> ForwardingSuperNode + # + # source://prism//lib/prism/node.rb#6603 + 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#6586 + 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#6614 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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#6619 + 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#6644 + 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#6654 + 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#6663 +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#6677 + 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#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) -> GlobalVariableAndWriteNode + # + # source://prism//lib/prism/node.rb#6706 + 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#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#6720 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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#6730 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6665 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6668 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6725 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6671 + 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#6754 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#6674 + 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#6764 + 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#6773 +class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void # - # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode + # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode # - # source://yarp//lib/prism/node.rb#5835 - def initialize(location); end + # source://prism//lib/prism/node.rb#6790 + 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://yarp//lib/prism/node.rb#5840 + # source://prism//lib/prism/node.rb#6800 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5845 + # source://prism//lib/prism/node.rb#6805 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#5855 + # source://prism//lib/prism/node.rb#6815 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#5850 + # source://prism//lib/prism/node.rb#6810 def compact_child_nodes; end - # def copy: (**params) -> ForwardingParameterNode + # def copy: (**params) -> GlobalVariableOperatorWriteNode # - # source://yarp//lib/prism/node.rb#5860 + # source://prism//lib/prism/node.rb#6820 + sig { params(params: T.untyped).returns(Prism::GlobalVariableOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5845 + # source://prism//lib/prism/node.rb#6805 + 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://yarp//lib/prism/node.rb#5870 + # source://prism//lib/prism/node.rb#6835 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#5874 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6840 def inspect(inspector = T.unsafe(nil)); end + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6775 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6778 + sig { returns(Prism::Location) } + def name_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#6787 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6781 + 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 @@ -9122,68 +12583,125 @@ class Prism::ForwardingParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#5893 + # source://prism//lib/prism/node.rb#6865 def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#6784 + 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#6875 + def type; end + end end -# Represents the use of the `super` keyword without parentheses or arguments. +# Represents the use of the `||=` operator for assignment to a global variable. # -# super -# ^^^^^ +# $target ||= value +# ^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#5902 -class Prism::ForwardingSuperNode < ::Prism::Node - # def initialize: (block: BlockNode?, location: Location) -> void +# source://prism//lib/prism/node.rb#6884 +class Prism::GlobalVariableOrWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void # - # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode + # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode # - # source://yarp//lib/prism/node.rb#5907 - def initialize(block, location); end + # source://prism//lib/prism/node.rb#6898 + 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://yarp//lib/prism/node.rb#5913 + # source://prism//lib/prism/node.rb#6907 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end - # attr_reader block: BlockNode? - # - # source://yarp//lib/prism/node.rb#5904 - def block; end - # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5918 + # source://prism//lib/prism/node.rb#6912 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#5930 + # source://prism//lib/prism/node.rb#6922 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#5923 + # source://prism//lib/prism/node.rb#6917 def compact_child_nodes; end - # def copy: (**params) -> ForwardingSuperNode + # def copy: (**params) -> GlobalVariableOrWriteNode # - # source://yarp//lib/prism/node.rb#5935 + # source://prism//lib/prism/node.rb#6927 + sig { params(params: T.untyped).returns(Prism::GlobalVariableOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#5918 + # source://prism//lib/prism/node.rb#6912 + 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://yarp//lib/prism/node.rb#5946 + # source://prism//lib/prism/node.rb#6941 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#5950 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#6951 def inspect(inspector = T.unsafe(nil)); end + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#6886 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#6889 + sig { returns(Prism::Location) } + def name_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#6946 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#6892 + 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 @@ -9199,83 +12717,99 @@ class Prism::ForwardingSuperNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#5975 + # source://prism//lib/prism/node.rb#6975 def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#6895 + 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#6985 + def type; end + end end -# Represents the use of the `&&=` operator for assignment to a global variable. +# Represents referencing a global variable. # -# $target &&= value -# ^^^^^^^^^^^^^^^^^ +# $foo +# ^^^^ # -# source://yarp//lib/prism/node.rb#5984 -class Prism::GlobalVariableAndWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void +# source://prism//lib/prism/node.rb#6994 +class Prism::GlobalVariableReadNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void # - # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode + # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode # - # source://yarp//lib/prism/node.rb#5998 - def initialize(name, name_loc, operator_loc, value, location); end + # source://prism//lib/prism/node.rb#6999 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#6007 + # source://prism//lib/prism/node.rb#7005 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6012 + # source://prism//lib/prism/node.rb#7010 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#6022 + # source://prism//lib/prism/node.rb#7020 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#6017 + # source://prism//lib/prism/node.rb#7015 def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableAndWriteNode + # def copy: (**params) -> GlobalVariableReadNode # - # source://yarp//lib/prism/node.rb#6027 + # source://prism//lib/prism/node.rb#7025 + sig { params(params: T.untyped).returns(Prism::GlobalVariableReadNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6012 + # source://prism//lib/prism/node.rb#7010 + 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://yarp//lib/prism/node.rb#6041 + # source://prism//lib/prism/node.rb#7036 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#6050 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7041 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#5986 + # source://prism//lib/prism/node.rb#6996 + sig { returns(Symbol) } def name; end - # attr_reader name_loc: Location - # - # source://yarp//lib/prism/node.rb#5989 - def name_loc; end - - # def operator: () -> String - # - # source://yarp//lib/prism/node.rb#6046 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/prism/node.rb#5992 - 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 @@ -9291,88 +12825,93 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#6074 + # source://prism//lib/prism/node.rb#7061 def type; end - # attr_reader value: Node - # - # source://yarp//lib/prism/node.rb#5995 - 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#7071 + def type; end + end end -# Represents assigning to a global variable using an operator that isn't `=`. +# Represents writing to a global variable in a context that doesn't have an explicit value. # -# $target += value -# ^^^^^^^^^^^^^^^^ +# $foo, $bar = baz +# ^^^^ ^^^^ # -# source://yarp//lib/prism/node.rb#6083 -class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, operator: Symbol, location: Location) -> void +# source://prism//lib/prism/node.rb#7080 +class Prism::GlobalVariableTargetNode < ::Prism::Node + # def initialize: (name: Symbol, location: Location) -> void # - # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode + # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode # - # source://yarp//lib/prism/node.rb#6100 - def initialize(name, name_loc, operator_loc, value, operator, location); end + # source://prism//lib/prism/node.rb#7085 + sig { params(name: Symbol, location: Prism::Location).void } + def initialize(name, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#6110 + # source://prism//lib/prism/node.rb#7091 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6115 + # source://prism//lib/prism/node.rb#7096 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#6125 + # source://prism//lib/prism/node.rb#7106 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#6120 + # source://prism//lib/prism/node.rb#7101 def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableOperatorWriteNode + # def copy: (**params) -> GlobalVariableTargetNode # - # source://yarp//lib/prism/node.rb#6130 + # source://prism//lib/prism/node.rb#7111 + sig { params(params: T.untyped).returns(Prism::GlobalVariableTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6115 + # source://prism//lib/prism/node.rb#7096 + 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://yarp//lib/prism/node.rb#6145 + # source://prism//lib/prism/node.rb#7122 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#6149 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7127 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#6085 + # source://prism//lib/prism/node.rb#7082 + sig { returns(Symbol) } def name; end - # attr_reader name_loc: Location - # - # source://yarp//lib/prism/node.rb#6088 - def name_loc; end - - # attr_reader operator: Symbol - # - # source://yarp//lib/prism/node.rb#6097 - def operator; end - - # attr_reader operator_loc: Location - # - # source://yarp//lib/prism/node.rb#6091 - 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 @@ -9388,86 +12927,117 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#6174 + # source://prism//lib/prism/node.rb#7147 def type; end - # attr_reader value: Node - # - # source://yarp//lib/prism/node.rb#6094 - 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#7157 + def type; end + end end -# Represents the use of the `||=` operator for assignment to a global variable. +# Represents writing to a global variable. # -# $target ||= value -# ^^^^^^^^^^^^^^^^^ +# $foo = 1 +# ^^^^^^^^ # -# source://yarp//lib/prism/node.rb#6183 -class Prism::GlobalVariableOrWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, operator_loc: Location, value: Node, location: Location) -> void +# source://prism//lib/prism/node.rb#7166 +class Prism::GlobalVariableWriteNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void # - # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode + # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode # - # source://yarp//lib/prism/node.rb#6197 - def initialize(name, name_loc, operator_loc, value, location); end + # source://prism//lib/prism/node.rb#7180 + 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://yarp//lib/prism/node.rb#6206 + # source://prism//lib/prism/node.rb#7189 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6211 + # source://prism//lib/prism/node.rb#7194 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#6221 + # source://prism//lib/prism/node.rb#7204 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#6216 + # source://prism//lib/prism/node.rb#7199 def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableOrWriteNode + # def copy: (**params) -> GlobalVariableWriteNode # - # source://yarp//lib/prism/node.rb#6226 + # source://prism//lib/prism/node.rb#7209 + sig { params(params: T.untyped).returns(Prism::GlobalVariableWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6211 + # source://prism//lib/prism/node.rb#7194 + 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://yarp//lib/prism/node.rb#6240 + # source://prism//lib/prism/node.rb#7223 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#6249 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7233 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#6185 + # source://prism//lib/prism/node.rb#7168 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#6188 + # source://prism//lib/prism/node.rb#7171 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#6245 + # source://prism//lib/prism/node.rb#7228 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#6191 + # source://prism//lib/prism/node.rb#7177 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -9485,72 +13055,129 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#6273 + # source://prism//lib/prism/node.rb#7257 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#6194 + # source://prism//lib/prism/node.rb#7174 + 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#7267 + def type; end + end end -# Represents referencing a global variable. +# Represents a hash literal. # -# $foo -# ^^^^ +# { a => b } +# ^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#6282 -class Prism::GlobalVariableReadNode < ::Prism::Node - # def initialize: (name: Symbol, location: Location) -> void +# source://prism//lib/prism/node.rb#7276 +class Prism::HashNode < ::Prism::Node + # def initialize: (opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location) -> void # - # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode + # @return [HashNode] a new instance of HashNode # - # source://yarp//lib/prism/node.rb#6287 - def initialize(name, location); end + # source://prism//lib/prism/node.rb#7287 + 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://yarp//lib/prism/node.rb#6293 + # source://prism//lib/prism/node.rb#7295 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6298 + # source://prism//lib/prism/node.rb#7300 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#7338 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#7284 + sig { returns(Prism::Location) } + def closing_loc; end + # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#6308 + # source://prism//lib/prism/node.rb#7310 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#6303 + # source://prism//lib/prism/node.rb#7305 def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableReadNode + # def copy: (**params) -> HashNode # - # source://yarp//lib/prism/node.rb#6313 + # source://prism//lib/prism/node.rb#7315 + sig { params(params: T.untyped).returns(Prism::HashNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6298 + # source://prism//lib/prism/node.rb#7300 + 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://yarp//lib/prism/node.rb#6324 + # source://prism//lib/prism/node.rb#7328 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#6328 + # attr_reader elements: Array[Node] + # + # source://prism//lib/prism/node.rb#7281 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7343 def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol + # def opening: () -> String # - # source://yarp//lib/prism/node.rb#6284 - def name; end + # source://prism//lib/prism/node.rb#7333 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#7278 + 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 @@ -9567,67 +13194,140 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#6348 + # source://prism//lib/prism/node.rb#7365 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#7375 + def type; end + end end -# Represents writing to a global variable in a context that doesn't have an explicit value. +# Represents a hash pattern in pattern matching. # -# $foo, $bar = baz -# ^^^^ ^^^^ +# foo => { a: 1, b: 2 } +# ^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#6357 -class Prism::GlobalVariableTargetNode < ::Prism::Node - # def initialize: (name: Symbol, location: Location) -> void +# foo => { a: 1, b: 2, **c } +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7387 +class Prism::HashPatternNode < ::Prism::Node + # def initialize: (constant: Node?, elements: Array[Node], rest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location) -> void # - # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode + # @return [HashPatternNode] a new instance of HashPatternNode # - # source://yarp//lib/prism/node.rb#6362 - def initialize(name, location); end + # source://prism//lib/prism/node.rb#7404 + 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://yarp//lib/prism/node.rb#6368 + # source://prism//lib/prism/node.rb#7414 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6373 + # source://prism//lib/prism/node.rb#7419 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end + # def closing: () -> String? + # + # source://prism//lib/prism/node.rb#7463 + sig { returns(T.nilable(String)) } + def closing; end + + # attr_reader closing_loc: Location? + # + # source://prism//lib/prism/node.rb#7401 + sig { returns(T.nilable(Prism::Location)) } + def closing_loc; end + # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#6383 + # source://prism//lib/prism/node.rb#7433 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#6378 - def compact_child_nodes; end + # source://prism//lib/prism/node.rb#7424 + def compact_child_nodes; end + + # attr_reader constant: Node? + # + # source://prism//lib/prism/node.rb#7389 + sig { returns(T.nilable(Prism::Node)) } + def constant; end - # def copy: (**params) -> GlobalVariableTargetNode + # def copy: (**params) -> HashPatternNode # - # source://yarp//lib/prism/node.rb#6388 + # source://prism//lib/prism/node.rb#7438 + sig { params(params: T.untyped).returns(Prism::HashPatternNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6373 + # source://prism//lib/prism/node.rb#7419 + 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://yarp//lib/prism/node.rb#6399 + # source://prism//lib/prism/node.rb#7453 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#6403 + # attr_reader elements: Array[Node] + # + # source://prism//lib/prism/node.rb#7392 + sig { returns(T::Array[Prism::Node]) } + def elements; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7468 def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol + # def opening: () -> String? # - # source://yarp//lib/prism/node.rb#6359 - def name; end + # source://prism//lib/prism/node.rb#7458 + sig { returns(T.nilable(String)) } + def opening; end + + # attr_reader opening_loc: Location? + # + # source://prism//lib/prism/node.rb#7398 + sig { returns(T.nilable(Prism::Location)) } + def opening_loc; end + + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#7395 + 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 @@ -9644,82 +13344,156 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#6423 + # source://prism//lib/prism/node.rb#7502 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#7512 + def type; end + end end -# Represents writing to a global variable. +# Represents the use of the `if` keyword, either in the block form or the modifier form. # -# $foo = 1 -# ^^^^^^^^ +# bar if foo +# ^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#6432 -class Prism::GlobalVariableWriteNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, value: Node, operator_loc: Location, location: Location) -> void +# if foo then bar end +# ^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7524 +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 [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode + # @return [IfNode] a new instance of IfNode # - # source://yarp//lib/prism/node.rb#6446 - def initialize(name, name_loc, value, operator_loc, location); end + # source://prism//lib/prism/node.rb#7544 + 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://yarp//lib/prism/node.rb#6455 + # source://prism//lib/prism/node.rb#7555 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6460 + # source://prism//lib/prism/node.rb#7564 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#6470 + # source://prism//lib/prism/node.rb#7578 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#6465 + # source://prism//lib/prism/node.rb#7569 def compact_child_nodes; end - # def copy: (**params) -> GlobalVariableWriteNode + # attr_reader consequent: Node? + # + # source://prism//lib/prism/node.rb#7538 + sig { returns(T.nilable(Prism::Node)) } + def consequent; end + + # def copy: (**params) -> IfNode # - # source://yarp//lib/prism/node.rb#6475 + # source://prism//lib/prism/node.rb#7583 + sig { params(params: T.untyped).returns(Prism::IfNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6460 + # source://prism//lib/prism/node.rb#7564 + 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://yarp//lib/prism/node.rb#6489 + # source://prism//lib/prism/node.rb#7599 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#6498 + # def end_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7614 + sig { returns(T.nilable(String)) } + def end_keyword; end + + # attr_reader end_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#7541 + sig { returns(T.nilable(Prism::Location)) } + def end_keyword_loc; end + + # def if_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#7604 + sig { returns(T.nilable(String)) } + def if_keyword; end + + # attr_reader if_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#7526 + sig { returns(T.nilable(Prism::Location)) } + def if_keyword_loc; end + + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#7619 def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol + # attr_reader predicate: Node # - # source://yarp//lib/prism/node.rb#6434 - def name; end + # source://prism//lib/prism/node.rb#7529 + sig { returns(Prism::Node) } + def predicate; end - # attr_reader name_loc: Location + # source://prism//lib/prism/node.rb#7559 + def set_newline_flag(newline_marked); end + + # attr_reader statements: StatementsNode? # - # source://yarp//lib/prism/node.rb#6437 - def name_loc; end + # source://prism//lib/prism/node.rb#7535 + sig { returns(T.nilable(Prism::StatementsNode)) } + def statements; end - # def operator: () -> String + # def then_keyword: () -> String? # - # source://yarp//lib/prism/node.rb#6494 - def operator; end + # source://prism//lib/prism/node.rb#7609 + sig { returns(T.nilable(String)) } + def then_keyword; end - # attr_reader operator_loc: Location + # attr_reader then_keyword_loc: Location? # - # source://yarp//lib/prism/node.rb#6443 - def operator_loc; end + # source://prism//lib/prism/node.rb#7532 + 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 @@ -9736,92 +13510,92 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#6522 + # source://prism//lib/prism/node.rb#7655 def type; end - # attr_reader value: Node - # - # source://yarp//lib/prism/node.rb#6440 - 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#7665 + def type; end + end end -# Represents a hash literal. +# Represents an imaginary number literal. # -# { a => b } -# ^^^^^^^^^^ +# 1.0i +# ^^^^ # -# source://yarp//lib/prism/node.rb#6531 -class Prism::HashNode < ::Prism::Node - # def initialize: (opening_loc: Location, elements: Array[Node], closing_loc: Location, location: Location) -> void +# source://prism//lib/prism/node.rb#7674 +class Prism::ImaginaryNode < ::Prism::Node + # def initialize: (numeric: Node, location: Location) -> void # - # @return [HashNode] a new instance of HashNode + # @return [ImaginaryNode] a new instance of ImaginaryNode # - # source://yarp//lib/prism/node.rb#6542 - def initialize(opening_loc, elements, closing_loc, location); end + # source://prism//lib/prism/node.rb#7679 + sig { params(numeric: Prism::Node, location: Prism::Location).void } + def initialize(numeric, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#6550 + # source://prism//lib/prism/node.rb#7685 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6555 + # source://prism//lib/prism/node.rb#7690 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end - # def closing: () -> String - # - # source://yarp//lib/prism/node.rb#6593 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/prism/node.rb#6539 - def closing_loc; end - # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#6565 + # source://prism//lib/prism/node.rb#7700 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#6560 + # source://prism//lib/prism/node.rb#7695 def compact_child_nodes; end - # def copy: (**params) -> HashNode + # def copy: (**params) -> ImaginaryNode # - # source://yarp//lib/prism/node.rb#6570 + # source://prism//lib/prism/node.rb#7705 + sig { params(params: T.untyped).returns(Prism::ImaginaryNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6555 + # source://prism//lib/prism/node.rb#7690 + 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://yarp//lib/prism/node.rb#6583 + # source://prism//lib/prism/node.rb#7716 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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] + # def inspect(inspector: NodeInspector) -> String # - # source://yarp//lib/prism/node.rb#6536 - def elements; end - - # source://yarp//lib/prism/node.rb#6597 + # source://prism//lib/prism/node.rb#7721 def inspect(inspector = T.unsafe(nil)); end - # def opening: () -> String - # - # source://yarp//lib/prism/node.rb#6588 - def opening; end - - # attr_reader opening_loc: Location + # attr_reader numeric: Node # - # source://yarp//lib/prism/node.rb#6533 - def opening_loc; end + # source://prism//lib/prism/node.rb#7676 + 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 @@ -9838,100 +13612,95 @@ class Prism::HashNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#6619 + # source://prism//lib/prism/node.rb#7742 def type; end + + # Returns the value of the node as a Ruby Complex. + # + # source://prism//lib/prism/node_ext.rb#28 + 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#7752 + def type; end + end end -# Represents a hash pattern in pattern matching. +# Represents a node that is implicitly being added to the tree but doesn't +# correspond directly to a node in the source. # -# foo => { a: 1, b: 2 } -# ^^^^^^^^^^^^^^ +# { foo: } +# ^^^^ # -# foo => { a: 1, b: 2, **c } -# ^^^^^^^^^^^^^^^^^^^ +# { Foo: } +# ^^^^ # -# source://yarp//lib/prism/node.rb#6631 -class Prism::HashPatternNode < ::Prism::Node - # def initialize: (constant: Node?, assocs: Array[Node], kwrest: Node?, opening_loc: Location?, closing_loc: Location?, location: Location) -> void +# source://prism//lib/prism/node.rb#7765 +class Prism::ImplicitNode < ::Prism::Node + # def initialize: (value: Node, location: Location) -> void # - # @return [HashPatternNode] a new instance of HashPatternNode + # @return [ImplicitNode] a new instance of ImplicitNode # - # source://yarp//lib/prism/node.rb#6648 - def initialize(constant, assocs, kwrest, opening_loc, closing_loc, location); end + # source://prism//lib/prism/node.rb#7770 + sig { params(value: Prism::Node, location: Prism::Location).void } + def initialize(value, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#6658 + # source://prism//lib/prism/node.rb#7776 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end - # attr_reader assocs: Array[Node] - # - # source://yarp//lib/prism/node.rb#6636 - def assocs; end - # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6663 + # source://prism//lib/prism/node.rb#7781 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end - # def closing: () -> String? - # - # source://yarp//lib/prism/node.rb#6707 - def closing; end - - # attr_reader closing_loc: Location? - # - # source://yarp//lib/prism/node.rb#6645 - def closing_loc; end - # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#6677 + # source://prism//lib/prism/node.rb#7791 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#6668 + # source://prism//lib/prism/node.rb#7786 def compact_child_nodes; end - # attr_reader constant: Node? - # - # source://yarp//lib/prism/node.rb#6633 - def constant; end - - # def copy: (**params) -> HashPatternNode + # def copy: (**params) -> ImplicitNode # - # source://yarp//lib/prism/node.rb#6682 + # source://prism//lib/prism/node.rb#7796 + sig { params(params: T.untyped).returns(Prism::ImplicitNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6663 + # source://prism//lib/prism/node.rb#7781 + 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://yarp//lib/prism/node.rb#6697 + # source://prism//lib/prism/node.rb#7807 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#6711 - def inspect(inspector = T.unsafe(nil)); end - - # attr_reader kwrest: Node? - # - # source://yarp//lib/prism/node.rb#6639 - def kwrest; end - - # def opening: () -> String? - # - # source://yarp//lib/prism/node.rb#6702 - def opening; end - - # attr_reader opening_loc: Location? + # def inspect(inspector: NodeInspector) -> String # - # source://yarp//lib/prism/node.rb#6642 - def opening_loc; end + # source://prism//lib/prism/node.rb#7812 + 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 @@ -9948,104 +13717,137 @@ class Prism::HashPatternNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#6745 + # source://prism//lib/prism/node.rb#7833 def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#7767 + 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#7843 + def type; end + end end -# Represents the use of the `if` keyword, either in the block form or the modifier form. -# -# bar if foo -# ^^^^^^^^^^ +# Represents the use of the `in` keyword in a case statement. # -# if foo then bar end -# ^^^^^^^^^^^^^^^^^^^ +# case a; in b then c end +# ^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#6757 -class Prism::IfNode < ::Prism::Node - # def initialize: (if_keyword_loc: Location?, predicate: Node, statements: StatementsNode?, consequent: Node?, end_keyword_loc: Location?, location: Location) -> void +# source://prism//lib/prism/node.rb#7852 +class Prism::InNode < ::Prism::Node + # def initialize: (pattern: Node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location) -> void # - # @return [IfNode] a new instance of IfNode + # @return [InNode] a new instance of InNode # - # source://yarp//lib/prism/node.rb#6774 - def initialize(if_keyword_loc, predicate, statements, consequent, end_keyword_loc, location); end + # source://prism//lib/prism/node.rb#7866 + 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://yarp//lib/prism/node.rb#6784 + # source://prism//lib/prism/node.rb#7875 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6793 + # source://prism//lib/prism/node.rb#7880 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#6807 + # source://prism//lib/prism/node.rb#7893 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#6798 + # source://prism//lib/prism/node.rb#7885 def compact_child_nodes; end - # attr_reader consequent: Node? - # - # source://yarp//lib/prism/node.rb#6768 - def consequent; end - - # def copy: (**params) -> IfNode + # def copy: (**params) -> InNode # - # source://yarp//lib/prism/node.rb#6812 + # source://prism//lib/prism/node.rb#7898 + sig { params(params: T.untyped).returns(Prism::InNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6793 + # source://prism//lib/prism/node.rb#7880 + 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://yarp//lib/prism/node.rb#6827 + # source://prism//lib/prism/node.rb#7912 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#6837 - def end_keyword; end - - # attr_reader end_keyword_loc: Location? + # def in: () -> String # - # source://yarp//lib/prism/node.rb#6771 - def end_keyword_loc; end + # source://prism//lib/prism/node.rb#7917 + sig { returns(String) } + def in; end - # def if_keyword: () -> String? + # attr_reader in_loc: Location # - # source://yarp//lib/prism/node.rb#6832 - def if_keyword; end + # source://prism//lib/prism/node.rb#7860 + sig { returns(Prism::Location) } + def in_loc; end - # attr_reader if_keyword_loc: Location? + # def inspect(inspector: NodeInspector) -> String # - # source://yarp//lib/prism/node.rb#6759 - def if_keyword_loc; end - - # source://yarp//lib/prism/node.rb#6841 + # source://prism//lib/prism/node.rb#7927 def inspect(inspector = T.unsafe(nil)); end - # attr_reader predicate: Node + # attr_reader pattern: Node # - # source://yarp//lib/prism/node.rb#6762 - def predicate; end - - # source://yarp//lib/prism/node.rb#6788 - def set_newline_flag(newline_marked); end + # source://prism//lib/prism/node.rb#7854 + sig { returns(Prism::Node) } + def pattern; end # attr_reader statements: StatementsNode? # - # source://yarp//lib/prism/node.rb#6765 + # source://prism//lib/prism/node.rb#7857 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end + # def then: () -> String? + # + # source://prism//lib/prism/node.rb#7922 + sig { returns(T.nilable(String)) } + def then; end + + # attr_reader then_loc: Location? + # + # source://prism//lib/prism/node.rb#7863 + 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 @@ -10061,67 +13863,173 @@ class Prism::IfNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#6876 + # source://prism//lib/prism/node.rb#7956 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#7966 + def type; end + end end -# Represents an imaginary number literal. -# -# 1.0i -# ^^^^ -# -# source://yarp//lib/prism/node.rb#6885 -class Prism::ImaginaryNode < ::Prism::Node - # def initialize: (numeric: Node, location: Location) -> void +# Represents the use of the `&&=` operator on a call to the `[]` method. +# +# foo.bar[baz] &&= value +# ^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#7975 +class Prism::IndexAndWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode + # + # source://prism//lib/prism/node.rb#8004 + sig do + params( + 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), + flags: Integer, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location); end + + # def accept: (visitor: Visitor) -> void + # + # source://prism//lib/prism/node.rb#8018 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#7986 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: Node? # - # @return [ImaginaryNode] a new instance of ImaginaryNode + # source://prism//lib/prism/node.rb#7992 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? # - # source://yarp//lib/prism/node.rb#6890 - def initialize(numeric, location); end + # source://prism//lib/prism/node.rb#8067 + sig { returns(T.nilable(String)) } + def call_operator; end - # def accept: (visitor: Visitor) -> void + # attr_reader call_operator_loc: Location? # - # source://yarp//lib/prism/node.rb#6896 - def accept(visitor); end + # source://prism//lib/prism/node.rb#7980 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6901 + # source://prism//lib/prism/node.rb#8023 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8077 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#7989 + sig { returns(Prism::Location) } + def closing_loc; end + # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#6911 + # source://prism//lib/prism/node.rb#8038 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#6906 + # source://prism//lib/prism/node.rb#8028 def compact_child_nodes; end - # def copy: (**params) -> ImaginaryNode + # def copy: (**params) -> IndexAndWriteNode # - # source://yarp//lib/prism/node.rb#6916 + # source://prism//lib/prism/node.rb#8043 + sig { params(params: T.untyped).returns(Prism::IndexAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6901 + # source://prism//lib/prism/node.rb#8023 + 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://yarp//lib/prism/node.rb#6927 + # source://prism//lib/prism/node.rb#8062 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#6931 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8097 def inspect(inspector = T.unsafe(nil)); end - # attr_reader numeric: Node + # def opening: () -> String # - # source://yarp//lib/prism/node.rb#6887 - def numeric; end + # source://prism//lib/prism/node.rb#8072 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#7983 + sig { returns(Prism::Location) } + def opening_loc; end + + # def operator: () -> String + # + # source://prism//lib/prism/node.rb#8092 + sig { returns(String) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#7998 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#7977 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8082 + 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 @@ -10138,72 +14046,197 @@ class Prism::ImaginaryNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#6952 + # source://prism//lib/prism/node.rb#8142 def type; end - # Returns the value of the node as a Ruby Complex. + # attr_reader value: Node # - # source://yarp//lib/prism/node_ext.rb#15 + # source://prism//lib/prism/node.rb#8001 + sig { returns(Prism::Node) } def value; 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://yarp//lib/prism/node.rb#6965 -class Prism::ImplicitNode < ::Prism::Node - # def initialize: (value: Node, location: Location) -> void + # def variable_call?: () -> bool # - # @return [ImplicitNode] a new instance of ImplicitNode + # @return [Boolean] # - # source://yarp//lib/prism/node.rb#6970 - def initialize(value, location); end + # source://prism//lib/prism/node.rb#8087 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#7995 + 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#8152 + 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#8161 +class Prism::IndexOperatorWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator: Symbol, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode + # + # source://prism//lib/prism/node.rb#8193 + sig do + params( + 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), + flags: Integer, + operator: Symbol, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator, operator_loc, value, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#6976 + # source://prism//lib/prism/node.rb#8208 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#8172 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#8178 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#8258 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#8166 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6981 + # source://prism//lib/prism/node.rb#8213 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8268 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#8175 + sig { returns(Prism::Location) } + def closing_loc; end + # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#6991 + # source://prism//lib/prism/node.rb#8228 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#6986 + # source://prism//lib/prism/node.rb#8218 def compact_child_nodes; end - # def copy: (**params) -> ImplicitNode + # def copy: (**params) -> IndexOperatorWriteNode # - # source://yarp//lib/prism/node.rb#6996 + # source://prism//lib/prism/node.rb#8233 + sig { params(params: T.untyped).returns(Prism::IndexOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#6981 + # source://prism//lib/prism/node.rb#8213 + 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://yarp//lib/prism/node.rb#7007 + # source://prism//lib/prism/node.rb#8253 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#7011 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8283 def inspect(inspector = T.unsafe(nil)); end + # def opening: () -> String + # + # source://prism//lib/prism/node.rb#8263 + sig { returns(String) } + def opening; end + + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#8169 + sig { returns(Prism::Location) } + def opening_loc; end + + # attr_reader operator: Symbol + # + # source://prism//lib/prism/node.rb#8184 + sig { returns(Symbol) } + def operator; end + + # attr_reader operator_loc: Location + # + # source://prism//lib/prism/node.rb#8187 + sig { returns(Prism::Location) } + def operator_loc; end + + # attr_reader receiver: Node? + # + # source://prism//lib/prism/node.rb#8163 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end + + # def safe_navigation?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8273 + 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 @@ -10219,97 +14252,195 @@ class Prism::ImplicitNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#7032 + # source://prism//lib/prism/node.rb#8329 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#6967 + # source://prism//lib/prism/node.rb#8190 + sig { returns(Prism::Node) } def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8278 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#8181 + 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#8339 + def type; end + end end -# Represents the use of the `in` keyword in a case statement. +# Represents the use of the `||=` operator on a call to `[]`. # -# case a; in b then c end -# ^^^^^^^^^^^ +# foo.bar[baz] ||= value +# ^^^^^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#7041 -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://yarp//lib/prism/node.rb#7055 - def initialize(pattern, statements, in_loc, then_loc, location); end +# source://prism//lib/prism/node.rb#8348 +class Prism::IndexOrWriteNode < ::Prism::Node + # def initialize: (receiver: Node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Node?, flags: Integer, operator_loc: Location, value: Node, location: Location) -> void + # + # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode + # + # source://prism//lib/prism/node.rb#8377 + sig do + params( + 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), + flags: Integer, + operator_loc: Prism::Location, + value: Prism::Node, + location: Prism::Location + ).void + end + def initialize(receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, flags, operator_loc, value, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#7064 + # source://prism//lib/prism/node.rb#8391 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end + # attr_reader arguments: ArgumentsNode? + # + # source://prism//lib/prism/node.rb#8359 + sig { returns(T.nilable(Prism::ArgumentsNode)) } + def arguments; end + + # attr_reader block: Node? + # + # source://prism//lib/prism/node.rb#8365 + sig { returns(T.nilable(Prism::Node)) } + def block; end + + # def call_operator: () -> String? + # + # source://prism//lib/prism/node.rb#8440 + sig { returns(T.nilable(String)) } + def call_operator; end + + # attr_reader call_operator_loc: Location? + # + # source://prism//lib/prism/node.rb#8353 + sig { returns(T.nilable(Prism::Location)) } + def call_operator_loc; end + # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7069 + # source://prism//lib/prism/node.rb#8396 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end + # def closing: () -> String + # + # source://prism//lib/prism/node.rb#8450 + sig { returns(String) } + def closing; end + + # attr_reader closing_loc: Location + # + # source://prism//lib/prism/node.rb#8362 + sig { returns(Prism::Location) } + def closing_loc; end + # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#7082 + # source://prism//lib/prism/node.rb#8411 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#7074 + # source://prism//lib/prism/node.rb#8401 def compact_child_nodes; end - # def copy: (**params) -> InNode + # def copy: (**params) -> IndexOrWriteNode # - # source://yarp//lib/prism/node.rb#7087 + # source://prism//lib/prism/node.rb#8416 + sig { params(params: T.untyped).returns(Prism::IndexOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7069 + # source://prism//lib/prism/node.rb#8396 + 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://yarp//lib/prism/node.rb#7101 + # source://prism//lib/prism/node.rb#8435 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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 + # def inspect(inspector: NodeInspector) -> String # - # source://yarp//lib/prism/node.rb#7106 - def in; end + # source://prism//lib/prism/node.rb#8470 + def inspect(inspector = T.unsafe(nil)); end - # attr_reader in_loc: Location + # def opening: () -> String # - # source://yarp//lib/prism/node.rb#7049 - def in_loc; end + # source://prism//lib/prism/node.rb#8445 + sig { returns(String) } + def opening; end - # source://yarp//lib/prism/node.rb#7115 - def inspect(inspector = T.unsafe(nil)); end + # attr_reader opening_loc: Location + # + # source://prism//lib/prism/node.rb#8356 + sig { returns(Prism::Location) } + def opening_loc; end - # attr_reader pattern: Node + # def operator: () -> String # - # source://yarp//lib/prism/node.rb#7043 - def pattern; end + # source://prism//lib/prism/node.rb#8465 + sig { returns(String) } + def operator; end - # attr_reader statements: StatementsNode? + # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#7046 - def statements; end + # source://prism//lib/prism/node.rb#8371 + sig { returns(Prism::Location) } + def operator_loc; end - # def then: () -> String? + # attr_reader receiver: Node? # - # source://yarp//lib/prism/node.rb#7111 - def then; end + # source://prism//lib/prism/node.rb#8350 + sig { returns(T.nilable(Prism::Node)) } + def receiver; end - # attr_reader then_loc: Location? + # def safe_navigation?: () -> bool # - # source://yarp//lib/prism/node.rb#7052 - def then_loc; end + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8455 + 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 @@ -10318,16 +14449,70 @@ class Prism::InNode < ::Prism::Node # these approaches are relatively slow because of the constant lookups, # method calls, and/or array allocations. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # you can take advantage of the fact that case statements with all symbol + # keys will use a jump table. + # + # def type: () -> Symbol + # + # source://prism//lib/prism/node.rb#8515 + def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#8374 + sig { returns(Prism::Node) } + def value; end + + # def variable_call?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#8460 + sig { returns(T::Boolean) } + def variable_call?; end + + private + + # Returns the value of attribute flags. + # + # source://prism//lib/prism/node.rb#8368 + 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#8525 + 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#250 +class Prism::InlineComment < ::Prism::Comment + # Returns a string representation of this comment. + # + # source://prism//lib/prism/parse_result.rb#258 + def inspect; end + + # Returns true if this comment happens on the same line as other code and + # false if the comment is by itself. # - # def type: () -> Symbol + # @return [Boolean] # - # source://yarp//lib/prism/node.rb#7144 - def type; end + # source://prism//lib/prism/parse_result.rb#253 + sig { override.returns(T::Boolean) } + def trailing?; end end # Represents the use of the `&&=` operator for assignment to an instance variable. @@ -10335,72 +14520,96 @@ end # @target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#7153 +# source://prism//lib/prism/node.rb#8534 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://yarp//lib/prism/node.rb#7167 + # source://prism//lib/prism/node.rb#8548 + 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://yarp//lib/prism/node.rb#7176 + # source://prism//lib/prism/node.rb#8557 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7181 + # source://prism//lib/prism/node.rb#8562 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#7191 + # source://prism//lib/prism/node.rb#8572 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#7186 + # source://prism//lib/prism/node.rb#8567 def compact_child_nodes; end # def copy: (**params) -> InstanceVariableAndWriteNode # - # source://yarp//lib/prism/node.rb#7196 + # source://prism//lib/prism/node.rb#8577 + sig { params(params: T.untyped).returns(Prism::InstanceVariableAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7181 + # source://prism//lib/prism/node.rb#8562 + 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://yarp//lib/prism/node.rb#7210 + # source://prism//lib/prism/node.rb#8591 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#7219 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8601 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#7155 + # source://prism//lib/prism/node.rb#8536 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#7158 + # source://prism//lib/prism/node.rb#8539 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#7215 + # source://prism//lib/prism/node.rb#8596 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#7161 + # source://prism//lib/prism/node.rb#8542 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -10418,13 +14627,26 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#7243 + # source://prism//lib/prism/node.rb#8625 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#7164 + # source://prism//lib/prism/node.rb#8545 + 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#8635 + def type; end + end end # Represents assigning to an instance variable using an operator that isn't `=`. @@ -10432,72 +14654,97 @@ end # @target += value # ^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#7252 +# source://prism//lib/prism/node.rb#8644 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://yarp//lib/prism/node.rb#7269 + # source://prism//lib/prism/node.rb#8661 + 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://yarp//lib/prism/node.rb#7279 + # source://prism//lib/prism/node.rb#8671 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7284 + # source://prism//lib/prism/node.rb#8676 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#7294 + # source://prism//lib/prism/node.rb#8686 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#7289 + # source://prism//lib/prism/node.rb#8681 def compact_child_nodes; end # def copy: (**params) -> InstanceVariableOperatorWriteNode # - # source://yarp//lib/prism/node.rb#7299 + # source://prism//lib/prism/node.rb#8691 + sig { params(params: T.untyped).returns(Prism::InstanceVariableOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7284 + # source://prism//lib/prism/node.rb#8676 + 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://yarp//lib/prism/node.rb#7314 + # source://prism//lib/prism/node.rb#8706 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#7318 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8711 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#7254 + # source://prism//lib/prism/node.rb#8646 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#7257 + # source://prism//lib/prism/node.rb#8649 + sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://yarp//lib/prism/node.rb#7266 + # source://prism//lib/prism/node.rb#8658 + sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#7260 + # source://prism//lib/prism/node.rb#8652 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -10515,13 +14762,26 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#7343 + # source://prism//lib/prism/node.rb#8736 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#7263 + # source://prism//lib/prism/node.rb#8655 + 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#8746 + def type; end + end end # Represents the use of the `||=` operator for assignment to an instance variable. @@ -10529,72 +14789,96 @@ end # @target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#7352 +# source://prism//lib/prism/node.rb#8755 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://yarp//lib/prism/node.rb#7366 + # source://prism//lib/prism/node.rb#8769 + 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://yarp//lib/prism/node.rb#7375 + # source://prism//lib/prism/node.rb#8778 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7380 + # source://prism//lib/prism/node.rb#8783 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#7390 + # source://prism//lib/prism/node.rb#8793 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#7385 + # source://prism//lib/prism/node.rb#8788 def compact_child_nodes; end # def copy: (**params) -> InstanceVariableOrWriteNode # - # source://yarp//lib/prism/node.rb#7395 + # source://prism//lib/prism/node.rb#8798 + sig { params(params: T.untyped).returns(Prism::InstanceVariableOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7380 + # source://prism//lib/prism/node.rb#8783 + 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://yarp//lib/prism/node.rb#7409 + # source://prism//lib/prism/node.rb#8812 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#7418 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8822 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#7354 + # source://prism//lib/prism/node.rb#8757 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#7357 + # source://prism//lib/prism/node.rb#8760 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#7414 + # source://prism//lib/prism/node.rb#8817 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#7360 + # source://prism//lib/prism/node.rb#8763 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -10612,13 +14896,26 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#7442 + # source://prism//lib/prism/node.rb#8846 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#7363 + # source://prism//lib/prism/node.rb#8766 + 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#8856 + def type; end + end end # Represents referencing an instance variable. @@ -10626,57 +14923,70 @@ end # @foo # ^^^^ # -# source://yarp//lib/prism/node.rb#7451 +# source://prism//lib/prism/node.rb#8865 class Prism::InstanceVariableReadNode < ::Prism::Node # def initialize: (name: Symbol, location: Location) -> void # # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode # - # source://yarp//lib/prism/node.rb#7456 + # source://prism//lib/prism/node.rb#8870 + sig { params(name: Symbol, location: Prism::Location).void } def initialize(name, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#7462 + # source://prism//lib/prism/node.rb#8876 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7467 + # source://prism//lib/prism/node.rb#8881 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#7477 + # source://prism//lib/prism/node.rb#8891 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#7472 + # source://prism//lib/prism/node.rb#8886 def compact_child_nodes; end # def copy: (**params) -> InstanceVariableReadNode # - # source://yarp//lib/prism/node.rb#7482 + # source://prism//lib/prism/node.rb#8896 + sig { params(params: T.untyped).returns(Prism::InstanceVariableReadNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7467 + # source://prism//lib/prism/node.rb#8881 + 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://yarp//lib/prism/node.rb#7493 + # source://prism//lib/prism/node.rb#8907 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#7497 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8912 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#7453 + # source://prism//lib/prism/node.rb#8867 + sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of @@ -10694,8 +15004,20 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#7517 + # source://prism//lib/prism/node.rb#8932 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#8942 + def type; end + end end # Represents writing to an instance variable in a context that doesn't have an explicit value. @@ -10703,57 +15025,70 @@ end # @foo, @bar = baz # ^^^^ ^^^^ # -# source://yarp//lib/prism/node.rb#7526 +# source://prism//lib/prism/node.rb#8951 class Prism::InstanceVariableTargetNode < ::Prism::Node # def initialize: (name: Symbol, location: Location) -> void # # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode # - # source://yarp//lib/prism/node.rb#7531 + # source://prism//lib/prism/node.rb#8956 + sig { params(name: Symbol, location: Prism::Location).void } def initialize(name, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#7537 + # source://prism//lib/prism/node.rb#8962 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7542 + # source://prism//lib/prism/node.rb#8967 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#7552 + # source://prism//lib/prism/node.rb#8977 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#7547 + # source://prism//lib/prism/node.rb#8972 def compact_child_nodes; end # def copy: (**params) -> InstanceVariableTargetNode # - # source://yarp//lib/prism/node.rb#7557 + # source://prism//lib/prism/node.rb#8982 + sig { params(params: T.untyped).returns(Prism::InstanceVariableTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7542 + # source://prism//lib/prism/node.rb#8967 + 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://yarp//lib/prism/node.rb#7568 + # source://prism//lib/prism/node.rb#8993 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#7572 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#8998 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#7528 + # source://prism//lib/prism/node.rb#8953 + sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of @@ -10771,8 +15106,20 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#7592 + # source://prism//lib/prism/node.rb#9018 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#9028 + def type; end + end end # Represents writing to an instance variable. @@ -10780,72 +15127,96 @@ end # @foo = 1 # ^^^^^^^^ # -# source://yarp//lib/prism/node.rb#7601 +# source://prism//lib/prism/node.rb#9037 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://yarp//lib/prism/node.rb#7615 + # source://prism//lib/prism/node.rb#9051 + 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://yarp//lib/prism/node.rb#7624 + # source://prism//lib/prism/node.rb#9060 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7629 + # source://prism//lib/prism/node.rb#9065 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#7639 + # source://prism//lib/prism/node.rb#9075 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#7634 + # source://prism//lib/prism/node.rb#9070 def compact_child_nodes; end # def copy: (**params) -> InstanceVariableWriteNode # - # source://yarp//lib/prism/node.rb#7644 + # source://prism//lib/prism/node.rb#9080 + sig { params(params: T.untyped).returns(Prism::InstanceVariableWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7629 + # source://prism//lib/prism/node.rb#9065 + 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://yarp//lib/prism/node.rb#7658 + # source://prism//lib/prism/node.rb#9094 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#7667 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9104 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#7603 + # source://prism//lib/prism/node.rb#9039 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#7606 + # source://prism//lib/prism/node.rb#9042 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#7663 + # source://prism//lib/prism/node.rb#9099 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#7612 + # source://prism//lib/prism/node.rb#9048 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -10863,36 +15234,51 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#7691 + # source://prism//lib/prism/node.rb#9128 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#7609 + # source://prism//lib/prism/node.rb#9045 + 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#9138 + def type; end + end end -# source://yarp//lib/prism/node.rb#14486 +# Flags for integer nodes that correspond to the base of the integer. +# +# source://prism//lib/prism/node.rb#16620 module Prism::IntegerBaseFlags; end # 0b prefix # -# source://yarp//lib/prism/node.rb#14488 +# source://prism//lib/prism/node.rb#16622 Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) # 0d or no prefix # -# source://yarp//lib/prism/node.rb#14494 +# source://prism//lib/prism/node.rb#16628 Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) # 0x prefix # -# source://yarp//lib/prism/node.rb#14497 +# source://prism//lib/prism/node.rb#16631 Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) # 0o or 0 prefix # -# source://yarp//lib/prism/node.rb#14491 +# source://prism//lib/prism/node.rb#16625 Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # Represents an integer number literal. @@ -10900,80 +15286,96 @@ Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # 1 # ^ # -# source://yarp//lib/prism/node.rb#7700 +# source://prism//lib/prism/node.rb#9147 class Prism::IntegerNode < ::Prism::Node # def initialize: (flags: Integer, location: Location) -> void # # @return [IntegerNode] a new instance of IntegerNode # - # source://yarp//lib/prism/node.rb#7705 + # source://prism//lib/prism/node.rb#9152 + sig { params(flags: Integer, location: Prism::Location).void } def initialize(flags, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#7711 + # source://prism//lib/prism/node.rb#9158 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def binary?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#7747 + # source://prism//lib/prism/node.rb#9194 + sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7716 + # source://prism//lib/prism/node.rb#9163 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#7726 + # source://prism//lib/prism/node.rb#9173 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#7721 + # source://prism//lib/prism/node.rb#9168 def compact_child_nodes; end # def copy: (**params) -> IntegerNode # - # source://yarp//lib/prism/node.rb#7731 + # source://prism//lib/prism/node.rb#9178 + sig { params(params: T.untyped).returns(Prism::IntegerNode) } def copy(**params); end # def decimal?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#7757 + # source://prism//lib/prism/node.rb#9204 + sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7716 + # source://prism//lib/prism/node.rb#9163 + 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://yarp//lib/prism/node.rb#7742 + # source://prism//lib/prism/node.rb#9189 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#7762 + # source://prism//lib/prism/node.rb#9209 + sig { returns(T::Boolean) } def hexadecimal?; end - # source://yarp//lib/prism/node.rb#7766 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9214 def inspect(inspector = T.unsafe(nil)); end # def octal?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#7752 + # source://prism//lib/prism/node.rb#9199 + sig { returns(T::Boolean) } def octal?; end # Sometimes you want to check an instance of a node against a list of @@ -10991,20 +15393,33 @@ class Prism::IntegerNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#7787 + # source://prism//lib/prism/node.rb#9235 def type; end # Returns the value of the node as a Ruby Integer. # - # source://yarp//lib/prism/node_ext.rb#22 + # source://prism//lib/prism/node_ext.rb#35 def value; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#7702 + # source://prism//lib/prism/node.rb#9149 + 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#9245 + def type; end + end end # Represents a regular expression literal that contains interpolation that @@ -11014,122 +15429,155 @@ end # if /foo #{bar} baz/ then end # ^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#7798 +# source://prism//lib/prism/node.rb#9256 class Prism::InterpolatedMatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void # # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode # - # source://yarp//lib/prism/node.rb#7812 + # source://prism//lib/prism/node.rb#9270 + sig do + params( + opening_loc: Prism::Location, + parts: T::Array[Prism::Node], + closing_loc: Prism::Location, + flags: Integer, + location: Prism::Location + ).void + end def initialize(opening_loc, parts, closing_loc, flags, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#7821 + # source://prism//lib/prism/node.rb#9279 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def ascii_8bit?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#7895 + # source://prism//lib/prism/node.rb#9358 + sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7831 + # source://prism//lib/prism/node.rb#9289 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://yarp//lib/prism/node.rb#7870 + # source://prism//lib/prism/node.rb#9328 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://yarp//lib/prism/node.rb#7806 + # source://prism//lib/prism/node.rb#9264 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#7841 + # source://prism//lib/prism/node.rb#9299 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#7836 + # source://prism//lib/prism/node.rb#9294 def compact_child_nodes; end # def copy: (**params) -> InterpolatedMatchLastLineNode # - # source://yarp//lib/prism/node.rb#7846 + # source://prism//lib/prism/node.rb#9304 + sig { params(params: T.untyped).returns(Prism::InterpolatedMatchLastLineNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7831 + # source://prism//lib/prism/node.rb#9289 + 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://yarp//lib/prism/node.rb#7860 + # source://prism//lib/prism/node.rb#9318 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#7890 + # source://prism//lib/prism/node.rb#9353 + sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#7880 + # source://prism//lib/prism/node.rb#9338 + sig { returns(T::Boolean) } def extended?; end # def ignore_case?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#7875 + # source://prism//lib/prism/node.rb#9333 + sig { returns(T::Boolean) } def ignore_case?; end - # source://yarp//lib/prism/node.rb#7914 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9373 def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#7885 + # source://prism//lib/prism/node.rb#9343 + sig { returns(T::Boolean) } def multi_line?; end # def once?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#7910 + # source://prism//lib/prism/node.rb#9348 + sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://yarp//lib/prism/node.rb#7865 + # source://prism//lib/prism/node.rb#9323 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://yarp//lib/prism/node.rb#7800 + # source://prism//lib/prism/node.rb#9258 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[Node] # - # source://yarp//lib/prism/node.rb#7803 + # source://prism//lib/prism/node.rb#9261 + sig { returns(T::Array[Prism::Node]) } def parts; end - # source://yarp//lib/prism/node.rb#7825 + # source://prism//lib/prism/node.rb#9283 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -11147,29 +15595,44 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#7938 + # source://prism//lib/prism/node.rb#9397 def type; end # def utf_8?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#7905 + # source://prism//lib/prism/node.rb#9368 + sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#7900 + # source://prism//lib/prism/node.rb#9363 + sig { returns(T::Boolean) } def windows_31j?; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#7809 + # source://prism//lib/prism/node.rb#9267 + 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#9407 + def type; end + end end # Represents a regular expression literal that contains interpolation. @@ -11177,128 +15640,155 @@ end # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#7947 +# source://prism//lib/prism/node.rb#9416 class Prism::InterpolatedRegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, flags: Integer, location: Location) -> void # # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode # - # source://yarp//lib/prism/node.rb#7961 + # source://prism//lib/prism/node.rb#9430 + sig do + params( + opening_loc: Prism::Location, + parts: T::Array[Prism::Node], + closing_loc: Prism::Location, + flags: Integer, + location: Prism::Location + ).void + end def initialize(opening_loc, parts, closing_loc, flags, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#7970 + # source://prism//lib/prism/node.rb#9439 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def ascii_8bit?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#8044 + # source://prism//lib/prism/node.rb#9518 + sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7980 + # source://prism//lib/prism/node.rb#9449 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://yarp//lib/prism/node.rb#8019 + # source://prism//lib/prism/node.rb#9488 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://yarp//lib/prism/node.rb#7955 + # source://prism//lib/prism/node.rb#9424 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#7990 + # source://prism//lib/prism/node.rb#9459 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#7985 + # source://prism//lib/prism/node.rb#9454 def compact_child_nodes; end # def copy: (**params) -> InterpolatedRegularExpressionNode # - # source://yarp//lib/prism/node.rb#7995 + # source://prism//lib/prism/node.rb#9464 + sig { params(params: T.untyped).returns(Prism::InterpolatedRegularExpressionNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#7980 + # source://prism//lib/prism/node.rb#9449 + 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://yarp//lib/prism/node.rb#8009 + # source://prism//lib/prism/node.rb#9478 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#8039 + # source://prism//lib/prism/node.rb#9513 + sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#8029 + # source://prism//lib/prism/node.rb#9498 + sig { returns(T::Boolean) } def extended?; end # def ignore_case?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#8024 + # source://prism//lib/prism/node.rb#9493 + sig { returns(T::Boolean) } def ignore_case?; end - # source://yarp//lib/prism/node.rb#8063 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9533 def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#8034 + # source://prism//lib/prism/node.rb#9503 + sig { returns(T::Boolean) } def multi_line?; end # def once?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#8059 + # source://prism//lib/prism/node.rb#9508 + sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://yarp//lib/prism/node.rb#8014 + # source://prism//lib/prism/node.rb#9483 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://yarp//lib/prism/node.rb#7949 + # source://prism//lib/prism/node.rb#9418 + sig { returns(Prism::Location) } def opening_loc; end - # Returns a numeric value that represents the flags that were used to create - # the regular expression. - # - # source://yarp//lib/prism/node_ext.rb#30 - def options; end - # attr_reader parts: Array[Node] # - # source://yarp//lib/prism/node.rb#7952 + # source://prism//lib/prism/node.rb#9421 + sig { returns(T::Array[Prism::Node]) } def parts; end - # source://yarp//lib/prism/node.rb#7974 + # source://prism//lib/prism/node.rb#9443 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -11316,29 +15806,44 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#8087 + # source://prism//lib/prism/node.rb#9557 def type; end # def utf_8?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#8054 + # source://prism//lib/prism/node.rb#9528 + sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#8049 + # source://prism//lib/prism/node.rb#9523 + sig { returns(T::Boolean) } def windows_31j?; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#7958 + # source://prism//lib/prism/node.rb#9427 + 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#9567 + def type; end + end end # Represents a string literal that contains interpolation. @@ -11346,80 +15851,104 @@ end # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#8096 +# source://prism//lib/prism/node.rb#9576 class Prism::InterpolatedStringNode < ::Prism::Node # def initialize: (opening_loc: Location?, parts: Array[Node], closing_loc: Location?, location: Location) -> void # # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode # - # source://yarp//lib/prism/node.rb#8107 + # source://prism//lib/prism/node.rb#9587 + 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://yarp//lib/prism/node.rb#8115 + # source://prism//lib/prism/node.rb#9595 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8125 + # source://prism//lib/prism/node.rb#9605 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://yarp//lib/prism/node.rb#8163 + # source://prism//lib/prism/node.rb#9643 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://yarp//lib/prism/node.rb#8104 + # source://prism//lib/prism/node.rb#9584 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#8135 + # source://prism//lib/prism/node.rb#9615 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#8130 + # source://prism//lib/prism/node.rb#9610 def compact_child_nodes; end # def copy: (**params) -> InterpolatedStringNode # - # source://yarp//lib/prism/node.rb#8140 + # source://prism//lib/prism/node.rb#9620 + sig { params(params: T.untyped).returns(Prism::InterpolatedStringNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8125 + # source://prism//lib/prism/node.rb#9605 + 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://yarp//lib/prism/node.rb#8153 + # source://prism//lib/prism/node.rb#9633 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#8167 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9648 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://yarp//lib/prism/node.rb#8158 + # source://prism//lib/prism/node.rb#9638 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://yarp//lib/prism/node.rb#8098 + # source://prism//lib/prism/node.rb#9578 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[Node] # - # source://yarp//lib/prism/node.rb#8101 + # source://prism//lib/prism/node.rb#9581 + sig { returns(T::Array[Prism::Node]) } def parts; end - # source://yarp//lib/prism/node.rb#8119 + # source://prism//lib/prism/node.rb#9599 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -11437,8 +15966,20 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#8189 + # source://prism//lib/prism/node.rb#9670 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#9680 + def type; end + end end # Represents a symbol literal that contains interpolation. @@ -11446,80 +15987,104 @@ end # :"foo #{bar} baz" # ^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#8198 +# source://prism//lib/prism/node.rb#9689 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://yarp//lib/prism/node.rb#8209 + # source://prism//lib/prism/node.rb#9700 + 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://yarp//lib/prism/node.rb#8217 + # source://prism//lib/prism/node.rb#9708 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8227 + # source://prism//lib/prism/node.rb#9718 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://yarp//lib/prism/node.rb#8265 + # source://prism//lib/prism/node.rb#9756 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://yarp//lib/prism/node.rb#8206 + # source://prism//lib/prism/node.rb#9697 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#8237 + # source://prism//lib/prism/node.rb#9728 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#8232 + # source://prism//lib/prism/node.rb#9723 def compact_child_nodes; end # def copy: (**params) -> InterpolatedSymbolNode # - # source://yarp//lib/prism/node.rb#8242 + # source://prism//lib/prism/node.rb#9733 + sig { params(params: T.untyped).returns(Prism::InterpolatedSymbolNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8227 + # source://prism//lib/prism/node.rb#9718 + 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://yarp//lib/prism/node.rb#8255 + # source://prism//lib/prism/node.rb#9746 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#8269 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9761 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://yarp//lib/prism/node.rb#8260 + # source://prism//lib/prism/node.rb#9751 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://yarp//lib/prism/node.rb#8200 + # source://prism//lib/prism/node.rb#9691 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[Node] # - # source://yarp//lib/prism/node.rb#8203 + # source://prism//lib/prism/node.rb#9694 + sig { returns(T::Array[Prism::Node]) } def parts; end - # source://yarp//lib/prism/node.rb#8221 + # source://prism//lib/prism/node.rb#9712 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -11537,8 +16102,20 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#8291 + # source://prism//lib/prism/node.rb#9783 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#9793 + def type; end + end end # Represents an xstring literal that contains interpolation. @@ -11546,80 +16123,104 @@ end # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#8300 +# source://prism//lib/prism/node.rb#9802 class Prism::InterpolatedXStringNode < ::Prism::Node # def initialize: (opening_loc: Location, parts: Array[Node], closing_loc: Location, location: Location) -> void # # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode # - # source://yarp//lib/prism/node.rb#8311 + # source://prism//lib/prism/node.rb#9813 + 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://yarp//lib/prism/node.rb#8319 + # source://prism//lib/prism/node.rb#9821 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8329 + # source://prism//lib/prism/node.rb#9831 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://yarp//lib/prism/node.rb#8367 + # source://prism//lib/prism/node.rb#9869 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://yarp//lib/prism/node.rb#8308 + # source://prism//lib/prism/node.rb#9810 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#8339 + # source://prism//lib/prism/node.rb#9841 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#8334 + # source://prism//lib/prism/node.rb#9836 def compact_child_nodes; end # def copy: (**params) -> InterpolatedXStringNode # - # source://yarp//lib/prism/node.rb#8344 + # source://prism//lib/prism/node.rb#9846 + sig { params(params: T.untyped).returns(Prism::InterpolatedXStringNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8329 + # source://prism//lib/prism/node.rb#9831 + 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://yarp//lib/prism/node.rb#8357 + # source://prism//lib/prism/node.rb#9859 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#8371 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#9874 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://yarp//lib/prism/node.rb#8362 + # source://prism//lib/prism/node.rb#9864 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://yarp//lib/prism/node.rb#8302 + # source://prism//lib/prism/node.rb#9804 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[Node] # - # source://yarp//lib/prism/node.rb#8305 + # source://prism//lib/prism/node.rb#9807 + sig { returns(T::Array[Prism::Node]) } def parts; end - # source://yarp//lib/prism/node.rb#8323 + # source://prism//lib/prism/node.rb#9825 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -11637,8 +16238,20 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#8393 + # source://prism//lib/prism/node.rb#9896 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#9906 + def type; end + end end # Represents a hash literal without opening and closing braces. @@ -11646,146 +16259,72 @@ end # foo(a: b) # ^^^^ # -# source://yarp//lib/prism/node.rb#8402 +# source://prism//lib/prism/node.rb#9915 class Prism::KeywordHashNode < ::Prism::Node # def initialize: (elements: Array[Node], location: Location) -> void # # @return [KeywordHashNode] a new instance of KeywordHashNode # - # source://yarp//lib/prism/node.rb#8407 + # source://prism//lib/prism/node.rb#9920 + sig { params(elements: T::Array[Prism::Node], location: Prism::Location).void } def initialize(elements, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#8413 + # source://prism//lib/prism/node.rb#9926 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8418 + # source://prism//lib/prism/node.rb#9931 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#8428 + # source://prism//lib/prism/node.rb#9941 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#8423 + # source://prism//lib/prism/node.rb#9936 def compact_child_nodes; end # def copy: (**params) -> KeywordHashNode # - # source://yarp//lib/prism/node.rb#8433 + # source://prism//lib/prism/node.rb#9946 + sig { params(params: T.untyped).returns(Prism::KeywordHashNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8418 + # source://prism//lib/prism/node.rb#9931 + 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://yarp//lib/prism/node.rb#8444 + # source://prism//lib/prism/node.rb#9957 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#8404 + # source://prism//lib/prism/node.rb#9917 + sig { returns(T::Array[Prism::Node]) } def elements; end - # source://yarp//lib/prism/node.rb#8448 - 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://yarp//lib/prism/node.rb#8468 - def type; end -end - -# Represents a keyword parameter to a method, block, or lambda definition. -# -# def a(b:) -# ^^ -# end -# -# def a(b: 1) -# ^^^^ -# end -# -# source://yarp//lib/prism/node.rb#8482 -class Prism::KeywordParameterNode < ::Prism::Node - # def initialize: (name: Symbol, name_loc: Location, value: Node?, location: Location) -> void - # - # @return [KeywordParameterNode] a new instance of KeywordParameterNode - # - # source://yarp//lib/prism/node.rb#8493 - def initialize(name, name_loc, value, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/prism/node.rb#8501 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/prism/node.rb#8506 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/prism/node.rb#8518 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/prism/node.rb#8511 - def compact_child_nodes; end - - # def copy: (**params) -> KeywordParameterNode - # - # source://yarp//lib/prism/node.rb#8523 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/prism/node.rb#8506 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # def inspect(inspector: NodeInspector) -> String # - # source://yarp//lib/prism/node.rb#8536 - def deconstruct_keys(keys); end - - # source://yarp//lib/prism/node.rb#8540 + # source://prism//lib/prism/node.rb#9962 def inspect(inspector = T.unsafe(nil)); end - # attr_reader name: Symbol - # - # source://yarp//lib/prism/node.rb#8484 - def name; end - - # attr_reader name_loc: Location - # - # source://yarp//lib/prism/node.rb#8487 - 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 @@ -11801,13 +16340,20 @@ class Prism::KeywordParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#8567 + # source://prism//lib/prism/node.rb#9982 def type; end - # attr_reader value: Node? - # - # source://yarp//lib/prism/node.rb#8490 - 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#9992 + def type; end + end end # Represents a keyword rest parameter to a method, block, or lambda definition. @@ -11816,72 +16362,95 @@ end # ^^^ # end # -# source://yarp//lib/prism/node.rb#8577 +# source://prism//lib/prism/node.rb#10002 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://yarp//lib/prism/node.rb#8588 + # source://prism//lib/prism/node.rb#10013 + 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://yarp//lib/prism/node.rb#8596 + # source://prism//lib/prism/node.rb#10021 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8601 + # source://prism//lib/prism/node.rb#10026 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#8611 + # source://prism//lib/prism/node.rb#10036 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#8606 + # source://prism//lib/prism/node.rb#10031 def compact_child_nodes; end # def copy: (**params) -> KeywordRestParameterNode # - # source://yarp//lib/prism/node.rb#8616 + # source://prism//lib/prism/node.rb#10041 + sig { params(params: T.untyped).returns(Prism::KeywordRestParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8601 + # source://prism//lib/prism/node.rb#10026 + 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://yarp//lib/prism/node.rb#8629 + # source://prism//lib/prism/node.rb#10054 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#8638 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10064 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # - # source://yarp//lib/prism/node.rb#8579 + # source://prism//lib/prism/node.rb#10004 + sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://yarp//lib/prism/node.rb#8582 + # source://prism//lib/prism/node.rb#10007 + sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#8634 + # source://prism//lib/prism/node.rb#10059 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#8585 + # source://prism//lib/prism/node.rb#10010 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -11899,8 +16468,20 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#8660 + # source://prism//lib/prism/node.rb#10090 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#10100 + def type; end + end end # Represents using a lambda literal (not the lambda method call). @@ -11908,97 +16489,128 @@ end # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#8669 +# source://prism//lib/prism/node.rb#10109 class Prism::LambdaNode < ::Prism::Node # def initialize: (locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode?, body: Node?, location: Location) -> void # # @return [LambdaNode] a new instance of LambdaNode # - # source://yarp//lib/prism/node.rb#8689 + # source://prism//lib/prism/node.rb#10129 + sig do + params( + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(Prism::BlockParametersNode), + body: T.nilable(Prism::Node), + location: Prism::Location + ).void + end def initialize(locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#8700 + # source://prism//lib/prism/node.rb#10140 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # - # source://yarp//lib/prism/node.rb#8686 + # source://prism//lib/prism/node.rb#10126 + sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8705 + # source://prism//lib/prism/node.rb#10145 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://yarp//lib/prism/node.rb#8754 + # source://prism//lib/prism/node.rb#10194 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://yarp//lib/prism/node.rb#8680 + # source://prism//lib/prism/node.rb#10120 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#8718 + # source://prism//lib/prism/node.rb#10158 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#8710 + # source://prism//lib/prism/node.rb#10150 def compact_child_nodes; end # def copy: (**params) -> LambdaNode # - # source://yarp//lib/prism/node.rb#8723 + # source://prism//lib/prism/node.rb#10163 + sig { params(params: T.untyped).returns(Prism::LambdaNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8705 + # source://prism//lib/prism/node.rb#10145 + 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://yarp//lib/prism/node.rb#8739 + # source://prism//lib/prism/node.rb#10179 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#8758 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10199 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://yarp//lib/prism/node.rb#8671 + # source://prism//lib/prism/node.rb#10111 + sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://yarp//lib/prism/node.rb#8749 + # source://prism//lib/prism/node.rb#10189 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://yarp//lib/prism/node.rb#8677 + # source://prism//lib/prism/node.rb#10117 + sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#8744 + # source://prism//lib/prism/node.rb#10184 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#8674 + # source://prism//lib/prism/node.rb#10114 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader parameters: BlockParametersNode? # - # source://yarp//lib/prism/node.rb#8683 + # source://prism//lib/prism/node.rb#10123 + sig { returns(T.nilable(Prism::BlockParametersNode)) } def parameters; end # Sometimes you want to check an instance of a node against a list of @@ -12016,8 +16628,20 @@ class Prism::LambdaNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#8793 + # source://prism//lib/prism/node.rb#10234 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#10244 + def type; end + end end # This class is responsible for lexing the source using prism and then @@ -12026,33 +16650,33 @@ end # generally lines up. However, there are a few cases that require special # handling. # -# source://yarp//lib/prism/lex_compat.rb#11 +# source://prism//lib/prism/lex_compat.rb#11 class Prism::LexCompat # @return [LexCompat] a new instance of LexCompat # - # source://yarp//lib/prism/lex_compat.rb#555 - def initialize(source, filepath = T.unsafe(nil)); end + # source://prism//lib/prism/lex_compat.rb#599 + def initialize(source, **options); end - # Returns the value of attribute filepath. + # Returns the value of attribute options. # - # source://yarp//lib/prism/lex_compat.rb#553 - def filepath; end + # source://prism//lib/prism/lex_compat.rb#597 + def options; end - # source://yarp//lib/prism/lex_compat.rb#560 + # source://prism//lib/prism/lex_compat.rb#604 def result; end # Returns the value of attribute source. # - # source://yarp//lib/prism/lex_compat.rb#553 + # 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://yarp//lib/prism/lex_compat.rb#206 +# source://prism//lib/prism/lex_compat.rb#210 class Prism::LexCompat::EndContentToken < ::Prism::LexCompat::Token - # source://yarp//lib/prism/lex_compat.rb#207 + # source://prism//lib/prism/lex_compat.rb#211 def ==(other); end end @@ -12060,13 +16684,13 @@ end # heredoc that should be appended onto the list of tokens when the heredoc # closes. # -# source://yarp//lib/prism/lex_compat.rb#267 +# 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://yarp//lib/prism/lex_compat.rb#541 + # source://prism//lib/prism/lex_compat.rb#583 def build(opening); end end end @@ -12075,27 +16699,23 @@ end # that need to be split on "\\\n" to mimic Ripper's behavior. We also need # to keep track of the state that the heredoc was opened in. # -# source://yarp//lib/prism/lex_compat.rb#291 +# source://prism//lib/prism/lex_compat.rb#295 class Prism::LexCompat::Heredoc::DashHeredoc # @return [DashHeredoc] a new instance of DashHeredoc # - # source://yarp//lib/prism/lex_compat.rb#294 + # source://prism//lib/prism/lex_compat.rb#298 def initialize(split); end - # source://yarp//lib/prism/lex_compat.rb#299 + # source://prism//lib/prism/lex_compat.rb#303 def <<(token); end - # Returns the value of attribute split. - # - # source://yarp//lib/prism/lex_compat.rb#292 + # source://prism//lib/prism/lex_compat.rb#296 def split; end - # source://yarp//lib/prism/lex_compat.rb#303 + # source://prism//lib/prism/lex_compat.rb#307 def to_a; end - # Returns the value of attribute tokens. - # - # source://yarp//lib/prism/lex_compat.rb#292 + # source://prism//lib/prism/lex_compat.rb#296 def tokens; end end @@ -12110,45 +16730,45 @@ end # some extra manipulation on the tokens to make them match Ripper's # output by mirroring the dedent logic that Ripper uses. # -# source://yarp//lib/prism/lex_compat.rb#350 +# source://prism//lib/prism/lex_compat.rb#354 class Prism::LexCompat::Heredoc::DedentingHeredoc # @return [DedentingHeredoc] a new instance of DedentingHeredoc # - # source://yarp//lib/prism/lex_compat.rb#355 + # 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://yarp//lib/prism/lex_compat.rb#365 + # source://prism//lib/prism/lex_compat.rb#370 def <<(token); end # Returns the value of attribute dedent. # - # source://yarp//lib/prism/lex_compat.rb#353 + # source://prism//lib/prism/lex_compat.rb#357 def dedent; end # Returns the value of attribute dedent_next. # - # source://yarp//lib/prism/lex_compat.rb#353 + # source://prism//lib/prism/lex_compat.rb#357 def dedent_next; end # Returns the value of attribute embexpr_balance. # - # source://yarp//lib/prism/lex_compat.rb#353 + # source://prism//lib/prism/lex_compat.rb#357 def embexpr_balance; end - # source://yarp//lib/prism/lex_compat.rb#397 + # source://prism//lib/prism/lex_compat.rb#407 def to_a; end # Returns the value of attribute tokens. # - # source://yarp//lib/prism/lex_compat.rb#353 + # source://prism//lib/prism/lex_compat.rb#357 def tokens; end end -# source://yarp//lib/prism/lex_compat.rb#351 +# 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. @@ -12156,22 +16776,20 @@ Prism::LexCompat::Heredoc::DedentingHeredoc::TAB_WIDTH = T.let(T.unsafe(nil), In # order back into the token stream and set the state of the last token to # the state that the heredoc was opened in. # -# source://yarp//lib/prism/lex_compat.rb#272 +# source://prism//lib/prism/lex_compat.rb#276 class Prism::LexCompat::Heredoc::PlainHeredoc # @return [PlainHeredoc] a new instance of PlainHeredoc # - # source://yarp//lib/prism/lex_compat.rb#275 + # source://prism//lib/prism/lex_compat.rb#279 def initialize; end - # source://yarp//lib/prism/lex_compat.rb#279 + # source://prism//lib/prism/lex_compat.rb#283 def <<(token); end - # source://yarp//lib/prism/lex_compat.rb#283 + # source://prism//lib/prism/lex_compat.rb#287 def to_a; end - # Returns the value of attribute tokens. - # - # source://yarp//lib/prism/lex_compat.rb#273 + # source://prism//lib/prism/lex_compat.rb#277 def tokens; end end @@ -12180,27 +16798,27 @@ end # through named captures in regular expressions). In that case we don't # compare the state. # -# source://yarp//lib/prism/lex_compat.rb#224 +# source://prism//lib/prism/lex_compat.rb#228 class Prism::LexCompat::IdentToken < ::Prism::LexCompat::Token - # source://yarp//lib/prism/lex_compat.rb#225 + # 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://yarp//lib/prism/lex_compat.rb#214 +# source://prism//lib/prism/lex_compat.rb#218 class Prism::LexCompat::IgnoreStateToken < ::Prism::LexCompat::Token - # source://yarp//lib/prism/lex_compat.rb#215 + # 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://yarp//lib/prism/lex_compat.rb#235 +# source://prism//lib/prism/lex_compat.rb#239 class Prism::LexCompat::IgnoredNewlineToken < ::Prism::LexCompat::Token - # source://yarp//lib/prism/lex_compat.rb#236 + # source://prism//lib/prism/lex_compat.rb#240 def ==(other); end end @@ -12213,9 +16831,9 @@ end # more accurately, so we need to allow comparing against both END and # END|LABEL. # -# source://yarp//lib/prism/lex_compat.rb#255 +# source://prism//lib/prism/lex_compat.rb#259 class Prism::LexCompat::ParamToken < ::Prism::LexCompat::Token - # source://yarp//lib/prism/lex_compat.rb#256 + # source://prism//lib/prism/lex_compat.rb#260 def ==(other); end end @@ -12223,44 +16841,50 @@ end # many-to-one mapping because we split up our token types, whereas Ripper # tends to group them. # -# source://yarp//lib/prism/lex_compat.rb#15 +# 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://yarp//lib/prism/lex_compat.rb#186 +# source://prism//lib/prism/lex_compat.rb#186 class Prism::LexCompat::Token < ::SimpleDelegator - # source://yarp//lib/prism/lex_compat.rb#191 + # The type of the token. + # + # source://prism//lib/prism/lex_compat.rb#193 def event; end - # source://yarp//lib/prism/lex_compat.rb#187 + # The location of the token in the source. + # + # source://prism//lib/prism/lex_compat.rb#188 def location; end - # source://yarp//lib/prism/lex_compat.rb#199 + # The state of the lexer when this token was produced. + # + # source://prism//lib/prism/lex_compat.rb#203 def state; end - # source://yarp//lib/prism/lex_compat.rb#195 + # 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://yarp//lib/prism/lex_compat.rb#800 +# source://prism//lib/prism/lex_compat.rb#842 class Prism::LexRipper # @return [LexRipper] a new instance of LexRipper # - # source://yarp//lib/prism/lex_compat.rb#803 + # source://prism//lib/prism/lex_compat.rb#845 def initialize(source); end - # source://yarp//lib/prism/lex_compat.rb#807 + # source://prism//lib/prism/lex_compat.rb#849 def result; end - # Returns the value of attribute source. - # - # source://yarp//lib/prism/lex_compat.rb#801 + # source://prism//lib/prism/lex_compat.rb#843 def source; end end @@ -12269,77 +16893,103 @@ end # target &&= value # ^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#8802 +# source://prism//lib/prism/node.rb#10253 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://yarp//lib/prism/node.rb#8819 + # source://prism//lib/prism/node.rb#10270 + 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://yarp//lib/prism/node.rb#8829 + # source://prism//lib/prism/node.rb#10280 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8834 + # source://prism//lib/prism/node.rb#10285 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#8844 + # source://prism//lib/prism/node.rb#10295 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#8839 + # source://prism//lib/prism/node.rb#10290 def compact_child_nodes; end # def copy: (**params) -> LocalVariableAndWriteNode # - # source://yarp//lib/prism/node.rb#8849 + # source://prism//lib/prism/node.rb#10300 + sig { params(params: T.untyped).returns(Prism::LocalVariableAndWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8834 + # source://prism//lib/prism/node.rb#10285 + 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://yarp//lib/prism/node.rb#8864 + # source://prism//lib/prism/node.rb#10315 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#8816 + # source://prism//lib/prism/node.rb#10267 + sig { returns(Integer) } def depth; end - # source://yarp//lib/prism/node.rb#8873 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10325 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#8813 + # source://prism//lib/prism/node.rb#10264 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#8804 + # source://prism//lib/prism/node.rb#10255 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#8869 + # source://prism//lib/prism/node.rb#10320 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#8807 + # source://prism//lib/prism/node.rb#10258 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -12357,13 +17007,26 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#8898 + # source://prism//lib/prism/node.rb#10350 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#8810 + # source://prism//lib/prism/node.rb#10261 + 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#10360 + def type; end + end end # Represents assigning to a local variable using an operator that isn't `=`. @@ -12371,77 +17034,104 @@ end # target += value # ^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#8907 +# source://prism//lib/prism/node.rb#10369 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://yarp//lib/prism/node.rb#8927 + # source://prism//lib/prism/node.rb#10389 + 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://yarp//lib/prism/node.rb#8938 + # source://prism//lib/prism/node.rb#10400 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8943 + # source://prism//lib/prism/node.rb#10405 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#8953 + # source://prism//lib/prism/node.rb#10415 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#8948 + # source://prism//lib/prism/node.rb#10410 def compact_child_nodes; end # def copy: (**params) -> LocalVariableOperatorWriteNode # - # source://yarp//lib/prism/node.rb#8958 + # source://prism//lib/prism/node.rb#10420 + sig { params(params: T.untyped).returns(Prism::LocalVariableOperatorWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#8943 + # source://prism//lib/prism/node.rb#10405 + 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://yarp//lib/prism/node.rb#8974 + # source://prism//lib/prism/node.rb#10436 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#8924 + # source://prism//lib/prism/node.rb#10386 + sig { returns(Integer) } def depth; end - # source://yarp//lib/prism/node.rb#8978 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10441 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#8918 + # source://prism//lib/prism/node.rb#10380 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#8909 + # source://prism//lib/prism/node.rb#10371 + sig { returns(Prism::Location) } def name_loc; end # attr_reader operator: Symbol # - # source://yarp//lib/prism/node.rb#8921 + # source://prism//lib/prism/node.rb#10383 + sig { returns(Symbol) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#8912 + # source://prism//lib/prism/node.rb#10374 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -12459,13 +17149,26 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#9004 + # source://prism//lib/prism/node.rb#10467 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#8915 + # source://prism//lib/prism/node.rb#10377 + 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#10477 + def type; end + end end # Represents the use of the `||=` operator for assignment to a local variable. @@ -12473,77 +17176,103 @@ end # target ||= value # ^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#9013 +# source://prism//lib/prism/node.rb#10486 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://yarp//lib/prism/node.rb#9030 + # source://prism//lib/prism/node.rb#10503 + 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://yarp//lib/prism/node.rb#9040 + # source://prism//lib/prism/node.rb#10513 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9045 + # source://prism//lib/prism/node.rb#10518 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#9055 + # source://prism//lib/prism/node.rb#10528 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#9050 + # source://prism//lib/prism/node.rb#10523 def compact_child_nodes; end # def copy: (**params) -> LocalVariableOrWriteNode # - # source://yarp//lib/prism/node.rb#9060 + # source://prism//lib/prism/node.rb#10533 + sig { params(params: T.untyped).returns(Prism::LocalVariableOrWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9045 + # source://prism//lib/prism/node.rb#10518 + 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://yarp//lib/prism/node.rb#9075 + # source://prism//lib/prism/node.rb#10548 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#9027 + # source://prism//lib/prism/node.rb#10500 + sig { returns(Integer) } def depth; end - # source://yarp//lib/prism/node.rb#9084 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10558 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#9024 + # source://prism//lib/prism/node.rb#10497 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#9015 + # source://prism//lib/prism/node.rb#10488 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#9080 + # source://prism//lib/prism/node.rb#10553 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#9018 + # source://prism//lib/prism/node.rb#10491 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -12561,13 +17290,26 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#9109 + # source://prism//lib/prism/node.rb#10583 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#9021 + # source://prism//lib/prism/node.rb#10494 + 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#10593 + def type; end + end end # Represents reading a local variable. Note that this requires that a local @@ -12577,62 +17319,76 @@ end # foo # ^^^ # -# source://yarp//lib/prism/node.rb#9120 +# source://prism//lib/prism/node.rb#10604 class Prism::LocalVariableReadNode < ::Prism::Node # def initialize: (name: Symbol, depth: Integer, location: Location) -> void # # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode # - # source://yarp//lib/prism/node.rb#9128 + # source://prism//lib/prism/node.rb#10612 + sig { params(name: Symbol, depth: Integer, location: Prism::Location).void } def initialize(name, depth, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#9135 + # source://prism//lib/prism/node.rb#10619 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9140 + # source://prism//lib/prism/node.rb#10624 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#9150 + # source://prism//lib/prism/node.rb#10634 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#9145 + # source://prism//lib/prism/node.rb#10629 def compact_child_nodes; end # def copy: (**params) -> LocalVariableReadNode # - # source://yarp//lib/prism/node.rb#9155 + # source://prism//lib/prism/node.rb#10639 + sig { params(params: T.untyped).returns(Prism::LocalVariableReadNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9140 + # source://prism//lib/prism/node.rb#10624 + 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://yarp//lib/prism/node.rb#9167 + # source://prism//lib/prism/node.rb#10651 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#9125 + # source://prism//lib/prism/node.rb#10609 + sig { returns(Integer) } def depth; end - # source://yarp//lib/prism/node.rb#9171 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10656 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#9122 + # source://prism//lib/prism/node.rb#10606 + sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of @@ -12650,8 +17406,20 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#9192 + # source://prism//lib/prism/node.rb#10677 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#10687 + def type; end + end end # Represents writing to a local variable in a context that doesn't have an explicit value. @@ -12659,62 +17427,76 @@ end # foo, bar = baz # ^^^ ^^^ # -# source://yarp//lib/prism/node.rb#9201 +# source://prism//lib/prism/node.rb#10696 class Prism::LocalVariableTargetNode < ::Prism::Node # def initialize: (name: Symbol, depth: Integer, location: Location) -> void # # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode # - # source://yarp//lib/prism/node.rb#9209 + # source://prism//lib/prism/node.rb#10704 + sig { params(name: Symbol, depth: Integer, location: Prism::Location).void } def initialize(name, depth, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#9216 + # source://prism//lib/prism/node.rb#10711 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9221 + # source://prism//lib/prism/node.rb#10716 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#9231 + # source://prism//lib/prism/node.rb#10726 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#9226 + # source://prism//lib/prism/node.rb#10721 def compact_child_nodes; end # def copy: (**params) -> LocalVariableTargetNode # - # source://yarp//lib/prism/node.rb#9236 + # source://prism//lib/prism/node.rb#10731 + sig { params(params: T.untyped).returns(Prism::LocalVariableTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9221 + # source://prism//lib/prism/node.rb#10716 + 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://yarp//lib/prism/node.rb#9248 + # source://prism//lib/prism/node.rb#10743 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#9206 + # source://prism//lib/prism/node.rb#10701 + sig { returns(Integer) } def depth; end - # source://yarp//lib/prism/node.rb#9252 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10748 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#9203 + # source://prism//lib/prism/node.rb#10698 + sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of @@ -12732,8 +17514,20 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#9273 + # source://prism//lib/prism/node.rb#10769 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#10779 + def type; end + end end # Represents writing to a local variable. @@ -12741,77 +17535,103 @@ end # foo = 1 # ^^^^^^^ # -# source://yarp//lib/prism/node.rb#9282 +# source://prism//lib/prism/node.rb#10788 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://yarp//lib/prism/node.rb#9299 + # source://prism//lib/prism/node.rb#10805 + 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://yarp//lib/prism/node.rb#9309 + # source://prism//lib/prism/node.rb#10815 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9314 + # source://prism//lib/prism/node.rb#10820 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#9324 + # source://prism//lib/prism/node.rb#10830 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#9319 + # source://prism//lib/prism/node.rb#10825 def compact_child_nodes; end # def copy: (**params) -> LocalVariableWriteNode # - # source://yarp//lib/prism/node.rb#9329 + # source://prism//lib/prism/node.rb#10835 + sig { params(params: T.untyped).returns(Prism::LocalVariableWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9314 + # source://prism//lib/prism/node.rb#10820 + 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://yarp//lib/prism/node.rb#9344 + # source://prism//lib/prism/node.rb#10850 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#9287 + # source://prism//lib/prism/node.rb#10793 + sig { returns(Integer) } def depth; end - # source://yarp//lib/prism/node.rb#9353 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#10860 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#9284 + # source://prism//lib/prism/node.rb#10790 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#9290 + # source://prism//lib/prism/node.rb#10796 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#9349 + # source://prism//lib/prism/node.rb#10855 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#9296 + # source://prism//lib/prism/node.rb#10802 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -12829,124 +17649,228 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#9378 + # source://prism//lib/prism/node.rb#10885 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#9293 + # source://prism//lib/prism/node.rb#10799 + 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#10895 + def type; end + end end # This represents a location in the source. # -# source://yarp//lib/prism/parse_result.rb#41 +# 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://yarp//lib/prism/parse_result.rb#56 + # 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 - # source://yarp//lib/prism/parse_result.rb#123 + # 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://yarp//lib/prism/parse_result.rb#54 + # 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://yarp//lib/prism/parse_result.rb#64 + # source://prism//lib/prism/parse_result.rb#116 + sig { params(options: T.untyped).returns(Prism::Location) } def copy(**options); end - # source://yarp//lib/prism/parse_result.rb#115 + # 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://yarp//lib/prism/parse_result.rb#111 + # source://prism//lib/prism/parse_result.rb#181 + sig { returns(Integer) } def end_column; end # The line number where this location ends. # - # source://yarp//lib/prism/parse_result.rb#99 + # 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://yarp//lib/prism/parse_result.rb#83 + # source://prism//lib/prism/parse_result.rb#141 + sig { returns(Integer) } def end_offset; end # Returns a string representation of this location. # - # source://yarp//lib/prism/parse_result.rb#73 + # 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://yarp//lib/prism/parse_result.rb#132 + # source://prism//lib/prism/parse_result.rb#211 def join(other); end # The length of this location in bytes. # - # source://yarp//lib/prism/parse_result.rb#51 + # source://prism//lib/prism/parse_result.rb#101 def length; end - # source://yarp//lib/prism/parse_result.rb#119 + # 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://yarp//lib/prism/parse_result.rb#78 + # 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://yarp//lib/prism/parse_result.rb#105 + # source://prism//lib/prism/parse_result.rb#169 + sig { returns(Integer) } def start_column; end # The line number where this location starts. # - # source://yarp//lib/prism/parse_result.rb#88 + # 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://yarp//lib/prism/parse_result.rb#93 + # 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://yarp//lib/prism/parse_result.rb#48 + # source://prism//lib/prism/parse_result.rb#98 + sig { returns(Integer) } def start_offset; end protected # Returns the value of attribute source. # - # source://yarp//lib/prism/parse_result.rb#44 + # source://prism//lib/prism/parse_result.rb#94 def source; end class << self - # source://yarp//lib/prism/parse_result.rb#139 + # 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 -# source://yarp//lib/prism/node.rb#14500 +# Flags for while and until loop nodes. +# +# source://prism//lib/prism/node.rb#16635 module Prism::LoopFlags; end # a loop after a begin statement, so the body is executed first before the condition # -# source://yarp//lib/prism/node.rb#14502 +# source://prism//lib/prism/node.rb#16637 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#282 +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#290 + def initialize(key_loc, value_loc); end + + # Implement the hash pattern matching interface for MagicComment. + # + # source://prism//lib/prism/parse_result.rb#306 + def deconstruct_keys(keys); end + + # Returns a string representation of this magic comment. + # + # source://prism//lib/prism/parse_result.rb#311 + def inspect; end + + # Returns the key of the magic comment by slicing it from the source code. + # + # source://prism//lib/prism/parse_result.rb#296 + def key; end + + # A Location object representing the location of the key in the source. + # + # source://prism//lib/prism/parse_result.rb#284 + 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#301 + def value; end + + # A Location object representing the location of the value in the source. + # + # source://prism//lib/prism/parse_result.rb#287 + 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. @@ -12954,124 +17878,159 @@ Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) # if /foo/i then end # ^^^^^^ # -# source://yarp//lib/prism/node.rb#9389 +# source://prism//lib/prism/node.rb#10906 class Prism::MatchLastLineNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void # # @return [MatchLastLineNode] a new instance of MatchLastLineNode # - # source://yarp//lib/prism/node.rb#9406 + # source://prism//lib/prism/node.rb#10923 + sig do + params( + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + flags: Integer, + location: Prism::Location + ).void + end def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#9416 + # source://prism//lib/prism/node.rb#10933 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def ascii_8bit?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#9491 + # source://prism//lib/prism/node.rb#11013 + sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9421 + # source://prism//lib/prism/node.rb#10938 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://yarp//lib/prism/node.rb#9466 + # source://prism//lib/prism/node.rb#10983 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://yarp//lib/prism/node.rb#9397 + # source://prism//lib/prism/node.rb#10914 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#9431 + # source://prism//lib/prism/node.rb#10948 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#9426 + # source://prism//lib/prism/node.rb#10943 def compact_child_nodes; end # def content: () -> String # - # source://yarp//lib/prism/node.rb#9461 + # source://prism//lib/prism/node.rb#10978 + sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://yarp//lib/prism/node.rb#9394 + # source://prism//lib/prism/node.rb#10911 + sig { returns(Prism::Location) } def content_loc; end # def copy: (**params) -> MatchLastLineNode # - # source://yarp//lib/prism/node.rb#9436 + # source://prism//lib/prism/node.rb#10953 + sig { params(params: T.untyped).returns(Prism::MatchLastLineNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9421 + # source://prism//lib/prism/node.rb#10938 + 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://yarp//lib/prism/node.rb#9451 + # source://prism//lib/prism/node.rb#10968 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#9486 + # source://prism//lib/prism/node.rb#11008 + sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#9476 + # source://prism//lib/prism/node.rb#10993 + sig { returns(T::Boolean) } def extended?; end # def ignore_case?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#9471 + # source://prism//lib/prism/node.rb#10988 + sig { returns(T::Boolean) } def ignore_case?; end - # source://yarp//lib/prism/node.rb#9510 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11028 def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#9481 + # source://prism//lib/prism/node.rb#10998 + sig { returns(T::Boolean) } def multi_line?; end # def once?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#9506 + # source://prism//lib/prism/node.rb#11003 + sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://yarp//lib/prism/node.rb#9456 + # source://prism//lib/prism/node.rb#10973 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://yarp//lib/prism/node.rb#9391 + # source://prism//lib/prism/node.rb#10908 + sig { returns(Prism::Location) } def opening_loc; end # Sometimes you want to check an instance of a node against a list of @@ -13089,34 +18048,50 @@ class Prism::MatchLastLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#9535 + # source://prism//lib/prism/node.rb#11053 def type; end # attr_reader unescaped: String # - # source://yarp//lib/prism/node.rb#9400 + # source://prism//lib/prism/node.rb#10917 + sig { returns(String) } def unescaped; end # def utf_8?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#9501 + # source://prism//lib/prism/node.rb#11023 + sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#9496 + # source://prism//lib/prism/node.rb#11018 + sig { returns(T::Boolean) } def windows_31j?; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#9403 + # source://prism//lib/prism/node.rb#10920 + 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#11063 + def type; end + end end # Represents the use of the modifier `in` operator. @@ -13124,67 +18099,89 @@ end # foo in bar # ^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#9544 +# source://prism//lib/prism/node.rb#11072 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://yarp//lib/prism/node.rb#9555 + # source://prism//lib/prism/node.rb#11083 + 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://yarp//lib/prism/node.rb#9563 + # source://prism//lib/prism/node.rb#11091 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9568 + # source://prism//lib/prism/node.rb#11096 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#9578 + # source://prism//lib/prism/node.rb#11106 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#9573 + # source://prism//lib/prism/node.rb#11101 def compact_child_nodes; end # def copy: (**params) -> MatchPredicateNode # - # source://yarp//lib/prism/node.rb#9583 + # source://prism//lib/prism/node.rb#11111 + sig { params(params: T.untyped).returns(Prism::MatchPredicateNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9568 + # source://prism//lib/prism/node.rb#11096 + 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://yarp//lib/prism/node.rb#9596 + # source://prism//lib/prism/node.rb#11124 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#9605 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11134 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#9601 + # source://prism//lib/prism/node.rb#11129 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#9552 + # source://prism//lib/prism/node.rb#11080 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Node # - # source://yarp//lib/prism/node.rb#9549 + # source://prism//lib/prism/node.rb#11077 + sig { returns(Prism::Node) } def pattern; end # Sometimes you want to check an instance of a node against a list of @@ -13202,13 +18199,26 @@ class Prism::MatchPredicateNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#9629 + # source://prism//lib/prism/node.rb#11158 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#9546 + # source://prism//lib/prism/node.rb#11074 + 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#11168 + def type; end + end end # Represents the use of the `=>` operator. @@ -13216,67 +18226,89 @@ end # foo => bar # ^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#9638 +# source://prism//lib/prism/node.rb#11177 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://yarp//lib/prism/node.rb#9649 + # source://prism//lib/prism/node.rb#11188 + 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://yarp//lib/prism/node.rb#9657 + # source://prism//lib/prism/node.rb#11196 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9662 + # source://prism//lib/prism/node.rb#11201 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#9672 + # source://prism//lib/prism/node.rb#11211 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#9667 + # source://prism//lib/prism/node.rb#11206 def compact_child_nodes; end # def copy: (**params) -> MatchRequiredNode # - # source://yarp//lib/prism/node.rb#9677 + # source://prism//lib/prism/node.rb#11216 + sig { params(params: T.untyped).returns(Prism::MatchRequiredNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9662 + # source://prism//lib/prism/node.rb#11201 + 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://yarp//lib/prism/node.rb#9690 + # source://prism//lib/prism/node.rb#11229 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#9699 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11239 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#9695 + # source://prism//lib/prism/node.rb#11234 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#9646 + # source://prism//lib/prism/node.rb#11185 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Node # - # source://yarp//lib/prism/node.rb#9643 + # source://prism//lib/prism/node.rb#11182 + sig { returns(Prism::Node) } def pattern; end # Sometimes you want to check an instance of a node against a list of @@ -13294,13 +18326,26 @@ class Prism::MatchRequiredNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#9723 + # source://prism//lib/prism/node.rb#11263 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#9640 + # source://prism//lib/prism/node.rb#11179 + 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#11273 + def type; end + end end # Represents writing local variables using a regular expression match with @@ -13309,63 +18354,77 @@ end # /(?bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#9733 +# source://prism//lib/prism/node.rb#11283 class Prism::MatchWriteNode < ::Prism::Node - # def initialize: (call: CallNode, locals: Array[Symbol], location: Location) -> void + # def initialize: (call: CallNode, targets: Array[Node], location: Location) -> void # # @return [MatchWriteNode] a new instance of MatchWriteNode # - # source://yarp//lib/prism/node.rb#9741 - def initialize(call, locals, location); end + # source://prism//lib/prism/node.rb#11291 + 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://yarp//lib/prism/node.rb#9748 + # source://prism//lib/prism/node.rb#11298 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader call: CallNode # - # source://yarp//lib/prism/node.rb#9735 + # source://prism//lib/prism/node.rb#11285 + sig { returns(Prism::CallNode) } def call; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9753 + # source://prism//lib/prism/node.rb#11303 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#9763 + # source://prism//lib/prism/node.rb#11313 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#9758 + # source://prism//lib/prism/node.rb#11308 def compact_child_nodes; end # def copy: (**params) -> MatchWriteNode # - # source://yarp//lib/prism/node.rb#9768 + # source://prism//lib/prism/node.rb#11318 + sig { params(params: T.untyped).returns(Prism::MatchWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9753 + # source://prism//lib/prism/node.rb#11303 + 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://yarp//lib/prism/node.rb#9780 + # source://prism//lib/prism/node.rb#11330 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#9784 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11335 def inspect(inspector = T.unsafe(nil)); end - # attr_reader locals: Array[Symbol] + # attr_reader targets: Array[Node] # - # source://yarp//lib/prism/node.rb#9738 - def locals; end + # source://prism//lib/prism/node.rb#11288 + 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 @@ -13382,59 +18441,83 @@ class Prism::MatchWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#9806 + # source://prism//lib/prism/node.rb#11357 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#11367 + def type; end + end end # Represents a node that is missing from the source and results in a syntax # error. # -# source://yarp//lib/prism/node.rb#9813 +# source://prism//lib/prism/node.rb#11374 class Prism::MissingNode < ::Prism::Node # def initialize: (location: Location) -> void # # @return [MissingNode] a new instance of MissingNode # - # source://yarp//lib/prism/node.rb#9815 + # source://prism//lib/prism/node.rb#11376 + sig { params(location: Prism::Location).void } def initialize(location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#9820 + # source://prism//lib/prism/node.rb#11381 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9825 + # source://prism//lib/prism/node.rb#11386 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#9835 + # source://prism//lib/prism/node.rb#11396 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#9830 + # source://prism//lib/prism/node.rb#11391 def compact_child_nodes; end # def copy: (**params) -> MissingNode # - # source://yarp//lib/prism/node.rb#9840 + # source://prism//lib/prism/node.rb#11401 + sig { params(params: T.untyped).returns(Prism::MissingNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9825 + # source://prism//lib/prism/node.rb#11386 + 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://yarp//lib/prism/node.rb#9850 + # source://prism//lib/prism/node.rb#11411 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#9854 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11416 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -13452,8 +18535,20 @@ class Prism::MissingNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#9873 + # source://prism//lib/prism/node.rb#11435 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#11445 + def type; end + end end # Represents a module declaration involving the `module` keyword. @@ -13461,92 +18556,122 @@ end # module Foo end # ^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#9882 +# source://prism//lib/prism/node.rb#11454 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://yarp//lib/prism/node.rb#9902 + # source://prism//lib/prism/node.rb#11474 + 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://yarp//lib/prism/node.rb#9913 + # source://prism//lib/prism/node.rb#11485 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # - # source://yarp//lib/prism/node.rb#9893 + # source://prism//lib/prism/node.rb#11465 + sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9918 + # source://prism//lib/prism/node.rb#11490 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#9931 + # source://prism//lib/prism/node.rb#11503 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#9923 + # source://prism//lib/prism/node.rb#11495 def compact_child_nodes; end # attr_reader constant_path: Node # - # source://yarp//lib/prism/node.rb#9890 + # source://prism//lib/prism/node.rb#11462 + sig { returns(Prism::Node) } def constant_path; end # def copy: (**params) -> ModuleNode # - # source://yarp//lib/prism/node.rb#9936 + # source://prism//lib/prism/node.rb#11508 + sig { params(params: T.untyped).returns(Prism::ModuleNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#9918 + # source://prism//lib/prism/node.rb#11490 + 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://yarp//lib/prism/node.rb#9952 + # source://prism//lib/prism/node.rb#11524 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#9962 + # source://prism//lib/prism/node.rb#11534 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#9896 + # source://prism//lib/prism/node.rb#11468 + sig { returns(Prism::Location) } def end_keyword_loc; end - # source://yarp//lib/prism/node.rb#9966 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11539 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://yarp//lib/prism/node.rb#9884 + # source://prism//lib/prism/node.rb#11456 + sig { returns(T::Array[Symbol]) } def locals; end # def module_keyword: () -> String # - # source://yarp//lib/prism/node.rb#9957 + # source://prism//lib/prism/node.rb#11529 + sig { returns(String) } def module_keyword; end # attr_reader module_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#9887 + # source://prism//lib/prism/node.rb#11459 + sig { returns(Prism::Location) } def module_keyword_loc; end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#9899 + # source://prism//lib/prism/node.rb#11471 + sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of @@ -13564,88 +18689,138 @@ class Prism::ModuleNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#9997 + # source://prism//lib/prism/node.rb#11570 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#11580 + def type; end + end end # Represents a multi-target expression. # -# a, b, c = 1, 2, 3 -# ^^^^^^^ +# a, (b, c) = 1, 2, 3 +# ^^^^^^ # -# source://yarp//lib/prism/node.rb#10006 +# source://prism//lib/prism/node.rb#11589 class Prism::MultiTargetNode < ::Prism::Node - # def initialize: (targets: Array[Node], lparen_loc: Location?, rparen_loc: Location?, location: Location) -> void + # 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://yarp//lib/prism/node.rb#10017 - def initialize(targets, lparen_loc, rparen_loc, location); end + # source://prism//lib/prism/node.rb#11606 + 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://yarp//lib/prism/node.rb#10025 + # source://prism//lib/prism/node.rb#11616 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10030 + # source://prism//lib/prism/node.rb#11621 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#10040 + # source://prism//lib/prism/node.rb#11635 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#10035 + # source://prism//lib/prism/node.rb#11626 def compact_child_nodes; end # def copy: (**params) -> MultiTargetNode # - # source://yarp//lib/prism/node.rb#10045 + # source://prism//lib/prism/node.rb#11640 + sig { params(params: T.untyped).returns(Prism::MultiTargetNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10030 + # source://prism//lib/prism/node.rb#11621 + 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://yarp//lib/prism/node.rb#10058 + # source://prism//lib/prism/node.rb#11655 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#10072 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11670 def inspect(inspector = T.unsafe(nil)); end + # attr_reader lefts: Array[Node] + # + # source://prism//lib/prism/node.rb#11591 + sig { returns(T::Array[Prism::Node]) } + def lefts; end + # def lparen: () -> String? # - # source://yarp//lib/prism/node.rb#10063 + # source://prism//lib/prism/node.rb#11660 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://yarp//lib/prism/node.rb#10011 + # source://prism//lib/prism/node.rb#11600 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#11594 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # attr_reader rights: Array[Node] + # + # source://prism//lib/prism/node.rb#11597 + sig { returns(T::Array[Prism::Node]) } + def rights; end + # def rparen: () -> String? # - # source://yarp//lib/prism/node.rb#10068 + # source://prism//lib/prism/node.rb#11665 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://yarp//lib/prism/node.rb#10014 + # source://prism//lib/prism/node.rb#11603 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # attr_reader targets: Array[Node] - # - # source://yarp//lib/prism/node.rb#10008 - 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 @@ -13661,8 +18836,20 @@ class Prism::MultiTargetNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#10094 + # source://prism//lib/prism/node.rb#11699 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#11709 + def type; end + end end # Represents a write to a multi-target expression. @@ -13670,89 +18857,131 @@ end # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#10103 +# source://prism//lib/prism/node.rb#11718 class Prism::MultiWriteNode < ::Prism::Node - # def initialize: (targets: Array[Node], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Node, location: Location) -> void + # 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://yarp//lib/prism/node.rb#10120 - def initialize(targets, lparen_loc, rparen_loc, operator_loc, value, location); end + # source://prism//lib/prism/node.rb#11741 + 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://yarp//lib/prism/node.rb#10130 + # source://prism//lib/prism/node.rb#11753 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10135 + # source://prism//lib/prism/node.rb#11758 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#10145 + # source://prism//lib/prism/node.rb#11773 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#10140 + # source://prism//lib/prism/node.rb#11763 def compact_child_nodes; end # def copy: (**params) -> MultiWriteNode # - # source://yarp//lib/prism/node.rb#10150 + # source://prism//lib/prism/node.rb#11778 + sig { params(params: T.untyped).returns(Prism::MultiWriteNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10135 + # source://prism//lib/prism/node.rb#11758 + 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://yarp//lib/prism/node.rb#10165 + # source://prism//lib/prism/node.rb#11795 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#10184 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11815 def inspect(inspector = T.unsafe(nil)); end + # attr_reader lefts: Array[Node] + # + # source://prism//lib/prism/node.rb#11720 + sig { returns(T::Array[Prism::Node]) } + def lefts; end + # def lparen: () -> String? # - # source://yarp//lib/prism/node.rb#10170 + # source://prism//lib/prism/node.rb#11800 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://yarp//lib/prism/node.rb#10108 + # source://prism//lib/prism/node.rb#11729 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#10180 + # source://prism//lib/prism/node.rb#11810 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#10114 + # source://prism//lib/prism/node.rb#11735 + sig { returns(Prism::Location) } def operator_loc; end + # attr_reader rest: Node? + # + # source://prism//lib/prism/node.rb#11723 + sig { returns(T.nilable(Prism::Node)) } + def rest; end + + # attr_reader rights: Array[Node] + # + # source://prism//lib/prism/node.rb#11726 + sig { returns(T::Array[Prism::Node]) } + def rights; end + # def rparen: () -> String? # - # source://yarp//lib/prism/node.rb#10175 + # source://prism//lib/prism/node.rb#11805 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://yarp//lib/prism/node.rb#10111 + # source://prism//lib/prism/node.rb#11732 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # attr_reader targets: Array[Node] - # - # source://yarp//lib/prism/node.rb#10105 - 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 @@ -13768,724 +18997,752 @@ class Prism::MultiWriteNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#10209 + # source://prism//lib/prism/node.rb#11847 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#10117 + # source://prism//lib/prism/node.rb#11738 + 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#11857 + 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://yarp//lib/prism/mutation_compiler.rb#12 +# source://prism//lib/prism/mutation_compiler.rb#12 class Prism::MutationCompiler < ::Prism::Compiler # Copy a AliasGlobalVariableNode node # - # source://yarp//lib/prism/mutation_compiler.rb#14 + # source://prism//lib/prism/mutation_compiler.rb#14 def visit_alias_global_variable_node(node); end # Copy a AliasMethodNode node # - # source://yarp//lib/prism/mutation_compiler.rb#19 + # source://prism//lib/prism/mutation_compiler.rb#19 def visit_alias_method_node(node); end # Copy a AlternationPatternNode node # - # source://yarp//lib/prism/mutation_compiler.rb#24 + # source://prism//lib/prism/mutation_compiler.rb#24 def visit_alternation_pattern_node(node); end # Copy a AndNode node # - # source://yarp//lib/prism/mutation_compiler.rb#29 + # source://prism//lib/prism/mutation_compiler.rb#29 def visit_and_node(node); end # Copy a ArgumentsNode node # - # source://yarp//lib/prism/mutation_compiler.rb#34 + # source://prism//lib/prism/mutation_compiler.rb#34 def visit_arguments_node(node); end # Copy a ArrayNode node # - # source://yarp//lib/prism/mutation_compiler.rb#39 + # source://prism//lib/prism/mutation_compiler.rb#39 def visit_array_node(node); end # Copy a ArrayPatternNode node # - # source://yarp//lib/prism/mutation_compiler.rb#44 + # source://prism//lib/prism/mutation_compiler.rb#44 def visit_array_pattern_node(node); end # Copy a AssocNode node # - # source://yarp//lib/prism/mutation_compiler.rb#49 + # source://prism//lib/prism/mutation_compiler.rb#49 def visit_assoc_node(node); end # Copy a AssocSplatNode node # - # source://yarp//lib/prism/mutation_compiler.rb#54 + # source://prism//lib/prism/mutation_compiler.rb#54 def visit_assoc_splat_node(node); end # Copy a BackReferenceReadNode node # - # source://yarp//lib/prism/mutation_compiler.rb#59 + # source://prism//lib/prism/mutation_compiler.rb#59 def visit_back_reference_read_node(node); end # Copy a BeginNode node # - # source://yarp//lib/prism/mutation_compiler.rb#64 + # source://prism//lib/prism/mutation_compiler.rb#64 def visit_begin_node(node); end # Copy a BlockArgumentNode node # - # source://yarp//lib/prism/mutation_compiler.rb#69 + # source://prism//lib/prism/mutation_compiler.rb#69 def visit_block_argument_node(node); end # Copy a BlockLocalVariableNode node # - # source://yarp//lib/prism/mutation_compiler.rb#74 + # source://prism//lib/prism/mutation_compiler.rb#74 def visit_block_local_variable_node(node); end # Copy a BlockNode node # - # source://yarp//lib/prism/mutation_compiler.rb#79 + # source://prism//lib/prism/mutation_compiler.rb#79 def visit_block_node(node); end # Copy a BlockParameterNode node # - # source://yarp//lib/prism/mutation_compiler.rb#84 + # source://prism//lib/prism/mutation_compiler.rb#84 def visit_block_parameter_node(node); end # Copy a BlockParametersNode node # - # source://yarp//lib/prism/mutation_compiler.rb#89 + # source://prism//lib/prism/mutation_compiler.rb#89 def visit_block_parameters_node(node); end # Copy a BreakNode node # - # source://yarp//lib/prism/mutation_compiler.rb#94 + # source://prism//lib/prism/mutation_compiler.rb#94 def visit_break_node(node); end # Copy a CallAndWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#99 + # source://prism//lib/prism/mutation_compiler.rb#99 def visit_call_and_write_node(node); end # Copy a CallNode node # - # source://yarp//lib/prism/mutation_compiler.rb#104 + # source://prism//lib/prism/mutation_compiler.rb#104 def visit_call_node(node); end # Copy a CallOperatorWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#109 + # source://prism//lib/prism/mutation_compiler.rb#109 def visit_call_operator_write_node(node); end # Copy a CallOrWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#114 + # source://prism//lib/prism/mutation_compiler.rb#114 def visit_call_or_write_node(node); end # Copy a CapturePatternNode node # - # source://yarp//lib/prism/mutation_compiler.rb#119 + # source://prism//lib/prism/mutation_compiler.rb#119 def visit_capture_pattern_node(node); end + # Copy a CaseMatchNode node + # + # source://prism//lib/prism/mutation_compiler.rb#124 + def visit_case_match_node(node); end + # Copy a CaseNode node # - # source://yarp//lib/prism/mutation_compiler.rb#124 + # source://prism//lib/prism/mutation_compiler.rb#129 def visit_case_node(node); end # Copy a ClassNode node # - # source://yarp//lib/prism/mutation_compiler.rb#129 + # source://prism//lib/prism/mutation_compiler.rb#134 def visit_class_node(node); end # Copy a ClassVariableAndWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#134 + # source://prism//lib/prism/mutation_compiler.rb#139 def visit_class_variable_and_write_node(node); end # Copy a ClassVariableOperatorWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#139 + # source://prism//lib/prism/mutation_compiler.rb#144 def visit_class_variable_operator_write_node(node); end # Copy a ClassVariableOrWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#144 + # source://prism//lib/prism/mutation_compiler.rb#149 def visit_class_variable_or_write_node(node); end # Copy a ClassVariableReadNode node # - # source://yarp//lib/prism/mutation_compiler.rb#149 + # source://prism//lib/prism/mutation_compiler.rb#154 def visit_class_variable_read_node(node); end # Copy a ClassVariableTargetNode node # - # source://yarp//lib/prism/mutation_compiler.rb#154 + # source://prism//lib/prism/mutation_compiler.rb#159 def visit_class_variable_target_node(node); end # Copy a ClassVariableWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#159 + # source://prism//lib/prism/mutation_compiler.rb#164 def visit_class_variable_write_node(node); end # Copy a ConstantAndWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#164 + # source://prism//lib/prism/mutation_compiler.rb#169 def visit_constant_and_write_node(node); end # Copy a ConstantOperatorWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#169 + # source://prism//lib/prism/mutation_compiler.rb#174 def visit_constant_operator_write_node(node); end # Copy a ConstantOrWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#174 + # source://prism//lib/prism/mutation_compiler.rb#179 def visit_constant_or_write_node(node); end # Copy a ConstantPathAndWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#179 + # source://prism//lib/prism/mutation_compiler.rb#184 def visit_constant_path_and_write_node(node); end # Copy a ConstantPathNode node # - # source://yarp//lib/prism/mutation_compiler.rb#184 + # source://prism//lib/prism/mutation_compiler.rb#189 def visit_constant_path_node(node); end # Copy a ConstantPathOperatorWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#189 + # source://prism//lib/prism/mutation_compiler.rb#194 def visit_constant_path_operator_write_node(node); end # Copy a ConstantPathOrWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#194 + # source://prism//lib/prism/mutation_compiler.rb#199 def visit_constant_path_or_write_node(node); end # Copy a ConstantPathTargetNode node # - # source://yarp//lib/prism/mutation_compiler.rb#199 + # source://prism//lib/prism/mutation_compiler.rb#204 def visit_constant_path_target_node(node); end # Copy a ConstantPathWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#204 + # source://prism//lib/prism/mutation_compiler.rb#209 def visit_constant_path_write_node(node); end # Copy a ConstantReadNode node # - # source://yarp//lib/prism/mutation_compiler.rb#209 + # source://prism//lib/prism/mutation_compiler.rb#214 def visit_constant_read_node(node); end # Copy a ConstantTargetNode node # - # source://yarp//lib/prism/mutation_compiler.rb#214 + # source://prism//lib/prism/mutation_compiler.rb#219 def visit_constant_target_node(node); end # Copy a ConstantWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#219 + # source://prism//lib/prism/mutation_compiler.rb#224 def visit_constant_write_node(node); end # Copy a DefNode node # - # source://yarp//lib/prism/mutation_compiler.rb#224 + # source://prism//lib/prism/mutation_compiler.rb#229 def visit_def_node(node); end # Copy a DefinedNode node # - # source://yarp//lib/prism/mutation_compiler.rb#229 + # source://prism//lib/prism/mutation_compiler.rb#234 def visit_defined_node(node); end # Copy a ElseNode node # - # source://yarp//lib/prism/mutation_compiler.rb#234 + # source://prism//lib/prism/mutation_compiler.rb#239 def visit_else_node(node); end # Copy a EmbeddedStatementsNode node # - # source://yarp//lib/prism/mutation_compiler.rb#239 + # source://prism//lib/prism/mutation_compiler.rb#244 def visit_embedded_statements_node(node); end # Copy a EmbeddedVariableNode node # - # source://yarp//lib/prism/mutation_compiler.rb#244 + # source://prism//lib/prism/mutation_compiler.rb#249 def visit_embedded_variable_node(node); end # Copy a EnsureNode node # - # source://yarp//lib/prism/mutation_compiler.rb#249 + # source://prism//lib/prism/mutation_compiler.rb#254 def visit_ensure_node(node); end # Copy a FalseNode node # - # source://yarp//lib/prism/mutation_compiler.rb#254 + # source://prism//lib/prism/mutation_compiler.rb#259 def visit_false_node(node); end # Copy a FindPatternNode node # - # source://yarp//lib/prism/mutation_compiler.rb#259 + # source://prism//lib/prism/mutation_compiler.rb#264 def visit_find_pattern_node(node); end # Copy a FlipFlopNode node # - # source://yarp//lib/prism/mutation_compiler.rb#264 + # source://prism//lib/prism/mutation_compiler.rb#269 def visit_flip_flop_node(node); end # Copy a FloatNode node # - # source://yarp//lib/prism/mutation_compiler.rb#269 + # source://prism//lib/prism/mutation_compiler.rb#274 def visit_float_node(node); end # Copy a ForNode node # - # source://yarp//lib/prism/mutation_compiler.rb#274 + # source://prism//lib/prism/mutation_compiler.rb#279 def visit_for_node(node); end # Copy a ForwardingArgumentsNode node # - # source://yarp//lib/prism/mutation_compiler.rb#279 + # source://prism//lib/prism/mutation_compiler.rb#284 def visit_forwarding_arguments_node(node); end # Copy a ForwardingParameterNode node # - # source://yarp//lib/prism/mutation_compiler.rb#284 + # source://prism//lib/prism/mutation_compiler.rb#289 def visit_forwarding_parameter_node(node); end # Copy a ForwardingSuperNode node # - # source://yarp//lib/prism/mutation_compiler.rb#289 + # source://prism//lib/prism/mutation_compiler.rb#294 def visit_forwarding_super_node(node); end # Copy a GlobalVariableAndWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#294 + # source://prism//lib/prism/mutation_compiler.rb#299 def visit_global_variable_and_write_node(node); end # Copy a GlobalVariableOperatorWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#299 + # source://prism//lib/prism/mutation_compiler.rb#304 def visit_global_variable_operator_write_node(node); end # Copy a GlobalVariableOrWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#304 + # source://prism//lib/prism/mutation_compiler.rb#309 def visit_global_variable_or_write_node(node); end # Copy a GlobalVariableReadNode node # - # source://yarp//lib/prism/mutation_compiler.rb#309 + # source://prism//lib/prism/mutation_compiler.rb#314 def visit_global_variable_read_node(node); end # Copy a GlobalVariableTargetNode node # - # source://yarp//lib/prism/mutation_compiler.rb#314 + # source://prism//lib/prism/mutation_compiler.rb#319 def visit_global_variable_target_node(node); end # Copy a GlobalVariableWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#319 + # source://prism//lib/prism/mutation_compiler.rb#324 def visit_global_variable_write_node(node); end # Copy a HashNode node # - # source://yarp//lib/prism/mutation_compiler.rb#324 + # source://prism//lib/prism/mutation_compiler.rb#329 def visit_hash_node(node); end # Copy a HashPatternNode node # - # source://yarp//lib/prism/mutation_compiler.rb#329 + # source://prism//lib/prism/mutation_compiler.rb#334 def visit_hash_pattern_node(node); end # Copy a IfNode node # - # source://yarp//lib/prism/mutation_compiler.rb#334 + # source://prism//lib/prism/mutation_compiler.rb#339 def visit_if_node(node); end # Copy a ImaginaryNode node # - # source://yarp//lib/prism/mutation_compiler.rb#339 + # source://prism//lib/prism/mutation_compiler.rb#344 def visit_imaginary_node(node); end # Copy a ImplicitNode node # - # source://yarp//lib/prism/mutation_compiler.rb#344 + # source://prism//lib/prism/mutation_compiler.rb#349 def visit_implicit_node(node); end # Copy a InNode node # - # source://yarp//lib/prism/mutation_compiler.rb#349 + # source://prism//lib/prism/mutation_compiler.rb#354 def visit_in_node(node); end + # Copy a IndexAndWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#359 + def visit_index_and_write_node(node); end + + # Copy a IndexOperatorWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#364 + def visit_index_operator_write_node(node); end + + # Copy a IndexOrWriteNode node + # + # source://prism//lib/prism/mutation_compiler.rb#369 + def visit_index_or_write_node(node); end + # Copy a InstanceVariableAndWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#354 + # source://prism//lib/prism/mutation_compiler.rb#374 def visit_instance_variable_and_write_node(node); end # Copy a InstanceVariableOperatorWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#359 + # source://prism//lib/prism/mutation_compiler.rb#379 def visit_instance_variable_operator_write_node(node); end # Copy a InstanceVariableOrWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#364 + # source://prism//lib/prism/mutation_compiler.rb#384 def visit_instance_variable_or_write_node(node); end # Copy a InstanceVariableReadNode node # - # source://yarp//lib/prism/mutation_compiler.rb#369 + # source://prism//lib/prism/mutation_compiler.rb#389 def visit_instance_variable_read_node(node); end # Copy a InstanceVariableTargetNode node # - # source://yarp//lib/prism/mutation_compiler.rb#374 + # source://prism//lib/prism/mutation_compiler.rb#394 def visit_instance_variable_target_node(node); end # Copy a InstanceVariableWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#379 + # source://prism//lib/prism/mutation_compiler.rb#399 def visit_instance_variable_write_node(node); end # Copy a IntegerNode node # - # source://yarp//lib/prism/mutation_compiler.rb#384 + # source://prism//lib/prism/mutation_compiler.rb#404 def visit_integer_node(node); end # Copy a InterpolatedMatchLastLineNode node # - # source://yarp//lib/prism/mutation_compiler.rb#389 + # source://prism//lib/prism/mutation_compiler.rb#409 def visit_interpolated_match_last_line_node(node); end # Copy a InterpolatedRegularExpressionNode node # - # source://yarp//lib/prism/mutation_compiler.rb#394 + # source://prism//lib/prism/mutation_compiler.rb#414 def visit_interpolated_regular_expression_node(node); end # Copy a InterpolatedStringNode node # - # source://yarp//lib/prism/mutation_compiler.rb#399 + # source://prism//lib/prism/mutation_compiler.rb#419 def visit_interpolated_string_node(node); end # Copy a InterpolatedSymbolNode node # - # source://yarp//lib/prism/mutation_compiler.rb#404 + # source://prism//lib/prism/mutation_compiler.rb#424 def visit_interpolated_symbol_node(node); end # Copy a InterpolatedXStringNode node # - # source://yarp//lib/prism/mutation_compiler.rb#409 + # source://prism//lib/prism/mutation_compiler.rb#429 def visit_interpolated_x_string_node(node); end # Copy a KeywordHashNode node # - # source://yarp//lib/prism/mutation_compiler.rb#414 + # source://prism//lib/prism/mutation_compiler.rb#434 def visit_keyword_hash_node(node); end - # Copy a KeywordParameterNode node - # - # source://yarp//lib/prism/mutation_compiler.rb#419 - def visit_keyword_parameter_node(node); end - # Copy a KeywordRestParameterNode node # - # source://yarp//lib/prism/mutation_compiler.rb#424 + # source://prism//lib/prism/mutation_compiler.rb#439 def visit_keyword_rest_parameter_node(node); end # Copy a LambdaNode node # - # source://yarp//lib/prism/mutation_compiler.rb#429 + # source://prism//lib/prism/mutation_compiler.rb#444 def visit_lambda_node(node); end # Copy a LocalVariableAndWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#434 + # source://prism//lib/prism/mutation_compiler.rb#449 def visit_local_variable_and_write_node(node); end # Copy a LocalVariableOperatorWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#439 + # source://prism//lib/prism/mutation_compiler.rb#454 def visit_local_variable_operator_write_node(node); end # Copy a LocalVariableOrWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#444 + # source://prism//lib/prism/mutation_compiler.rb#459 def visit_local_variable_or_write_node(node); end # Copy a LocalVariableReadNode node # - # source://yarp//lib/prism/mutation_compiler.rb#449 + # source://prism//lib/prism/mutation_compiler.rb#464 def visit_local_variable_read_node(node); end # Copy a LocalVariableTargetNode node # - # source://yarp//lib/prism/mutation_compiler.rb#454 + # source://prism//lib/prism/mutation_compiler.rb#469 def visit_local_variable_target_node(node); end # Copy a LocalVariableWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#459 + # source://prism//lib/prism/mutation_compiler.rb#474 def visit_local_variable_write_node(node); end # Copy a MatchLastLineNode node # - # source://yarp//lib/prism/mutation_compiler.rb#464 + # source://prism//lib/prism/mutation_compiler.rb#479 def visit_match_last_line_node(node); end # Copy a MatchPredicateNode node # - # source://yarp//lib/prism/mutation_compiler.rb#469 + # source://prism//lib/prism/mutation_compiler.rb#484 def visit_match_predicate_node(node); end # Copy a MatchRequiredNode node # - # source://yarp//lib/prism/mutation_compiler.rb#474 + # source://prism//lib/prism/mutation_compiler.rb#489 def visit_match_required_node(node); end # Copy a MatchWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#479 + # source://prism//lib/prism/mutation_compiler.rb#494 def visit_match_write_node(node); end # Copy a MissingNode node # - # source://yarp//lib/prism/mutation_compiler.rb#484 + # source://prism//lib/prism/mutation_compiler.rb#499 def visit_missing_node(node); end # Copy a ModuleNode node # - # source://yarp//lib/prism/mutation_compiler.rb#489 + # source://prism//lib/prism/mutation_compiler.rb#504 def visit_module_node(node); end # Copy a MultiTargetNode node # - # source://yarp//lib/prism/mutation_compiler.rb#494 + # source://prism//lib/prism/mutation_compiler.rb#509 def visit_multi_target_node(node); end # Copy a MultiWriteNode node # - # source://yarp//lib/prism/mutation_compiler.rb#499 + # source://prism//lib/prism/mutation_compiler.rb#514 def visit_multi_write_node(node); end # Copy a NextNode node # - # source://yarp//lib/prism/mutation_compiler.rb#504 + # source://prism//lib/prism/mutation_compiler.rb#519 def visit_next_node(node); end # Copy a NilNode node # - # source://yarp//lib/prism/mutation_compiler.rb#509 + # source://prism//lib/prism/mutation_compiler.rb#524 def visit_nil_node(node); end # Copy a NoKeywordsParameterNode node # - # source://yarp//lib/prism/mutation_compiler.rb#514 + # source://prism//lib/prism/mutation_compiler.rb#529 def visit_no_keywords_parameter_node(node); end # Copy a NumberedReferenceReadNode node # - # source://yarp//lib/prism/mutation_compiler.rb#519 + # source://prism//lib/prism/mutation_compiler.rb#534 def visit_numbered_reference_read_node(node); end + # Copy a OptionalKeywordParameterNode node + # + # source://prism//lib/prism/mutation_compiler.rb#539 + def visit_optional_keyword_parameter_node(node); end + # Copy a OptionalParameterNode node # - # source://yarp//lib/prism/mutation_compiler.rb#524 + # source://prism//lib/prism/mutation_compiler.rb#544 def visit_optional_parameter_node(node); end # Copy a OrNode node # - # source://yarp//lib/prism/mutation_compiler.rb#529 + # source://prism//lib/prism/mutation_compiler.rb#549 def visit_or_node(node); end # Copy a ParametersNode node # - # source://yarp//lib/prism/mutation_compiler.rb#534 + # source://prism//lib/prism/mutation_compiler.rb#554 def visit_parameters_node(node); end # Copy a ParenthesesNode node # - # source://yarp//lib/prism/mutation_compiler.rb#539 + # source://prism//lib/prism/mutation_compiler.rb#559 def visit_parentheses_node(node); end # Copy a PinnedExpressionNode node # - # source://yarp//lib/prism/mutation_compiler.rb#544 + # source://prism//lib/prism/mutation_compiler.rb#564 def visit_pinned_expression_node(node); end # Copy a PinnedVariableNode node # - # source://yarp//lib/prism/mutation_compiler.rb#549 + # source://prism//lib/prism/mutation_compiler.rb#569 def visit_pinned_variable_node(node); end # Copy a PostExecutionNode node # - # source://yarp//lib/prism/mutation_compiler.rb#554 + # source://prism//lib/prism/mutation_compiler.rb#574 def visit_post_execution_node(node); end # Copy a PreExecutionNode node # - # source://yarp//lib/prism/mutation_compiler.rb#559 + # source://prism//lib/prism/mutation_compiler.rb#579 def visit_pre_execution_node(node); end # Copy a ProgramNode node # - # source://yarp//lib/prism/mutation_compiler.rb#564 + # source://prism//lib/prism/mutation_compiler.rb#584 def visit_program_node(node); end # Copy a RangeNode node # - # source://yarp//lib/prism/mutation_compiler.rb#569 + # source://prism//lib/prism/mutation_compiler.rb#589 def visit_range_node(node); end # Copy a RationalNode node # - # source://yarp//lib/prism/mutation_compiler.rb#574 + # source://prism//lib/prism/mutation_compiler.rb#594 def visit_rational_node(node); end # Copy a RedoNode node # - # source://yarp//lib/prism/mutation_compiler.rb#579 + # source://prism//lib/prism/mutation_compiler.rb#599 def visit_redo_node(node); end # Copy a RegularExpressionNode node # - # source://yarp//lib/prism/mutation_compiler.rb#584 + # source://prism//lib/prism/mutation_compiler.rb#604 def visit_regular_expression_node(node); end - # Copy a RequiredDestructuredParameterNode node + # Copy a RequiredKeywordParameterNode node # - # source://yarp//lib/prism/mutation_compiler.rb#589 - def visit_required_destructured_parameter_node(node); end + # source://prism//lib/prism/mutation_compiler.rb#609 + def visit_required_keyword_parameter_node(node); end # Copy a RequiredParameterNode node # - # source://yarp//lib/prism/mutation_compiler.rb#594 + # source://prism//lib/prism/mutation_compiler.rb#614 def visit_required_parameter_node(node); end # Copy a RescueModifierNode node # - # source://yarp//lib/prism/mutation_compiler.rb#599 + # source://prism//lib/prism/mutation_compiler.rb#619 def visit_rescue_modifier_node(node); end # Copy a RescueNode node # - # source://yarp//lib/prism/mutation_compiler.rb#604 + # source://prism//lib/prism/mutation_compiler.rb#624 def visit_rescue_node(node); end # Copy a RestParameterNode node # - # source://yarp//lib/prism/mutation_compiler.rb#609 + # source://prism//lib/prism/mutation_compiler.rb#629 def visit_rest_parameter_node(node); end # Copy a RetryNode node # - # source://yarp//lib/prism/mutation_compiler.rb#614 + # source://prism//lib/prism/mutation_compiler.rb#634 def visit_retry_node(node); end # Copy a ReturnNode node # - # source://yarp//lib/prism/mutation_compiler.rb#619 + # source://prism//lib/prism/mutation_compiler.rb#639 def visit_return_node(node); end # Copy a SelfNode node # - # source://yarp//lib/prism/mutation_compiler.rb#624 + # source://prism//lib/prism/mutation_compiler.rb#644 def visit_self_node(node); end # Copy a SingletonClassNode node # - # source://yarp//lib/prism/mutation_compiler.rb#629 + # source://prism//lib/prism/mutation_compiler.rb#649 def visit_singleton_class_node(node); end # Copy a SourceEncodingNode node # - # source://yarp//lib/prism/mutation_compiler.rb#634 + # source://prism//lib/prism/mutation_compiler.rb#654 def visit_source_encoding_node(node); end # Copy a SourceFileNode node # - # source://yarp//lib/prism/mutation_compiler.rb#639 + # source://prism//lib/prism/mutation_compiler.rb#659 def visit_source_file_node(node); end # Copy a SourceLineNode node # - # source://yarp//lib/prism/mutation_compiler.rb#644 + # source://prism//lib/prism/mutation_compiler.rb#664 def visit_source_line_node(node); end # Copy a SplatNode node # - # source://yarp//lib/prism/mutation_compiler.rb#649 + # source://prism//lib/prism/mutation_compiler.rb#669 def visit_splat_node(node); end # Copy a StatementsNode node # - # source://yarp//lib/prism/mutation_compiler.rb#654 + # source://prism//lib/prism/mutation_compiler.rb#674 def visit_statements_node(node); end - # Copy a StringConcatNode node - # - # source://yarp//lib/prism/mutation_compiler.rb#659 - def visit_string_concat_node(node); end - # Copy a StringNode node # - # source://yarp//lib/prism/mutation_compiler.rb#664 + # source://prism//lib/prism/mutation_compiler.rb#679 def visit_string_node(node); end # Copy a SuperNode node # - # source://yarp//lib/prism/mutation_compiler.rb#669 + # source://prism//lib/prism/mutation_compiler.rb#684 def visit_super_node(node); end # Copy a SymbolNode node # - # source://yarp//lib/prism/mutation_compiler.rb#674 + # source://prism//lib/prism/mutation_compiler.rb#689 def visit_symbol_node(node); end # Copy a TrueNode node # - # source://yarp//lib/prism/mutation_compiler.rb#679 + # source://prism//lib/prism/mutation_compiler.rb#694 def visit_true_node(node); end # Copy a UndefNode node # - # source://yarp//lib/prism/mutation_compiler.rb#684 + # source://prism//lib/prism/mutation_compiler.rb#699 def visit_undef_node(node); end # Copy a UnlessNode node # - # source://yarp//lib/prism/mutation_compiler.rb#689 + # source://prism//lib/prism/mutation_compiler.rb#704 def visit_unless_node(node); end # Copy a UntilNode node # - # source://yarp//lib/prism/mutation_compiler.rb#694 + # source://prism//lib/prism/mutation_compiler.rb#709 def visit_until_node(node); end # Copy a WhenNode node # - # source://yarp//lib/prism/mutation_compiler.rb#699 + # source://prism//lib/prism/mutation_compiler.rb#714 def visit_when_node(node); end # Copy a WhileNode node # - # source://yarp//lib/prism/mutation_compiler.rb#704 + # source://prism//lib/prism/mutation_compiler.rb#719 def visit_while_node(node); end # Copy a XStringNode node # - # source://yarp//lib/prism/mutation_compiler.rb#709 + # source://prism//lib/prism/mutation_compiler.rb#724 def visit_x_string_node(node); end # Copy a YieldNode node # - # source://yarp//lib/prism/mutation_compiler.rb#714 + # source://prism//lib/prism/mutation_compiler.rb#729 def visit_yield_node(node); end end @@ -14494,67 +19751,88 @@ end # next 1 # ^^^^^^ # -# source://yarp//lib/prism/node.rb#10218 +# source://prism//lib/prism/node.rb#11866 class Prism::NextNode < ::Prism::Node # def initialize: (arguments: ArgumentsNode?, keyword_loc: Location, location: Location) -> void # # @return [NextNode] a new instance of NextNode # - # source://yarp//lib/prism/node.rb#10226 + # source://prism//lib/prism/node.rb#11874 + 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://yarp//lib/prism/node.rb#10233 + # source://prism//lib/prism/node.rb#11881 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://yarp//lib/prism/node.rb#10220 + # source://prism//lib/prism/node.rb#11868 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10238 + # source://prism//lib/prism/node.rb#11886 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#10250 + # source://prism//lib/prism/node.rb#11898 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#10243 + # source://prism//lib/prism/node.rb#11891 def compact_child_nodes; end # def copy: (**params) -> NextNode # - # source://yarp//lib/prism/node.rb#10255 + # source://prism//lib/prism/node.rb#11903 + sig { params(params: T.untyped).returns(Prism::NextNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10238 + # source://prism//lib/prism/node.rb#11886 + 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://yarp//lib/prism/node.rb#10267 + # source://prism//lib/prism/node.rb#11915 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#10276 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#11925 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#10272 + # source://prism//lib/prism/node.rb#11920 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#10223 + # source://prism//lib/prism/node.rb#11871 + sig { returns(Prism::Location) } def keyword_loc; end # Sometimes you want to check an instance of a node against a list of @@ -14572,8 +19850,20 @@ class Prism::NextNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#10302 + # source://prism//lib/prism/node.rb#11951 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#11961 + def type; end + end end # Represents the use of the `nil` keyword. @@ -14581,52 +19871,64 @@ end # nil # ^^^ # -# source://yarp//lib/prism/node.rb#10311 +# source://prism//lib/prism/node.rb#11970 class Prism::NilNode < ::Prism::Node # def initialize: (location: Location) -> void # # @return [NilNode] a new instance of NilNode # - # source://yarp//lib/prism/node.rb#10313 + # source://prism//lib/prism/node.rb#11972 + sig { params(location: Prism::Location).void } def initialize(location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#10318 + # source://prism//lib/prism/node.rb#11977 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10323 + # source://prism//lib/prism/node.rb#11982 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#10333 + # source://prism//lib/prism/node.rb#11992 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#10328 + # source://prism//lib/prism/node.rb#11987 def compact_child_nodes; end # def copy: (**params) -> NilNode # - # source://yarp//lib/prism/node.rb#10338 + # source://prism//lib/prism/node.rb#11997 + sig { params(params: T.untyped).returns(Prism::NilNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10323 + # source://prism//lib/prism/node.rb#11982 + 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://yarp//lib/prism/node.rb#10348 + # source://prism//lib/prism/node.rb#12007 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#10352 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12012 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -14644,8 +19946,20 @@ class Prism::NilNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#10371 + # source://prism//lib/prism/node.rb#12031 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#12041 + def type; end + end end # Represents the use of `**nil` inside method arguments. @@ -14654,72 +19968,88 @@ end # ^^^^^ # end # -# source://yarp//lib/prism/node.rb#10381 +# source://prism//lib/prism/node.rb#12051 class Prism::NoKeywordsParameterNode < ::Prism::Node # def initialize: (operator_loc: Location, keyword_loc: Location, location: Location) -> void # # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode # - # source://yarp//lib/prism/node.rb#10389 + # source://prism//lib/prism/node.rb#12059 + 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://yarp//lib/prism/node.rb#10396 + # source://prism//lib/prism/node.rb#12066 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10401 + # source://prism//lib/prism/node.rb#12071 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#10411 + # source://prism//lib/prism/node.rb#12081 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#10406 + # source://prism//lib/prism/node.rb#12076 def compact_child_nodes; end # def copy: (**params) -> NoKeywordsParameterNode # - # source://yarp//lib/prism/node.rb#10416 + # source://prism//lib/prism/node.rb#12086 + sig { params(params: T.untyped).returns(Prism::NoKeywordsParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10401 + # source://prism//lib/prism/node.rb#12071 + 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://yarp//lib/prism/node.rb#10428 + # source://prism//lib/prism/node.rb#12098 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#10442 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12113 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#10438 + # source://prism//lib/prism/node.rb#12108 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#10386 + # source://prism//lib/prism/node.rb#12056 + sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#10433 + # source://prism//lib/prism/node.rb#12103 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#10383 + # source://prism//lib/prism/node.rb#12053 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -14737,95 +20067,125 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#10463 + # source://prism//lib/prism/node.rb#12134 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#12144 + 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://yarp//lib/prism/node.rb#11 +# source://prism//lib/prism/node.rb#11 class Prism::Node - # Returns the value of attribute location. + 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://yarp//lib/prism/node.rb#12 + # source://prism//lib/prism/node.rb#14 + sig { returns(Prism::Location) } def location; end # @return [Boolean] # - # source://yarp//lib/prism/node.rb#14 + # 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://yarp//lib/prism/node.rb#33 + # source://prism//lib/prism/node.rb#35 def pretty_print(q); end - # source://yarp//lib/prism/node.rb#18 + # source://prism//lib/prism/node.rb#20 def set_newline_flag(newline_marked); end # Slice the location of the node from the source. # - # source://yarp//lib/prism/node.rb#27 + # 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 + def to_dot; end end # This object is responsible for generating the output for the inspect method # implementations of child nodes. # -# source://yarp//lib/prism/node_inspector.rb#6 +# source://prism//lib/prism/node_inspector.rb#6 class Prism::NodeInspector # @return [NodeInspector] a new instance of NodeInspector # - # source://yarp//lib/prism/node_inspector.rb#9 + # 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://yarp//lib/prism/node_inspector.rb#15 + # 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://yarp//lib/prism/node_inspector.rb#59 + # 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://yarp//lib/prism/node_inspector.rb#54 + # 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://yarp//lib/prism/node_inspector.rb#21 + # 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://yarp//lib/prism/node_inspector.rb#31 + # 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://yarp//lib/prism/node_inspector.rb#45 + # source://prism//lib/prism/node_inspector.rb#45 + sig { params(value: Prism::Location).returns(String) } def location(value); end - # Returns the value of attribute output. - # - # source://yarp//lib/prism/node_inspector.rb#7 + # source://prism//lib/prism/node_inspector.rb#7 + sig { returns(String) } def output; end - # Returns the value of attribute prefix. - # - # source://yarp//lib/prism/node_inspector.rb#7 + # source://prism//lib/prism/node_inspector.rb#7 + sig { returns(String) } def prefix; end # Returns the output as a string. # - # source://yarp//lib/prism/node_inspector.rb#64 + # source://prism//lib/prism/node_inspector.rb#64 + sig { returns(String) } def to_str; end end @@ -14834,58 +20194,180 @@ end # $1 # ^^ # -# source://yarp//lib/prism/node.rb#10472 +# source://prism//lib/prism/node.rb#12153 class Prism::NumberedReferenceReadNode < ::Prism::Node # def initialize: (number: Integer, location: Location) -> void # # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode # - # source://yarp//lib/prism/node.rb#10477 + # source://prism//lib/prism/node.rb#12158 + sig { params(number: Integer, location: Prism::Location).void } def initialize(number, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#10483 + # source://prism//lib/prism/node.rb#12164 + sig { params(visitor: Prism::Visitor).void } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#12169 + sig { returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism//lib/prism/node.rb#12179 + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism//lib/prism/node.rb#12174 + def compact_child_nodes; end + + # def copy: (**params) -> NumberedReferenceReadNode + # + # source://prism//lib/prism/node.rb#12184 + 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#12169 + 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#12195 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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#12200 + def inspect(inspector = T.unsafe(nil)); end + + # attr_reader number: Integer + # + # source://prism//lib/prism/node.rb#12155 + 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#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 an optional keyword parameter to a method, block, or lambda definition. +# +# def a(b: 1) +# ^^^^ +# end +# +# source://prism//lib/prism/node.rb#12240 +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#12251 + 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#12259 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10488 + # source://prism//lib/prism/node.rb#12264 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#10498 + # source://prism//lib/prism/node.rb#12274 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#10493 + # source://prism//lib/prism/node.rb#12269 def compact_child_nodes; end - # def copy: (**params) -> NumberedReferenceReadNode + # def copy: (**params) -> OptionalKeywordParameterNode # - # source://yarp//lib/prism/node.rb#10503 + # source://prism//lib/prism/node.rb#12279 + sig { params(params: T.untyped).returns(Prism::OptionalKeywordParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10488 + # source://prism//lib/prism/node.rb#12264 + 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://yarp//lib/prism/node.rb#10514 + # source://prism//lib/prism/node.rb#12292 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#10518 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12297 def inspect(inspector = T.unsafe(nil)); end - # attr_reader number: Integer + # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#10474 - def number; end + # source://prism//lib/prism/node.rb#12242 + sig { returns(Symbol) } + def name; end + + # attr_reader name_loc: Location + # + # source://prism//lib/prism/node.rb#12245 + 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 @@ -14902,8 +20384,26 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#10538 + # source://prism//lib/prism/node.rb#12320 def type; end + + # attr_reader value: Node + # + # source://prism//lib/prism/node.rb#12248 + 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#12330 + def type; end + end end # Represents an optional parameter to a method, block, or lambda definition. @@ -14912,72 +20412,96 @@ end # ^^^^^ # end # -# source://yarp//lib/prism/node.rb#10548 +# source://prism//lib/prism/node.rb#12340 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://yarp//lib/prism/node.rb#10562 + # source://prism//lib/prism/node.rb#12354 + 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://yarp//lib/prism/node.rb#10571 + # source://prism//lib/prism/node.rb#12363 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10576 + # source://prism//lib/prism/node.rb#12368 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#10586 + # source://prism//lib/prism/node.rb#12378 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#10581 + # source://prism//lib/prism/node.rb#12373 def compact_child_nodes; end # def copy: (**params) -> OptionalParameterNode # - # source://yarp//lib/prism/node.rb#10591 + # source://prism//lib/prism/node.rb#12383 + sig { params(params: T.untyped).returns(Prism::OptionalParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10576 + # source://prism//lib/prism/node.rb#12368 + 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://yarp//lib/prism/node.rb#10605 + # source://prism//lib/prism/node.rb#12397 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#10614 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12407 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#10550 + # source://prism//lib/prism/node.rb#12342 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#10553 + # source://prism//lib/prism/node.rb#12345 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#10610 + # source://prism//lib/prism/node.rb#12402 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#10556 + # source://prism//lib/prism/node.rb#12348 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -14995,13 +20519,26 @@ class Prism::OptionalParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#10638 + # source://prism//lib/prism/node.rb#12431 def type; end # attr_reader value: Node # - # source://yarp//lib/prism/node.rb#10559 + # source://prism//lib/prism/node.rb#12351 + 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#12441 + def type; end + end end # Represents the use of the `||` operator or the `or` keyword. @@ -15009,72 +20546,88 @@ end # left or right # ^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#10647 +# source://prism//lib/prism/node.rb#12450 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://yarp//lib/prism/node.rb#10658 + # source://prism//lib/prism/node.rb#12461 + 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://yarp//lib/prism/node.rb#10666 + # source://prism//lib/prism/node.rb#12469 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10671 + # source://prism//lib/prism/node.rb#12474 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#10681 + # source://prism//lib/prism/node.rb#12484 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#10676 + # source://prism//lib/prism/node.rb#12479 def compact_child_nodes; end # def copy: (**params) -> OrNode # - # source://yarp//lib/prism/node.rb#10686 + # source://prism//lib/prism/node.rb#12489 + sig { params(params: T.untyped).returns(Prism::OrNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10671 + # source://prism//lib/prism/node.rb#12474 + 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://yarp//lib/prism/node.rb#10699 + # source://prism//lib/prism/node.rb#12502 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#10708 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12512 def inspect(inspector = T.unsafe(nil)); end # attr_reader left: Node # - # source://yarp//lib/prism/node.rb#10649 + # source://prism//lib/prism/node.rb#12452 + sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#10704 + # source://prism//lib/prism/node.rb#12507 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#10655 + # source://prism//lib/prism/node.rb#12458 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Node # - # source://yarp//lib/prism/node.rb#10652 + # source://prism//lib/prism/node.rb#12455 + sig { returns(Prism::Node) } def right; end # Sometimes you want to check an instance of a node against a list of @@ -15092,230 +20645,262 @@ class Prism::OrNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#10732 + # source://prism//lib/prism/node.rb#12536 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#12546 + def type; end + end end -# source://yarp//lib/prism/pack.rb#4 +# 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://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::AGNOSTIC_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::BACK = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::BER = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::BIG_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::COMMENT = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#57 +# 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://yarp//lib/prism/pack.rb#60 + # source://prism//lib/prism/pack.rb#88 def initialize(version, variant, source, type, signed, endian, size, length_type, length); end - # source://yarp//lib/prism/pack.rb#98 + # Provide a human-readable description of the directive. + # + # source://prism//lib/prism/pack.rb#130 def describe; end - # Returns the value of attribute endian. + # The type of endianness of the directive. # - # source://yarp//lib/prism/pack.rb#58 + # source://prism//lib/prism/pack.rb#76 def endian; end - # Returns the value of attribute length. + # The length of this directive (used for integers). # - # source://yarp//lib/prism/pack.rb#58 + # source://prism//lib/prism/pack.rb#85 def length; end - # Returns the value of attribute length_type. + # The length type of this directive (used for integers). # - # source://yarp//lib/prism/pack.rb#58 + # source://prism//lib/prism/pack.rb#82 def length_type; end - # Returns the value of attribute signed. + # The type of signedness of the directive. # - # source://yarp//lib/prism/pack.rb#58 + # source://prism//lib/prism/pack.rb#73 def signed; end - # Returns the value of attribute size. + # The size of the directive. # - # source://yarp//lib/prism/pack.rb#58 + # source://prism//lib/prism/pack.rb#79 def size; end - # Returns the value of attribute source. + # A byteslice of the source string that this directive represents. # - # source://yarp//lib/prism/pack.rb#58 + # source://prism//lib/prism/pack.rb#67 def source; end - # Returns the value of attribute type. + # The type of the directive. # - # source://yarp//lib/prism/pack.rb#58 + # source://prism//lib/prism/pack.rb#70 def type; end - # Returns the value of attribute variant. + # A symbol representing whether or not we are packing or unpacking. # - # source://yarp//lib/prism/pack.rb#58 + # source://prism//lib/prism/pack.rb#64 def variant; end - # Returns the value of attribute version. + # A symbol representing the version of Ruby. # - # source://yarp//lib/prism/pack.rb#58 + # source://prism//lib/prism/pack.rb#61 def version; end end -# source://yarp//lib/prism/pack.rb#72 +# 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) -# source://yarp//lib/prism/pack.rb#80 +# 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) -# source://yarp//lib/prism/pack.rb#86 +# 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://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::ENDIAN_NA = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::FLOAT = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#162 +# 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://yarp//lib/prism/pack.rb#165 + # source://prism//lib/prism/pack.rb#203 def initialize(directives, encoding); end - # source://yarp//lib/prism/pack.rb#170 + # Provide a human-readable description of the format. + # + # source://prism//lib/prism/pack.rb#209 def describe; end - # Returns the value of attribute directives. + # A list of the directives in the template. # - # source://yarp//lib/prism/pack.rb#163 + # source://prism//lib/prism/pack.rb#197 def directives; end - # Returns the value of attribute encoding. + # The encoding of the template. # - # source://yarp//lib/prism/pack.rb#163 + # source://prism//lib/prism/pack.rb#200 def encoding; end end -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::INTEGER = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::LENGTH_FIXED = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::LENGTH_MAX = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::LENGTH_NA = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::LENGTH_RELATIVE = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::LITTLE_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::MOVE = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::NATIVE_ENDIAN = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::NULL = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::SIGNED = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::SIGNED_NA = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_16 = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_32 = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_64 = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_8 = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_INT = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_LONG = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_LONG_LONG = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_NA = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_P = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::SIZE_SHORT = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::SPACE = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_BASE64 = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_FIXED = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_HEX_HIGH = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_HEX_LOW = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_LSB = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_MIME = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_MSB = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_NULL_PADDED = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_NULL_TERMINATED = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_POINTER = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_SPACE_PADDED = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::STRING_UU = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# source://prism//lib/prism/pack.rb#55 Prism::Pack::UNSIGNED = T.let(T.unsafe(nil), Symbol) -# source://yarp//lib/prism/pack.rb#54 +# 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. @@ -15324,89 +20909,124 @@ Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) # ^^^^^^^ # end # -# source://yarp//lib/prism/node.rb#10742 +# source://prism//lib/prism/node.rb#12556 class Prism::ParametersNode < ::Prism::Node # def initialize: (requireds: Array[Node], optionals: Array[Node], rest: RestParameterNode?, posts: Array[Node], keywords: Array[Node], keyword_rest: Node?, block: BlockParameterNode?, location: Location) -> void # # @return [ParametersNode] a new instance of ParametersNode # - # source://yarp//lib/prism/node.rb#10765 + # source://prism//lib/prism/node.rb#12579 + sig do + params( + requireds: T::Array[Prism::Node], + optionals: T::Array[Prism::Node], + rest: T.nilable(Prism::RestParameterNode), + 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://yarp//lib/prism/node.rb#10777 + # source://prism//lib/prism/node.rb#12591 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader block: BlockParameterNode? # - # source://yarp//lib/prism/node.rb#10762 + # source://prism//lib/prism/node.rb#12576 + sig { returns(T.nilable(Prism::BlockParameterNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10782 + # source://prism//lib/prism/node.rb#12596 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#10800 + # source://prism//lib/prism/node.rb#12614 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#10787 + # source://prism//lib/prism/node.rb#12601 def compact_child_nodes; end # def copy: (**params) -> ParametersNode # - # source://yarp//lib/prism/node.rb#10805 + # source://prism//lib/prism/node.rb#12619 + sig { params(params: T.untyped).returns(Prism::ParametersNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10782 + # source://prism//lib/prism/node.rb#12596 + 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://yarp//lib/prism/node.rb#10822 + # source://prism//lib/prism/node.rb#12636 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#10826 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12641 def inspect(inspector = T.unsafe(nil)); end # attr_reader keyword_rest: Node? # - # source://yarp//lib/prism/node.rb#10759 + # source://prism//lib/prism/node.rb#12573 + sig { returns(T.nilable(Prism::Node)) } def keyword_rest; end # attr_reader keywords: Array[Node] # - # source://yarp//lib/prism/node.rb#10756 + # source://prism//lib/prism/node.rb#12570 + sig { returns(T::Array[Prism::Node]) } def keywords; end # attr_reader optionals: Array[Node] # - # source://yarp//lib/prism/node.rb#10747 + # source://prism//lib/prism/node.rb#12561 + sig { returns(T::Array[Prism::Node]) } def optionals; end # attr_reader posts: Array[Node] # - # source://yarp//lib/prism/node.rb#10753 + # source://prism//lib/prism/node.rb#12567 + sig { returns(T::Array[Prism::Node]) } def posts; end # attr_reader requireds: Array[Node] # - # source://yarp//lib/prism/node.rb#10744 + # source://prism//lib/prism/node.rb#12558 + sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader rest: RestParameterNode? # - # source://yarp//lib/prism/node.rb#10750 + # source://prism//lib/prism/node.rb#12564 + sig { returns(T.nilable(Prism::RestParameterNode)) } def rest; end + # Mirrors the Method#parameters method. + # + # source://prism//lib/prism/node_ext.rb#124 + 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 @@ -15422,8 +21042,20 @@ class Prism::ParametersNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#10867 + # source://prism//lib/prism/node.rb#12682 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#12692 + def type; end + end end # Represents a parenthesized expression @@ -15431,80 +21063,104 @@ end # (10 + 34) # ^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#10876 +# source://prism//lib/prism/node.rb#12701 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://yarp//lib/prism/node.rb#10887 + # source://prism//lib/prism/node.rb#12712 + 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://yarp//lib/prism/node.rb#10895 + # source://prism//lib/prism/node.rb#12720 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # - # source://yarp//lib/prism/node.rb#10878 + # source://prism//lib/prism/node.rb#12703 + sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10904 + # source://prism//lib/prism/node.rb#12729 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://yarp//lib/prism/node.rb#10944 + # source://prism//lib/prism/node.rb#12769 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://yarp//lib/prism/node.rb#10884 + # source://prism//lib/prism/node.rb#12709 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#10916 + # source://prism//lib/prism/node.rb#12741 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#10909 + # source://prism//lib/prism/node.rb#12734 def compact_child_nodes; end # def copy: (**params) -> ParenthesesNode # - # source://yarp//lib/prism/node.rb#10921 + # source://prism//lib/prism/node.rb#12746 + sig { params(params: T.untyped).returns(Prism::ParenthesesNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#10904 + # source://prism//lib/prism/node.rb#12729 + 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://yarp//lib/prism/node.rb#10934 + # source://prism//lib/prism/node.rb#12759 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#10948 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12774 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://yarp//lib/prism/node.rb#10939 + # source://prism//lib/prism/node.rb#12764 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://yarp//lib/prism/node.rb#10881 + # source://prism//lib/prism/node.rb#12706 + sig { returns(Prism::Location) } def opening_loc; end - # source://yarp//lib/prism/node.rb#10899 + # source://prism//lib/prism/node.rb#12724 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -15522,33 +21178,53 @@ class Prism::ParenthesesNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#10975 + # source://prism//lib/prism/node.rb#12801 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#12811 + def type; end + end end # This represents an error that was encountered during parsing. # -# source://yarp//lib/prism/parse_result.rb#170 +# source://prism//lib/prism/parse_result.rb#317 class Prism::ParseError + # Create a new error object with the given message and location. + # # @return [ParseError] a new instance of ParseError # - # source://yarp//lib/prism/parse_result.rb#173 + # source://prism//lib/prism/parse_result.rb#325 def initialize(message, location); end - # source://yarp//lib/prism/parse_result.rb#178 + # Implement the hash pattern matching interface for ParseError. + # + # source://prism//lib/prism/parse_result.rb#331 def deconstruct_keys(keys); end - # source://yarp//lib/prism/parse_result.rb#182 + # Returns a string representation of this error. + # + # source://prism//lib/prism/parse_result.rb#336 def inspect; end - # Returns the value of attribute location. + # A Location object representing the location of this error in the source. # - # source://yarp//lib/prism/parse_result.rb#171 + # source://prism//lib/prism/parse_result.rb#322 + sig { returns(Prism::Location) } def location; end - # Returns the value of attribute message. + # The message associated with this error. # - # source://yarp//lib/prism/parse_result.rb#171 + # source://prism//lib/prism/parse_result.rb#319 + sig { returns(String) } def message; end end @@ -15556,59 +21232,81 @@ end # the AST, any comments that were encounters, and any errors that were # encountered. # -# source://yarp//lib/prism/parse_result.rb#208 +# source://prism//lib/prism/parse_result.rb#369 class Prism::ParseResult + # Create a new parse result object with the given values. + # # @return [ParseResult] a new instance of ParseResult # - # source://yarp//lib/prism/parse_result.rb#211 - def initialize(value, comments, errors, warnings, source); end + # source://prism//lib/prism/parse_result.rb#391 + def initialize(value, comments, magic_comments, errors, warnings, source); end # Attach the list of comments to their respective locations in the tree. # - # source://yarp//lib/prism/parse_result/comments.rb#168 + # source://prism//lib/prism/parse_result/comments.rb#173 def attach_comments!; end - # Returns the value of attribute comments. + # The list of comments that were encountered during parsing. # - # source://yarp//lib/prism/parse_result.rb#209 + # source://prism//lib/prism/parse_result.rb#376 + sig { returns(T::Array[Prism::Comment]) } def comments; end - # source://yarp//lib/prism/parse_result.rb#219 + # Implement the hash pattern matching interface for ParseResult. + # + # source://prism//lib/prism/parse_result.rb#401 def deconstruct_keys(keys); end - # Returns the value of attribute errors. + # The list of errors that were generated during parsing. # - # source://yarp//lib/prism/parse_result.rb#209 + # source://prism//lib/prism/parse_result.rb#382 + 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://yarp//lib/prism/parse_result.rb#227 + # source://prism//lib/prism/parse_result.rb#413 def failure?; end + # The list of magic comments that were encountered during parsing. + # + # source://prism//lib/prism/parse_result.rb#379 + def magic_comments; end + # Walk the tree and mark nodes that are on a new line. # - # source://yarp//lib/prism/parse_result/newlines.rb#56 + # source://prism//lib/prism/parse_result/newlines.rb#60 def mark_newlines!; end - # Returns the value of attribute source. + # A Source instance that represents the source code that was parsed. # - # source://yarp//lib/prism/parse_result.rb#209 + # source://prism//lib/prism/parse_result.rb#388 + sig { returns(Prism::Source) } def source; end + # Returns true if there were no errors during parsing and false if there + # were. + # # @return [Boolean] # - # source://yarp//lib/prism/parse_result.rb#223 + # source://prism//lib/prism/parse_result.rb#407 def success?; end - # Returns the value of attribute value. + # 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://yarp//lib/prism/parse_result.rb#209 + # source://prism//lib/prism/parse_result.rb#373 + sig { returns(Prism::ProgramNode) } def value; end - # Returns the value of attribute warnings. + # The list of warnings that were generated during parsing. # - # source://yarp//lib/prism/parse_result.rb#209 + # source://prism//lib/prism/parse_result.rb#385 + sig { returns(T::Array[Prism::ParseWarning]) } def warnings; end end @@ -15627,19 +21325,25 @@ end # the comment. Otherwise it will favor attaching to the nearest location # that is after the comment. # -# source://yarp//lib/prism/parse_result/comments.rb#19 +# 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://yarp//lib/prism/parse_result/comments.rb#75 + # source://prism//lib/prism/parse_result/comments.rb#78 def initialize(parse_result); end - # source://yarp//lib/prism/parse_result/comments.rb#79 + # 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 - # Returns the value of attribute parse_result. + # The parse result that we are attaching comments to. # - # source://yarp//lib/prism/parse_result/comments.rb#73 + # source://prism//lib/prism/parse_result/comments.rb#74 def parse_result; end private @@ -15647,67 +21351,63 @@ class Prism::ParseResult::Comments # Responsible for finding the nearest targets to the given comment within # the context of the given encapsulating node. # - # source://yarp//lib/prism/parse_result/comments.rb#98 + # 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://yarp//lib/prism/parse_result/comments.rb#49 +# source://prism//lib/prism/parse_result/comments.rb#49 class Prism::ParseResult::Comments::LocationTarget # @return [LocationTarget] a new instance of LocationTarget # - # source://yarp//lib/prism/parse_result/comments.rb#52 + # source://prism//lib/prism/parse_result/comments.rb#52 def initialize(location); end - # source://yarp//lib/prism/parse_result/comments.rb#68 + # source://prism//lib/prism/parse_result/comments.rb#68 def <<(comment); end # @return [Boolean] # - # source://yarp//lib/prism/parse_result/comments.rb#64 + # source://prism//lib/prism/parse_result/comments.rb#64 def encloses?(comment); end - # source://yarp//lib/prism/parse_result/comments.rb#60 + # source://prism//lib/prism/parse_result/comments.rb#60 def end_offset; end - # Returns the value of attribute location. - # - # source://yarp//lib/prism/parse_result/comments.rb#50 + # source://prism//lib/prism/parse_result/comments.rb#50 def location; end - # source://yarp//lib/prism/parse_result/comments.rb#56 + # 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://yarp//lib/prism/parse_result/comments.rb#22 +# source://prism//lib/prism/parse_result/comments.rb#22 class Prism::ParseResult::Comments::NodeTarget # @return [NodeTarget] a new instance of NodeTarget # - # source://yarp//lib/prism/parse_result/comments.rb#25 + # source://prism//lib/prism/parse_result/comments.rb#25 def initialize(node); end - # source://yarp//lib/prism/parse_result/comments.rb#42 + # source://prism//lib/prism/parse_result/comments.rb#42 def <<(comment); end # @return [Boolean] # - # source://yarp//lib/prism/parse_result/comments.rb#37 + # source://prism//lib/prism/parse_result/comments.rb#37 def encloses?(comment); end - # source://yarp//lib/prism/parse_result/comments.rb#33 + # source://prism//lib/prism/parse_result/comments.rb#33 def end_offset; end - # Returns the value of attribute node. - # - # source://yarp//lib/prism/parse_result/comments.rb#23 + # source://prism//lib/prism/parse_result/comments.rb#23 def node; end - # source://yarp//lib/prism/parse_result/comments.rb#29 + # source://prism//lib/prism/parse_result/comments.rb#29 def start_offset; end end @@ -15727,52 +21427,72 @@ end # MarkNewlinesVisitor, since that visitor is responsible for marking the # newlines for JRuby/TruffleRuby. # -# source://yarp//lib/prism/parse_result/newlines.rb#20 +# 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://yarp//lib/prism/parse_result/newlines.rb#21 + # source://prism//lib/prism/parse_result/newlines.rb#22 def initialize(newline_marked); end - # source://yarp//lib/prism/parse_result/newlines.rb#25 + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#27 def visit_block_node(node); end - # source://yarp//lib/prism/parse_result/newlines.rb#38 + # Mark if/unless nodes as newlines. + # + # source://prism//lib/prism/parse_result/newlines.rb#41 def visit_if_node(node); end - # source://yarp//lib/prism/parse_result/newlines.rb#25 + # Permit block/lambda nodes to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#27 def visit_lambda_node(node); end - # source://yarp//lib/prism/parse_result/newlines.rb#45 + # Permit statements lists to mark newlines within themselves. + # + # source://prism//lib/prism/parse_result/newlines.rb#49 def visit_statements_node(node); end - # source://yarp//lib/prism/parse_result/newlines.rb#38 + # 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://yarp//lib/prism/parse_result.rb#188 +# source://prism//lib/prism/parse_result.rb#342 class Prism::ParseWarning + # Create a new warning object with the given message and location. + # # @return [ParseWarning] a new instance of ParseWarning # - # source://yarp//lib/prism/parse_result.rb#191 + # source://prism//lib/prism/parse_result.rb#350 def initialize(message, location); end - # source://yarp//lib/prism/parse_result.rb#196 + # Implement the hash pattern matching interface for ParseWarning. + # + # source://prism//lib/prism/parse_result.rb#356 def deconstruct_keys(keys); end - # source://yarp//lib/prism/parse_result.rb#200 + # Returns a string representation of this warning. + # + # source://prism//lib/prism/parse_result.rb#361 def inspect; end - # Returns the value of attribute location. + # A Location object representing the location of this warning in the source. # - # source://yarp//lib/prism/parse_result.rb#189 + # source://prism//lib/prism/parse_result.rb#347 + sig { returns(Prism::Location) } def location; end - # Returns the value of attribute message. + # The message associated with this warning. # - # source://yarp//lib/prism/parse_result.rb#189 + # source://prism//lib/prism/parse_result.rb#344 + sig { returns(String) } def message; end end @@ -15785,7 +21505,7 @@ end # in ConstantPathNode[ConstantReadNode[name: :Prism], ConstantReadNode[name: :Pattern]] # end # -# the pattern is the `ConstantPathNode[...]` expression. +# 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 @@ -15810,22 +21530,33 @@ end # do not yet support) then a Prism::Pattern::CompilationError will be # raised. # -# source://yarp//lib/prism/pattern.rb#37 +# 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://yarp//lib/prism/pattern.rb#58 + # source://prism//lib/prism/pattern.rb#63 def initialize(query); end - # source://yarp//lib/prism/pattern.rb#63 + # 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 - # Returns the value of attribute query. + # The query that this pattern was initialized with. # - # source://yarp//lib/prism/pattern.rb#56 + # source://prism//lib/prism/pattern.rb#59 def query; end - # source://yarp//lib/prism/pattern.rb#68 + # 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 @@ -15833,86 +21564,89 @@ class Prism::Pattern # Shortcut for combining two procs into one that returns true if both return # true. # - # source://yarp//lib/prism/pattern.rb#84 + # 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://yarp//lib/prism/pattern.rb#90 + # source://prism//lib/prism/pattern.rb#101 def combine_or(left, right); end # in foo | bar # - # source://yarp//lib/prism/pattern.rb#125 + # source://prism//lib/prism/pattern.rb#136 def compile_alternation_pattern_node(node); end # in [foo, bar, baz] # - # source://yarp//lib/prism/pattern.rb#100 + # source://prism//lib/prism/pattern.rb#111 def compile_array_pattern_node(node); end # in Prism::ConstantReadNode # - # source://yarp//lib/prism/pattern.rb#130 + # source://prism//lib/prism/pattern.rb#141 def compile_constant_path_node(node); end # in ConstantReadNode # in String # - # source://yarp//lib/prism/pattern.rb#142 + # 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://yarp//lib/prism/pattern.rb#95 + # source://prism//lib/prism/pattern.rb#106 def compile_error(node); end # in InstanceVariableReadNode[name: Symbol] # in { name: Symbol } # - # source://yarp//lib/prism/pattern.rb#160 + # source://prism//lib/prism/pattern.rb#171 def compile_hash_pattern_node(node); end # in nil # - # source://yarp//lib/prism/pattern.rb#185 + # 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://yarp//lib/prism/pattern.rb#214 + # source://prism//lib/prism/pattern.rb#225 def compile_node(node); end # in /foo/ # - # source://yarp//lib/prism/pattern.rb#190 + # source://prism//lib/prism/pattern.rb#201 def compile_regular_expression_node(node); end # in "" # in "foo" # - # source://yarp//lib/prism/pattern.rb#198 + # source://prism//lib/prism/pattern.rb#209 def compile_string_node(node); end # in :+ # in :foo # - # source://yarp//lib/prism/pattern.rb#206 + # 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://yarp//lib/prism/pattern.rb#40 +# 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://yarp//lib/prism/pattern.rb#41 + # source://prism//lib/prism/pattern.rb#43 def initialize(repr); end end @@ -15922,87 +21656,114 @@ end # foo in ^(bar) # ^^^^^^ # -# source://yarp//lib/prism/node.rb#10985 +# source://prism//lib/prism/node.rb#12821 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://yarp//lib/prism/node.rb#10999 + # source://prism//lib/prism/node.rb#12835 + 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://yarp//lib/prism/node.rb#11008 + # source://prism//lib/prism/node.rb#12844 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11013 + # source://prism//lib/prism/node.rb#12849 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#11023 + # source://prism//lib/prism/node.rb#12859 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#11018 + # source://prism//lib/prism/node.rb#12854 def compact_child_nodes; end # def copy: (**params) -> PinnedExpressionNode # - # source://yarp//lib/prism/node.rb#11028 + # source://prism//lib/prism/node.rb#12864 + sig { params(params: T.untyped).returns(Prism::PinnedExpressionNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11013 + # source://prism//lib/prism/node.rb#12849 + 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://yarp//lib/prism/node.rb#11042 + # source://prism//lib/prism/node.rb#12878 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#10987 + # source://prism//lib/prism/node.rb#12823 + sig { returns(Prism::Node) } def expression; end - # source://yarp//lib/prism/node.rb#11061 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12898 def inspect(inspector = T.unsafe(nil)); end # def lparen: () -> String # - # source://yarp//lib/prism/node.rb#11052 + # source://prism//lib/prism/node.rb#12888 + sig { returns(String) } def lparen; end # attr_reader lparen_loc: Location # - # source://yarp//lib/prism/node.rb#10993 + # source://prism//lib/prism/node.rb#12829 + sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#11047 + # source://prism//lib/prism/node.rb#12883 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#10990 + # source://prism//lib/prism/node.rb#12826 + sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # - # source://yarp//lib/prism/node.rb#11057 + # source://prism//lib/prism/node.rb#12893 + sig { returns(String) } def rparen; end # attr_reader rparen_loc: Location # - # source://yarp//lib/prism/node.rb#10996 + # source://prism//lib/prism/node.rb#12832 + sig { returns(Prism::Location) } def rparen_loc; end # Sometimes you want to check an instance of a node against a list of @@ -16020,8 +21781,20 @@ class Prism::PinnedExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#11085 + # source://prism//lib/prism/node.rb#12922 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#12932 + def type; end + end end # Represents the use of the `^` operator for pinning a variable in a pattern @@ -16030,62 +21803,76 @@ end # foo in ^bar # ^^^^ # -# source://yarp//lib/prism/node.rb#11095 +# source://prism//lib/prism/node.rb#12942 class Prism::PinnedVariableNode < ::Prism::Node # def initialize: (variable: Node, operator_loc: Location, location: Location) -> void # # @return [PinnedVariableNode] a new instance of PinnedVariableNode # - # source://yarp//lib/prism/node.rb#11103 + # source://prism//lib/prism/node.rb#12950 + 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://yarp//lib/prism/node.rb#11110 + # source://prism//lib/prism/node.rb#12957 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11115 + # source://prism//lib/prism/node.rb#12962 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#11125 + # source://prism//lib/prism/node.rb#12972 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#11120 + # source://prism//lib/prism/node.rb#12967 def compact_child_nodes; end # def copy: (**params) -> PinnedVariableNode # - # source://yarp//lib/prism/node.rb#11130 + # source://prism//lib/prism/node.rb#12977 + sig { params(params: T.untyped).returns(Prism::PinnedVariableNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11115 + # source://prism//lib/prism/node.rb#12962 + 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://yarp//lib/prism/node.rb#11142 + # source://prism//lib/prism/node.rb#12989 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#11151 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#12999 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#11147 + # source://prism//lib/prism/node.rb#12994 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#11100 + # source://prism//lib/prism/node.rb#12947 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -16103,13 +21890,26 @@ class Prism::PinnedVariableNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#11173 + # source://prism//lib/prism/node.rb#13021 def type; end # attr_reader variable: Node # - # source://yarp//lib/prism/node.rb#11097 + # source://prism//lib/prism/node.rb#12944 + 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#13031 + def type; end + end end # Represents the use of the `END` keyword. @@ -16117,87 +21917,114 @@ end # END { foo } # ^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#11182 +# source://prism//lib/prism/node.rb#13040 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://yarp//lib/prism/node.rb#11196 + # source://prism//lib/prism/node.rb#13054 + 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://yarp//lib/prism/node.rb#11205 + # source://prism//lib/prism/node.rb#13063 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11210 + # source://prism//lib/prism/node.rb#13068 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://yarp//lib/prism/node.rb#11256 + # source://prism//lib/prism/node.rb#13114 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://yarp//lib/prism/node.rb#11193 + # source://prism//lib/prism/node.rb#13051 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#11222 + # source://prism//lib/prism/node.rb#13080 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#11215 + # source://prism//lib/prism/node.rb#13073 def compact_child_nodes; end # def copy: (**params) -> PostExecutionNode # - # source://yarp//lib/prism/node.rb#11227 + # source://prism//lib/prism/node.rb#13085 + sig { params(params: T.untyped).returns(Prism::PostExecutionNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11210 + # source://prism//lib/prism/node.rb#13068 + 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://yarp//lib/prism/node.rb#11241 + # source://prism//lib/prism/node.rb#13099 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#11260 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13119 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#11246 + # source://prism//lib/prism/node.rb#13104 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#11187 + # source://prism//lib/prism/node.rb#13045 + sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://yarp//lib/prism/node.rb#11251 + # source://prism//lib/prism/node.rb#13109 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://yarp//lib/prism/node.rb#11190 + # source://prism//lib/prism/node.rb#13048 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://yarp//lib/prism/node.rb#11184 + # source://prism//lib/prism/node.rb#13042 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of @@ -16215,8 +22042,20 @@ class Prism::PostExecutionNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#11288 + # source://prism//lib/prism/node.rb#13147 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#13157 + def type; end + end end # Represents the use of the `BEGIN` keyword. @@ -16224,87 +22063,114 @@ end # BEGIN { foo } # ^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#11297 +# source://prism//lib/prism/node.rb#13166 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://yarp//lib/prism/node.rb#11311 + # source://prism//lib/prism/node.rb#13180 + 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://yarp//lib/prism/node.rb#11320 + # source://prism//lib/prism/node.rb#13189 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11325 + # source://prism//lib/prism/node.rb#13194 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://yarp//lib/prism/node.rb#11371 + # source://prism//lib/prism/node.rb#13240 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://yarp//lib/prism/node.rb#11308 + # source://prism//lib/prism/node.rb#13177 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#11337 + # source://prism//lib/prism/node.rb#13206 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#11330 + # source://prism//lib/prism/node.rb#13199 def compact_child_nodes; end # def copy: (**params) -> PreExecutionNode # - # source://yarp//lib/prism/node.rb#11342 + # source://prism//lib/prism/node.rb#13211 + sig { params(params: T.untyped).returns(Prism::PreExecutionNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11325 + # source://prism//lib/prism/node.rb#13194 + 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://yarp//lib/prism/node.rb#11356 + # source://prism//lib/prism/node.rb#13225 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#11375 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13245 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#11361 + # source://prism//lib/prism/node.rb#13230 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#11302 + # source://prism//lib/prism/node.rb#13171 + sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://yarp//lib/prism/node.rb#11366 + # source://prism//lib/prism/node.rb#13235 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://yarp//lib/prism/node.rb#11305 + # source://prism//lib/prism/node.rb#13174 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://yarp//lib/prism/node.rb#11299 + # source://prism//lib/prism/node.rb#13168 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of @@ -16322,68 +22188,94 @@ class Prism::PreExecutionNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#11403 + # source://prism//lib/prism/node.rb#13273 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 # The top level node of any parse tree. # -# source://yarp//lib/prism/node.rb#11409 +# source://prism//lib/prism/node.rb#13289 class Prism::ProgramNode < ::Prism::Node # def initialize: (locals: Array[Symbol], statements: StatementsNode, location: Location) -> void # # @return [ProgramNode] a new instance of ProgramNode # - # source://yarp//lib/prism/node.rb#11417 + # source://prism//lib/prism/node.rb#13297 + 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://yarp//lib/prism/node.rb#11424 + # source://prism//lib/prism/node.rb#13304 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11429 + # source://prism//lib/prism/node.rb#13309 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#11439 + # source://prism//lib/prism/node.rb#13319 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#11434 + # source://prism//lib/prism/node.rb#13314 def compact_child_nodes; end # def copy: (**params) -> ProgramNode # - # source://yarp//lib/prism/node.rb#11444 + # source://prism//lib/prism/node.rb#13324 + sig { params(params: T.untyped).returns(Prism::ProgramNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11429 + # source://prism//lib/prism/node.rb#13309 + 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://yarp//lib/prism/node.rb#11456 + # source://prism//lib/prism/node.rb#13336 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#11460 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13341 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://yarp//lib/prism/node.rb#11411 + # source://prism//lib/prism/node.rb#13291 + sig { returns(T::Array[Symbol]) } def locals; end # attr_reader statements: StatementsNode # - # source://yarp//lib/prism/node.rb#11414 + # source://prism//lib/prism/node.rb#13294 + sig { returns(Prism::StatementsNode) } def statements; end # Sometimes you want to check an instance of a node against a list of @@ -16401,16 +22293,30 @@ class Prism::ProgramNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#11482 + # source://prism//lib/prism/node.rb#13363 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#13373 + def type; end + end end -# source://yarp//lib/prism/node.rb#14505 +# Flags for range and flip-flop nodes. +# +# source://prism//lib/prism/node.rb#16641 module Prism::RangeFlags; end # ... operator # -# source://yarp//lib/prism/node.rb#14507 +# source://prism//lib/prism/node.rb#16643 Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # Represents the use of the `..` or `...` operators. @@ -16421,79 +22327,104 @@ Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # c if a =~ /left/ ... b =~ /right/ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#11494 +# source://prism//lib/prism/node.rb#13385 class Prism::RangeNode < ::Prism::Node # def initialize: (left: Node?, right: Node?, operator_loc: Location, flags: Integer, location: Location) -> void # # @return [RangeNode] a new instance of RangeNode # - # source://yarp//lib/prism/node.rb#11508 + # source://prism//lib/prism/node.rb#13399 + sig do + params( + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + operator_loc: Prism::Location, + flags: Integer, + location: Prism::Location + ).void + end def initialize(left, right, operator_loc, flags, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#11517 + # source://prism//lib/prism/node.rb#13408 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11522 + # source://prism//lib/prism/node.rb#13413 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#11535 + # source://prism//lib/prism/node.rb#13426 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#11527 + # source://prism//lib/prism/node.rb#13418 def compact_child_nodes; end # def copy: (**params) -> RangeNode # - # source://yarp//lib/prism/node.rb#11540 + # source://prism//lib/prism/node.rb#13431 + sig { params(params: T.untyped).returns(Prism::RangeNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11522 + # source://prism//lib/prism/node.rb#13413 + 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://yarp//lib/prism/node.rb#11554 + # source://prism//lib/prism/node.rb#13445 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#11564 + # source://prism//lib/prism/node.rb#13455 + sig { returns(T::Boolean) } def exclude_end?; end - # source://yarp//lib/prism/node.rb#11568 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13460 def inspect(inspector = T.unsafe(nil)); end # attr_reader left: Node? # - # source://yarp//lib/prism/node.rb#11496 + # source://prism//lib/prism/node.rb#13387 + sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#11559 + # source://prism//lib/prism/node.rb#13450 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#11502 + # source://prism//lib/prism/node.rb#13393 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Node? # - # source://yarp//lib/prism/node.rb#11499 + # source://prism//lib/prism/node.rb#13390 + sig { returns(T.nilable(Prism::Node)) } def right; end # Sometimes you want to check an instance of a node against a list of @@ -16511,15 +22442,28 @@ class Prism::RangeNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#11602 + # source://prism//lib/prism/node.rb#13494 def type; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#11505 + # source://prism//lib/prism/node.rb#13396 + 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#13504 + def type; end + end end # Represents a rational number literal. @@ -16527,57 +22471,70 @@ end # 1.0r # ^^^^ # -# source://yarp//lib/prism/node.rb#11611 +# source://prism//lib/prism/node.rb#13513 class Prism::RationalNode < ::Prism::Node # def initialize: (numeric: Node, location: Location) -> void # # @return [RationalNode] a new instance of RationalNode # - # source://yarp//lib/prism/node.rb#11616 + # source://prism//lib/prism/node.rb#13518 + sig { params(numeric: Prism::Node, location: Prism::Location).void } def initialize(numeric, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#11622 + # source://prism//lib/prism/node.rb#13524 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11627 + # source://prism//lib/prism/node.rb#13529 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#11637 + # source://prism//lib/prism/node.rb#13539 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#11632 + # source://prism//lib/prism/node.rb#13534 def compact_child_nodes; end # def copy: (**params) -> RationalNode # - # source://yarp//lib/prism/node.rb#11642 + # source://prism//lib/prism/node.rb#13544 + sig { params(params: T.untyped).returns(Prism::RationalNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11627 + # source://prism//lib/prism/node.rb#13529 + 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://yarp//lib/prism/node.rb#11653 + # source://prism//lib/prism/node.rb#13555 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#11657 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13560 def inspect(inspector = T.unsafe(nil)); end # attr_reader numeric: Node # - # source://yarp//lib/prism/node.rb#11613 + # source://prism//lib/prism/node.rb#13515 + sig { returns(Prism::Node) } def numeric; end # Sometimes you want to check an instance of a node against a list of @@ -16595,13 +22552,25 @@ class Prism::RationalNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#11678 + # source://prism//lib/prism/node.rb#13581 def type; end # Returns the value of the node as a Ruby Rational. # - # source://yarp//lib/prism/node_ext.rb#40 + # source://prism//lib/prism/node_ext.rb#54 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#13591 + def type; end + end end # Represents the use of the `redo` keyword. @@ -16609,52 +22578,64 @@ end # redo # ^^^^ # -# source://yarp//lib/prism/node.rb#11687 +# source://prism//lib/prism/node.rb#13600 class Prism::RedoNode < ::Prism::Node # def initialize: (location: Location) -> void # # @return [RedoNode] a new instance of RedoNode # - # source://yarp//lib/prism/node.rb#11689 + # source://prism//lib/prism/node.rb#13602 + sig { params(location: Prism::Location).void } def initialize(location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#11694 + # source://prism//lib/prism/node.rb#13607 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11699 + # source://prism//lib/prism/node.rb#13612 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#11709 + # source://prism//lib/prism/node.rb#13622 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#11704 + # source://prism//lib/prism/node.rb#13617 def compact_child_nodes; end # def copy: (**params) -> RedoNode # - # source://yarp//lib/prism/node.rb#11714 + # source://prism//lib/prism/node.rb#13627 + sig { params(params: T.untyped).returns(Prism::RedoNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11699 + # source://prism//lib/prism/node.rb#13612 + 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://yarp//lib/prism/node.rb#11724 + # source://prism//lib/prism/node.rb#13637 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#11728 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13642 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -16672,51 +22653,65 @@ class Prism::RedoNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#11747 + # source://prism//lib/prism/node.rb#13661 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#13671 + def type; end + end end -# source://yarp//lib/prism/node.rb#14510 +# Flags for regular expression and match last line nodes. +# +# source://prism//lib/prism/node.rb#16647 module Prism::RegularExpressionFlags; end # n - forces the ASCII-8BIT encoding # -# source://yarp//lib/prism/node.rb#14524 +# source://prism//lib/prism/node.rb#16664 Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) # e - forces the EUC-JP encoding # -# source://yarp//lib/prism/node.rb#14521 +# source://prism//lib/prism/node.rb#16661 Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) # x - ignores whitespace and allows comments in regular expressions # -# source://yarp//lib/prism/node.rb#14515 +# source://prism//lib/prism/node.rb#16652 Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) # i - ignores the case of characters when matching # -# source://yarp//lib/prism/node.rb#14512 +# source://prism//lib/prism/node.rb#16649 Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) # m - allows $ to match the end of lines within strings # -# source://yarp//lib/prism/node.rb#14518 +# source://prism//lib/prism/node.rb#16655 Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) # o - only interpolates values into the regular expression once # -# source://yarp//lib/prism/node.rb#14533 +# source://prism//lib/prism/node.rb#16658 Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) # u - forces the UTF-8 encoding # -# source://yarp//lib/prism/node.rb#14530 +# source://prism//lib/prism/node.rb#16670 Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) # s - forces the Windows-31J encoding # -# source://yarp//lib/prism/node.rb#14527 +# source://prism//lib/prism/node.rb#16667 Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # Represents a regular expression literal with no interpolation. @@ -16724,132 +22719,161 @@ Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # /foo/i # ^^^^^^ # -# source://yarp//lib/prism/node.rb#11756 +# source://prism//lib/prism/node.rb#13680 class Prism::RegularExpressionNode < ::Prism::Node + include ::Prism::RegularExpressionOptions + # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, flags: Integer, location: Location) -> void # # @return [RegularExpressionNode] a new instance of RegularExpressionNode # - # source://yarp//lib/prism/node.rb#11773 + # source://prism//lib/prism/node.rb#13697 + sig do + params( + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + flags: Integer, + location: Prism::Location + ).void + end def initialize(opening_loc, content_loc, closing_loc, unescaped, flags, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#11783 + # source://prism//lib/prism/node.rb#13707 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def ascii_8bit?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#11858 + # source://prism//lib/prism/node.rb#13787 + sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11788 + # source://prism//lib/prism/node.rb#13712 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://yarp//lib/prism/node.rb#11833 + # source://prism//lib/prism/node.rb#13757 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://yarp//lib/prism/node.rb#11764 + # source://prism//lib/prism/node.rb#13688 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#11798 + # source://prism//lib/prism/node.rb#13722 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#11793 + # source://prism//lib/prism/node.rb#13717 def compact_child_nodes; end # def content: () -> String # - # source://yarp//lib/prism/node.rb#11828 + # source://prism//lib/prism/node.rb#13752 + sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://yarp//lib/prism/node.rb#11761 + # source://prism//lib/prism/node.rb#13685 + sig { returns(Prism::Location) } def content_loc; end # def copy: (**params) -> RegularExpressionNode # - # source://yarp//lib/prism/node.rb#11803 + # source://prism//lib/prism/node.rb#13727 + sig { params(params: T.untyped).returns(Prism::RegularExpressionNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11788 + # source://prism//lib/prism/node.rb#13712 + 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://yarp//lib/prism/node.rb#11818 + # source://prism//lib/prism/node.rb#13742 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#11853 + # source://prism//lib/prism/node.rb#13782 + sig { returns(T::Boolean) } def euc_jp?; end # def extended?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#11843 + # source://prism//lib/prism/node.rb#13767 + sig { returns(T::Boolean) } def extended?; end # def ignore_case?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#11838 + # source://prism//lib/prism/node.rb#13762 + sig { returns(T::Boolean) } def ignore_case?; end - # source://yarp//lib/prism/node.rb#11877 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13802 def inspect(inspector = T.unsafe(nil)); end # def multi_line?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#11848 + # source://prism//lib/prism/node.rb#13772 + sig { returns(T::Boolean) } def multi_line?; end # def once?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#11873 + # source://prism//lib/prism/node.rb#13777 + sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://yarp//lib/prism/node.rb#11823 + # source://prism//lib/prism/node.rb#13747 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://yarp//lib/prism/node.rb#11758 + # source://prism//lib/prism/node.rb#13682 + sig { returns(Prism::Location) } def opening_loc; end - # Returns a numeric value that represents the flags that were used to create - # the regular expression. - # - # source://yarp//lib/prism/node_ext.rb#48 - 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 @@ -16865,114 +22889,138 @@ class Prism::RegularExpressionNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#11902 + # source://prism//lib/prism/node.rb#13827 def type; end # attr_reader unescaped: String # - # source://yarp//lib/prism/node.rb#11767 + # source://prism//lib/prism/node.rb#13691 + sig { returns(String) } def unescaped; end # def utf_8?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#11868 + # source://prism//lib/prism/node.rb#13797 + sig { returns(T::Boolean) } def utf_8?; end # def windows_31j?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#11863 + # source://prism//lib/prism/node.rb#13792 + sig { returns(T::Boolean) } def windows_31j?; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#11770 + # source://prism//lib/prism/node.rb#13694 + 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#13837 + 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 destructured required parameter node. +# Represents a required keyword parameter to a method, block, or lambda definition. # -# def foo((bar, baz)) -# ^^^^^^^^^^ +# def a(b: ) +# ^^ # end # -# source://yarp//lib/prism/node.rb#11912 -class Prism::RequiredDestructuredParameterNode < ::Prism::Node - # def initialize: (parameters: Array[Node], opening_loc: Location, closing_loc: Location, location: Location) -> void +# source://prism//lib/prism/node.rb#13847 +class Prism::RequiredKeywordParameterNode < ::Prism::Node + # def initialize: (name: Symbol, name_loc: Location, location: Location) -> void # - # @return [RequiredDestructuredParameterNode] a new instance of RequiredDestructuredParameterNode + # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode # - # source://yarp//lib/prism/node.rb#11923 - def initialize(parameters, opening_loc, closing_loc, location); end + # source://prism//lib/prism/node.rb#13855 + 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://yarp//lib/prism/node.rb#11931 + # source://prism//lib/prism/node.rb#13862 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11936 + # source://prism//lib/prism/node.rb#13867 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end - # def closing: () -> String - # - # source://yarp//lib/prism/node.rb#11974 - def closing; end - - # attr_reader closing_loc: Location - # - # source://yarp//lib/prism/node.rb#11920 - def closing_loc; end - # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#11946 + # source://prism//lib/prism/node.rb#13877 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#11941 + # source://prism//lib/prism/node.rb#13872 def compact_child_nodes; end - # def copy: (**params) -> RequiredDestructuredParameterNode + # def copy: (**params) -> RequiredKeywordParameterNode # - # source://yarp//lib/prism/node.rb#11951 + # source://prism//lib/prism/node.rb#13882 + sig { params(params: T.untyped).returns(Prism::RequiredKeywordParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#11936 + # source://prism//lib/prism/node.rb#13867 + 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://yarp//lib/prism/node.rb#11964 + # source://prism//lib/prism/node.rb#13894 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#11978 - def inspect(inspector = T.unsafe(nil)); end - - # def opening: () -> String + # def inspect(inspector: NodeInspector) -> String # - # source://yarp//lib/prism/node.rb#11969 - def opening; end + # source://prism//lib/prism/node.rb#13899 + def inspect(inspector = T.unsafe(nil)); end - # attr_reader opening_loc: Location + # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#11917 - def opening_loc; end + # source://prism//lib/prism/node.rb#13849 + sig { returns(Symbol) } + def name; end - # attr_reader parameters: Array[Node] + # attr_reader name_loc: Location # - # source://yarp//lib/prism/node.rb#11914 - def parameters; end + # source://prism//lib/prism/node.rb#13852 + 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 @@ -16989,8 +23037,20 @@ class Prism::RequiredDestructuredParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#12000 + # source://prism//lib/prism/node.rb#13920 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#13930 + def type; end + end end # Represents a required parameter to a method, block, or lambda definition. @@ -16999,57 +23059,70 @@ end # ^ # end # -# source://yarp//lib/prism/node.rb#12010 +# source://prism//lib/prism/node.rb#13940 class Prism::RequiredParameterNode < ::Prism::Node # def initialize: (name: Symbol, location: Location) -> void # # @return [RequiredParameterNode] a new instance of RequiredParameterNode # - # source://yarp//lib/prism/node.rb#12015 + # source://prism//lib/prism/node.rb#13945 + sig { params(name: Symbol, location: Prism::Location).void } def initialize(name, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#12021 + # source://prism//lib/prism/node.rb#13951 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12026 + # source://prism//lib/prism/node.rb#13956 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#12036 + # source://prism//lib/prism/node.rb#13966 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#12031 + # source://prism//lib/prism/node.rb#13961 def compact_child_nodes; end # def copy: (**params) -> RequiredParameterNode # - # source://yarp//lib/prism/node.rb#12041 + # source://prism//lib/prism/node.rb#13971 + sig { params(params: T.untyped).returns(Prism::RequiredParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12026 + # source://prism//lib/prism/node.rb#13956 + 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://yarp//lib/prism/node.rb#12052 + # source://prism//lib/prism/node.rb#13982 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#12056 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#13987 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol # - # source://yarp//lib/prism/node.rb#12012 + # source://prism//lib/prism/node.rb#13942 + sig { returns(Symbol) } def name; end # Sometimes you want to check an instance of a node against a list of @@ -17067,84 +23140,119 @@ class Prism::RequiredParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#12076 + # source://prism//lib/prism/node.rb#14007 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#14017 + def type; end + end end # Represents an expression modified with a rescue. # -# foo rescue nil -# ^^^^^^^^^^^^^^ +# foo rescue nil +# ^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#12085 +# source://prism//lib/prism/node.rb#14026 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://yarp//lib/prism/node.rb#12096 + # source://prism//lib/prism/node.rb#14037 + 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://yarp//lib/prism/node.rb#12104 + # source://prism//lib/prism/node.rb#14045 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12113 + # source://prism//lib/prism/node.rb#14054 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#12123 + # source://prism//lib/prism/node.rb#14064 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#12118 + # source://prism//lib/prism/node.rb#14059 def compact_child_nodes; end # def copy: (**params) -> RescueModifierNode # - # source://yarp//lib/prism/node.rb#12128 + # source://prism//lib/prism/node.rb#14069 + sig { params(params: T.untyped).returns(Prism::RescueModifierNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12113 + # source://prism//lib/prism/node.rb#14054 + 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://yarp//lib/prism/node.rb#12141 + # source://prism//lib/prism/node.rb#14082 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#12087 + # source://prism//lib/prism/node.rb#14028 + sig { returns(Prism::Node) } def expression; end - # source://yarp//lib/prism/node.rb#12150 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14092 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#12146 + # source://prism//lib/prism/node.rb#14087 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#12090 + # source://prism//lib/prism/node.rb#14031 + sig { returns(Prism::Location) } def keyword_loc; end # attr_reader rescue_expression: Node # - # source://yarp//lib/prism/node.rb#12093 + # source://prism//lib/prism/node.rb#14034 + sig { returns(Prism::Node) } def rescue_expression; end - # source://yarp//lib/prism/node.rb#12108 + # source://prism//lib/prism/node.rb#14049 def set_newline_flag(newline_marked); end # Sometimes you want to check an instance of a node against a list of @@ -17162,107 +23270,149 @@ class Prism::RescueModifierNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#12174 + # source://prism//lib/prism/node.rb#14116 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#14126 + 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://yarp//lib/prism/node.rb#12189 +# source://prism//lib/prism/node.rb#14141 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://yarp//lib/prism/node.rb#12209 + # source://prism//lib/prism/node.rb#14161 + 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://yarp//lib/prism/node.rb#12220 + # source://prism//lib/prism/node.rb#14172 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12225 + # source://prism//lib/prism/node.rb#14177 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#12240 + # source://prism//lib/prism/node.rb#14192 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#12230 + # source://prism//lib/prism/node.rb#14182 def compact_child_nodes; end # attr_reader consequent: RescueNode? # - # source://yarp//lib/prism/node.rb#12206 + # source://prism//lib/prism/node.rb#14158 + sig { returns(T.nilable(Prism::RescueNode)) } def consequent; end # def copy: (**params) -> RescueNode # - # source://yarp//lib/prism/node.rb#12245 + # source://prism//lib/prism/node.rb#14197 + sig { params(params: T.untyped).returns(Prism::RescueNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12225 + # source://prism//lib/prism/node.rb#14177 + 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://yarp//lib/prism/node.rb#12261 + # source://prism//lib/prism/node.rb#14213 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#12194 + # source://prism//lib/prism/node.rb#14146 + sig { returns(T::Array[Prism::Node]) } def exceptions; end - # source://yarp//lib/prism/node.rb#12275 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14228 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#12266 + # source://prism//lib/prism/node.rb#14218 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#12191 + # source://prism//lib/prism/node.rb#14143 + sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # - # source://yarp//lib/prism/node.rb#12271 + # source://prism//lib/prism/node.rb#14223 + sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://yarp//lib/prism/node.rb#12197 + # source://prism//lib/prism/node.rb#14149 + sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader reference: Node? # - # source://yarp//lib/prism/node.rb#12200 + # source://prism//lib/prism/node.rb#14152 + sig { returns(T.nilable(Prism::Node)) } def reference; end # attr_reader statements: StatementsNode? # - # source://yarp//lib/prism/node.rb#12203 + # source://prism//lib/prism/node.rb#14155 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of @@ -17280,8 +23430,20 @@ class Prism::RescueNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#12315 + # source://prism//lib/prism/node.rb#14268 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#14278 + def type; end + end end # Represents a rest parameter to a method, block, or lambda definition. @@ -17290,72 +23452,95 @@ end # ^^ # end # -# source://yarp//lib/prism/node.rb#12325 +# source://prism//lib/prism/node.rb#14288 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://yarp//lib/prism/node.rb#12336 + # source://prism//lib/prism/node.rb#14299 + 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://yarp//lib/prism/node.rb#12344 + # source://prism//lib/prism/node.rb#14307 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12349 + # source://prism//lib/prism/node.rb#14312 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#12359 + # source://prism//lib/prism/node.rb#14322 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#12354 + # source://prism//lib/prism/node.rb#14317 def compact_child_nodes; end # def copy: (**params) -> RestParameterNode # - # source://yarp//lib/prism/node.rb#12364 + # source://prism//lib/prism/node.rb#14327 + sig { params(params: T.untyped).returns(Prism::RestParameterNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12349 + # source://prism//lib/prism/node.rb#14312 + 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://yarp//lib/prism/node.rb#12377 + # source://prism//lib/prism/node.rb#14340 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#12386 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14350 def inspect(inspector = T.unsafe(nil)); end # attr_reader name: Symbol? # - # source://yarp//lib/prism/node.rb#12327 + # source://prism//lib/prism/node.rb#14290 + sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://yarp//lib/prism/node.rb#12330 + # source://prism//lib/prism/node.rb#14293 + sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#12382 + # source://prism//lib/prism/node.rb#14345 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#12333 + # source://prism//lib/prism/node.rb#14296 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -17373,8 +23558,20 @@ class Prism::RestParameterNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#12408 + # source://prism//lib/prism/node.rb#14376 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#14386 + def type; end + end end # Represents the use of the `retry` keyword. @@ -17382,52 +23579,64 @@ end # retry # ^^^^^ # -# source://yarp//lib/prism/node.rb#12417 +# source://prism//lib/prism/node.rb#14395 class Prism::RetryNode < ::Prism::Node # def initialize: (location: Location) -> void # # @return [RetryNode] a new instance of RetryNode # - # source://yarp//lib/prism/node.rb#12419 + # source://prism//lib/prism/node.rb#14397 + sig { params(location: Prism::Location).void } def initialize(location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#12424 + # source://prism//lib/prism/node.rb#14402 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12429 + # source://prism//lib/prism/node.rb#14407 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#12439 + # source://prism//lib/prism/node.rb#14417 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#12434 + # source://prism//lib/prism/node.rb#14412 def compact_child_nodes; end # def copy: (**params) -> RetryNode # - # source://yarp//lib/prism/node.rb#12444 + # source://prism//lib/prism/node.rb#14422 + sig { params(params: T.untyped).returns(Prism::RetryNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12429 + # source://prism//lib/prism/node.rb#14407 + 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://yarp//lib/prism/node.rb#12454 + # source://prism//lib/prism/node.rb#14432 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#12458 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14437 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -17445,8 +23654,20 @@ class Prism::RetryNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#12477 + # source://prism//lib/prism/node.rb#14456 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#14466 + def type; end + end end # Represents the use of the `return` keyword. @@ -17454,67 +23675,88 @@ end # return 1 # ^^^^^^^^ # -# source://yarp//lib/prism/node.rb#12486 +# source://prism//lib/prism/node.rb#14475 class Prism::ReturnNode < ::Prism::Node # def initialize: (keyword_loc: Location, arguments: ArgumentsNode?, location: Location) -> void # # @return [ReturnNode] a new instance of ReturnNode # - # source://yarp//lib/prism/node.rb#12494 + # source://prism//lib/prism/node.rb#14483 + 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://yarp//lib/prism/node.rb#12501 + # source://prism//lib/prism/node.rb#14490 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://yarp//lib/prism/node.rb#12491 + # source://prism//lib/prism/node.rb#14480 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12506 + # source://prism//lib/prism/node.rb#14495 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#12518 + # source://prism//lib/prism/node.rb#14507 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#12511 + # source://prism//lib/prism/node.rb#14500 def compact_child_nodes; end # def copy: (**params) -> ReturnNode # - # source://yarp//lib/prism/node.rb#12523 + # source://prism//lib/prism/node.rb#14512 + sig { params(params: T.untyped).returns(Prism::ReturnNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12506 + # source://prism//lib/prism/node.rb#14495 + 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://yarp//lib/prism/node.rb#12535 + # source://prism//lib/prism/node.rb#14524 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#12544 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14534 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#12540 + # source://prism//lib/prism/node.rb#14529 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#12488 + # source://prism//lib/prism/node.rb#14477 + sig { returns(Prism::Location) } def keyword_loc; end # Sometimes you want to check an instance of a node against a list of @@ -17532,8 +23774,20 @@ class Prism::ReturnNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#12570 + # source://prism//lib/prism/node.rb#14560 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#14570 + def type; end + end end # This class is meant to provide a compatibility layer between prism and @@ -17544,79 +23798,94 @@ end # is meant as a stopgap until developers migrate to using prism. It is also # meant as a test harness for the prism parser. # -# source://yarp//lib/prism/ripper_compat.rb#13 +# source://prism//lib/prism/ripper_compat.rb#13 class Prism::RipperCompat + # Create a new RipperCompat object with the given source. + # # @return [RipperCompat] a new instance of RipperCompat # - # source://yarp//lib/prism/ripper_compat.rb#59 + # source://prism//lib/prism/ripper_compat.rb#67 def initialize(source); end - # Returns the value of attribute column. + # The current column number of the parser. # - # source://yarp//lib/prism/ripper_compat.rb#57 + # source://prism//lib/prism/ripper_compat.rb#64 def column; end - # Public interface + # True if the parser encountered an error during parsing. # # @return [Boolean] # - # source://yarp//lib/prism/ripper_compat.rb#70 + # source://prism//lib/prism/ripper_compat.rb#79 def error?; end - # Returns the value of attribute lineno. + # The current line number of the parser. # - # source://yarp//lib/prism/ripper_compat.rb#57 + # source://prism//lib/prism/ripper_compat.rb#61 def lineno; end - # source://yarp//lib/prism/ripper_compat.rb#74 + # Parse the source and return the result. + # + # source://prism//lib/prism/ripper_compat.rb#84 def parse; end - # Returns the value of attribute source. + # The source that is being parsed. # - # source://yarp//lib/prism/ripper_compat.rb#57 + # source://prism//lib/prism/ripper_compat.rb#58 def source; end - # Visitor methods + # This method is responsible for dispatching to the correct visitor method + # based on the type of the node. # - # source://yarp//lib/prism/ripper_compat.rb#82 + # source://prism//lib/prism/ripper_compat.rb#94 def visit(node); end - # source://yarp//lib/prism/ripper_compat.rb#86 + # Visit a CallNode node. + # + # source://prism//lib/prism/ripper_compat.rb#99 def visit_call_node(node); end - # source://yarp//lib/prism/ripper_compat.rb#100 + # Visit an IntegerNode node. + # + # source://prism//lib/prism/ripper_compat.rb#114 def visit_integer_node(node); end - # source://yarp//lib/prism/ripper_compat.rb#125 + # Visit a ProgramNode node. + # + # source://prism//lib/prism/ripper_compat.rb#142 def visit_program_node(node); end - # source://yarp//lib/prism/ripper_compat.rb#105 + # Visit a StatementsNode node. + # + # source://prism//lib/prism/ripper_compat.rb#120 def visit_statements_node(node); end - # source://yarp//lib/prism/ripper_compat.rb#112 + # Visit a token found during parsing. + # + # source://prism//lib/prism/ripper_compat.rb#128 def visit_token(node); end private - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def _dispatch0; end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def _dispatch1(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def _dispatch2(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def _dispatch3(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#166 + # source://prism//lib/prism/ripper_compat.rb#184 def _dispatch4(_, _, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#167 + # source://prism//lib/prism/ripper_compat.rb#185 def _dispatch5(_, _, _, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#168 + # source://prism//lib/prism/ripper_compat.rb#186 def _dispatch7(_, _, _, _, _, _, _); end # This method is responsible for updating lineno and column information @@ -17625,591 +23894,593 @@ class Prism::RipperCompat # This method could be drastically improved with some caching on the start # of every line, but for now it's good enough. # - # source://yarp//lib/prism/ripper_compat.rb#151 + # source://prism//lib/prism/ripper_compat.rb#168 def bounds(location); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_BEGIN(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_CHAR(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_END(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on___end__(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_alias(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_alias_error(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_aref(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_aref_field(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_arg_ambiguous(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_arg_paren(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_args_add(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_args_add_block(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_args_add_star(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_args_forward; end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_args_new; end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_array(_); end - # source://yarp//lib/prism/ripper_compat.rb#166 + # source://prism//lib/prism/ripper_compat.rb#184 def on_aryptn(_, _, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_assign(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_assign_error(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_assoc_new(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_assoc_splat(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_assoclist_from_args(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_backref(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_backtick(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_bare_assoc_hash(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_begin(_); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_binary(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_block_var(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_blockarg(_); end - # source://yarp//lib/prism/ripper_compat.rb#166 + # source://prism//lib/prism/ripper_compat.rb#184 def on_bodystmt(_, _, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_brace_block(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_break(_); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_call(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_case(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_class(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_class_name_error(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_comma(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_command(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#166 + # source://prism//lib/prism/ripper_compat.rb#184 def on_command_call(_, _, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_comment(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_const(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_const_path_field(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_const_path_ref(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_const_ref(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_cvar(_); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_def(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_defined(_); end - # source://yarp//lib/prism/ripper_compat.rb#167 + # source://prism//lib/prism/ripper_compat.rb#185 def on_defs(_, _, _, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_do_block(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_dot2(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_dot3(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_dyna_symbol(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_else(_); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_elsif(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_embdoc(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_embdoc_beg(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_embdoc_end(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_embexpr_beg(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_embexpr_end(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_embvar(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_ensure(_); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_excessed_comma; end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_fcall(_); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_field(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_float(_); end - # source://yarp//lib/prism/ripper_compat.rb#166 + # source://prism//lib/prism/ripper_compat.rb#184 def on_fndptn(_, _, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_for(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_gvar(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_hash(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_heredoc_beg(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_heredoc_dedent(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_heredoc_end(_); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_hshptn(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_ident(_); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_if(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_if_mod(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_ifop(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_ignored_nl(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_ignored_sp(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_imaginary(_); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_in(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_int(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_ivar(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_kw(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_kwrest_param(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_label(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_label_end(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_lambda(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_lbrace(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_lbracket(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_lparen(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_magic_comment(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_massign(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_method_add_arg(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_method_add_block(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_mlhs_add(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_mlhs_add_post(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_mlhs_add_star(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_mlhs_new; end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_mlhs_paren(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_module(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_mrhs_add(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_mrhs_add_star(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_mrhs_new; end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_mrhs_new_from_args(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_next(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_nl(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_nokw_param(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_op(_); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_opassign(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_operator_ambiguous(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_param_error(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#168 + # source://prism//lib/prism/ripper_compat.rb#186 def on_params(_, _, _, _, _, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_paren(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_parse_error(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_period(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_program(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_qsymbols_add(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_qsymbols_beg(_); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_qsymbols_new; end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_qwords_add(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_qwords_beg(_); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_qwords_new; end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_rational(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_rbrace(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_rbracket(_); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_redo; end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_regexp_add(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_regexp_beg(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_regexp_end(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_regexp_literal(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_regexp_new; end - # source://yarp//lib/prism/ripper_compat.rb#166 + # source://prism//lib/prism/ripper_compat.rb#184 def on_rescue(_, _, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_rescue_mod(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_rest_param(_); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_retry; end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_return(_); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_return0; end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_rparen(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_sclass(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_semicolon(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_sp(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_stmts_add(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_stmts_new; end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_string_add(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_string_concat(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_string_content; end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_string_dvar(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_string_embexpr(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_string_literal(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_super(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_symbeg(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_symbol(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_symbol_literal(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_symbols_add(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_symbols_beg(_); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_symbols_new; end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_tlambda(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_tlambeg(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_top_const_field(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_top_const_ref(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_tstring_beg(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_tstring_content(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_tstring_end(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_unary(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_undef(_); end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_unless(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_unless_mod(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_until(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_until_mod(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_var_alias(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_var_field(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_var_ref(_); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_vcall(_); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_void_stmt; end - # source://yarp//lib/prism/ripper_compat.rb#165 + # source://prism//lib/prism/ripper_compat.rb#183 def on_when(_, _, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_while(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_while_mod(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_word_add(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_word_new; end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_words_add(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_words_beg(_); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_words_new; end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_words_sep(_); end - # source://yarp//lib/prism/ripper_compat.rb#164 + # source://prism//lib/prism/ripper_compat.rb#182 def on_xstring_add(_, _); end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_xstring_literal(_); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_xstring_new; end - # source://yarp//lib/prism/ripper_compat.rb#163 + # source://prism//lib/prism/ripper_compat.rb#181 def on_yield(_); end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_yield0; end - # source://yarp//lib/prism/ripper_compat.rb#162 + # source://prism//lib/prism/ripper_compat.rb#180 def on_zsuper; end - # source://yarp//lib/prism/ripper_compat.rb#158 + # Lazily initialize the parse result. + # + # source://prism//lib/prism/ripper_compat.rb#176 def result; end class << self # This is a convenience method that runs the SexpBuilderPP subclass parser. # - # source://yarp//lib/prism/ripper_compat.rb#140 + # source://prism//lib/prism/ripper_compat.rb#157 def sexp(source); end # This is a convenience method that runs the SexpBuilder subclass parser. # - # source://yarp//lib/prism/ripper_compat.rb#135 + # source://prism//lib/prism/ripper_compat.rb#152 def sexp_raw(source); end end end @@ -18217,578 +24488,578 @@ end # This class mirrors the ::Ripper::SexpBuilder subclass of ::Ripper that # returns the arrays of [type, *children]. # -# source://yarp//lib/prism/ripper_compat.rb#16 +# source://prism//lib/prism/ripper_compat.rb#16 class Prism::RipperCompat::SexpBuilder < ::Prism::RipperCompat private - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_BEGIN(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_CHAR(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_END(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on___end__(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_alias(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_alias_error(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_aref(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_aref_field(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_arg_ambiguous(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_arg_paren(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_args_add(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_args_add_block(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_args_add_star(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_args_forward(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_args_new(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_array(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_aryptn(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_assign(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_assign_error(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_assoc_new(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_assoc_splat(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_assoclist_from_args(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_backref(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_backtick(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_bare_assoc_hash(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_begin(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_binary(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_block_var(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_blockarg(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_bodystmt(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_brace_block(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_break(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_call(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_case(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_class(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_class_name_error(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_comma(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_command(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_command_call(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_comment(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_const(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_const_path_field(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_const_path_ref(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_const_ref(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_cvar(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_def(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_defined(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_defs(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_do_block(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_dot2(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_dot3(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_dyna_symbol(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_else(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_elsif(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_embdoc(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_embdoc_beg(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_embdoc_end(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_embexpr_beg(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_embexpr_end(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_embvar(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_ensure(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_excessed_comma(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_fcall(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_field(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_float(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_fndptn(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_for(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_gvar(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_hash(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_heredoc_beg(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_heredoc_dedent(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_heredoc_end(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_hshptn(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_ident(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_if(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_if_mod(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_ifop(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_ignored_nl(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_ignored_sp(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_imaginary(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_in(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_int(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_ivar(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_kw(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_kwrest_param(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_label(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_label_end(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_lambda(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_lbrace(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_lbracket(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_lparen(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_magic_comment(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_massign(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_method_add_arg(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_method_add_block(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_mlhs_add(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_mlhs_add_post(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_mlhs_add_star(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_mlhs_new(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_mlhs_paren(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_module(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_mrhs_add(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_mrhs_add_star(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_mrhs_new(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_mrhs_new_from_args(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_next(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_nl(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_nokw_param(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_op(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_opassign(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_operator_ambiguous(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_param_error(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_params(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_paren(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_parse_error(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_period(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_program(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_qsymbols_add(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_qsymbols_beg(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_qsymbols_new(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_qwords_add(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_qwords_beg(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_qwords_new(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_rational(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_rbrace(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_rbracket(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_redo(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_regexp_add(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_regexp_beg(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_regexp_end(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_regexp_literal(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_regexp_new(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_rescue(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_rescue_mod(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_rest_param(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_retry(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_return(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_return0(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_rparen(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_sclass(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_semicolon(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_sp(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_stmts_add(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_stmts_new(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_string_add(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_string_concat(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_string_content(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_string_dvar(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_string_embexpr(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_string_literal(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_super(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_symbeg(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_symbol(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_symbol_literal(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_symbols_add(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_symbols_beg(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_symbols_new(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_tlambda(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_tlambeg(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_top_const_field(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_top_const_ref(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_tstring_beg(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_tstring_content(value); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_tstring_end(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_unary(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_undef(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_unless(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_unless_mod(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_until(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_until_mod(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_var_alias(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_var_field(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_var_ref(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_vcall(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_void_stmt(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_when(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_while(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_while_mod(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_word_add(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_word_new(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_words_add(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_words_beg(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_words_new(*args); end - # source://yarp//lib/prism/ripper_compat.rb#26 + # source://prism//lib/prism/ripper_compat.rb#26 def on_words_sep(value); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_xstring_add(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_xstring_literal(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_xstring_new(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_yield(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_yield0(*args); end - # source://yarp//lib/prism/ripper_compat.rb#20 + # source://prism//lib/prism/ripper_compat.rb#20 def on_zsuper(*args); end end @@ -18796,83 +25067,83 @@ end # returns the same values as ::Ripper::SexpBuilder except with a couple of # niceties that flatten linked lists into arrays. # -# source://yarp//lib/prism/ripper_compat.rb#35 +# source://prism//lib/prism/ripper_compat.rb#35 class Prism::RipperCompat::SexpBuilderPP < ::Prism::RipperCompat::SexpBuilder private - # source://yarp//lib/prism/ripper_compat.rb#38 + # source://prism//lib/prism/ripper_compat.rb#38 def _dispatch_event_new; end - # source://yarp//lib/prism/ripper_compat.rb#42 + # source://prism//lib/prism/ripper_compat.rb#42 def _dispatch_event_push(list, item); end - # source://yarp//lib/prism/ripper_compat.rb#42 + # source://prism//lib/prism/ripper_compat.rb#42 def on_args_add(list, item); end - # source://yarp//lib/prism/ripper_compat.rb#38 + # source://prism//lib/prism/ripper_compat.rb#38 def on_args_new; end - # source://yarp//lib/prism/ripper_compat.rb#42 + # source://prism//lib/prism/ripper_compat.rb#42 def on_mlhs_add(list, item); end - # source://yarp//lib/prism/ripper_compat.rb#38 + # source://prism//lib/prism/ripper_compat.rb#38 def on_mlhs_new; end - # source://yarp//lib/prism/ripper_compat.rb#42 + # source://prism//lib/prism/ripper_compat.rb#42 def on_mrhs_add(list, item); end - # source://yarp//lib/prism/ripper_compat.rb#38 + # source://prism//lib/prism/ripper_compat.rb#38 def on_mrhs_new; end - # source://yarp//lib/prism/ripper_compat.rb#42 + # source://prism//lib/prism/ripper_compat.rb#42 def on_qsymbols_add(list, item); end - # source://yarp//lib/prism/ripper_compat.rb#38 + # source://prism//lib/prism/ripper_compat.rb#38 def on_qsymbols_new; end - # source://yarp//lib/prism/ripper_compat.rb#42 + # source://prism//lib/prism/ripper_compat.rb#42 def on_qwords_add(list, item); end - # source://yarp//lib/prism/ripper_compat.rb#38 + # source://prism//lib/prism/ripper_compat.rb#38 def on_qwords_new; end - # source://yarp//lib/prism/ripper_compat.rb#42 + # source://prism//lib/prism/ripper_compat.rb#42 def on_regexp_add(list, item); end - # source://yarp//lib/prism/ripper_compat.rb#38 + # source://prism//lib/prism/ripper_compat.rb#38 def on_regexp_new; end - # source://yarp//lib/prism/ripper_compat.rb#42 + # source://prism//lib/prism/ripper_compat.rb#42 def on_stmts_add(list, item); end - # source://yarp//lib/prism/ripper_compat.rb#38 + # source://prism//lib/prism/ripper_compat.rb#38 def on_stmts_new; end - # source://yarp//lib/prism/ripper_compat.rb#42 + # source://prism//lib/prism/ripper_compat.rb#42 def on_string_add(list, item); end - # source://yarp//lib/prism/ripper_compat.rb#42 + # source://prism//lib/prism/ripper_compat.rb#42 def on_symbols_add(list, item); end - # source://yarp//lib/prism/ripper_compat.rb#38 + # source://prism//lib/prism/ripper_compat.rb#38 def on_symbols_new; end - # source://yarp//lib/prism/ripper_compat.rb#42 + # source://prism//lib/prism/ripper_compat.rb#42 def on_word_add(list, item); end - # source://yarp//lib/prism/ripper_compat.rb#38 + # source://prism//lib/prism/ripper_compat.rb#38 def on_word_new; end - # source://yarp//lib/prism/ripper_compat.rb#42 + # source://prism//lib/prism/ripper_compat.rb#42 def on_words_add(list, item); end - # source://yarp//lib/prism/ripper_compat.rb#38 + # source://prism//lib/prism/ripper_compat.rb#38 def on_words_new; end - # source://yarp//lib/prism/ripper_compat.rb#42 + # source://prism//lib/prism/ripper_compat.rb#42 def on_xstring_add(list, item); end - # source://yarp//lib/prism/ripper_compat.rb#38 + # source://prism//lib/prism/ripper_compat.rb#38 def on_xstring_new; end end @@ -18881,52 +25152,64 @@ end # self # ^^^^ # -# source://yarp//lib/prism/node.rb#12579 +# source://prism//lib/prism/node.rb#14579 class Prism::SelfNode < ::Prism::Node # def initialize: (location: Location) -> void # # @return [SelfNode] a new instance of SelfNode # - # source://yarp//lib/prism/node.rb#12581 + # source://prism//lib/prism/node.rb#14581 + sig { params(location: Prism::Location).void } def initialize(location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#12586 + # source://prism//lib/prism/node.rb#14586 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12591 + # source://prism//lib/prism/node.rb#14591 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#12601 + # source://prism//lib/prism/node.rb#14601 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#12596 + # source://prism//lib/prism/node.rb#14596 def compact_child_nodes; end # def copy: (**params) -> SelfNode # - # source://yarp//lib/prism/node.rb#12606 + # source://prism//lib/prism/node.rb#14606 + sig { params(params: T.untyped).returns(Prism::SelfNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12591 + # source://prism//lib/prism/node.rb#14591 + 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://yarp//lib/prism/node.rb#12616 + # source://prism//lib/prism/node.rb#14616 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#12620 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14621 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -18944,130 +25227,174 @@ class Prism::SelfNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#12639 + # source://prism//lib/prism/node.rb#14640 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#14650 + def type; end + end end -# source://yarp//lib/prism/serialize.rb#22 +# A module responsible for deserializing parse results. +# +# source://prism//lib/prism/serialize.rb#23 module Prism::Serialize class << self - # source://yarp//lib/prism/serialize.rb#27 + # Deserialize the AST represented by the given string into a parse result. + # + # source://prism//lib/prism/serialize.rb#37 def load(input, serialized); end - # source://yarp//lib/prism/serialize.rb#37 + # 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://yarp//lib/prism/serialize.rb#41 +# source://prism//lib/prism/serialize.rb#53 class Prism::Serialize::Loader # @return [Loader] a new instance of Loader # - # source://yarp//lib/prism/serialize.rb#45 + # source://prism//lib/prism/serialize.rb#58 def initialize(source, serialized); end # Returns the value of attribute constant_pool. # - # source://yarp//lib/prism/serialize.rb#43 + # source://prism//lib/prism/serialize.rb#55 def constant_pool; end # Returns the value of attribute constant_pool_offset. # - # source://yarp//lib/prism/serialize.rb#43 + # source://prism//lib/prism/serialize.rb#55 def constant_pool_offset; end # Returns the value of attribute encoding. # - # source://yarp//lib/prism/serialize.rb#42 + # source://prism//lib/prism/serialize.rb#54 def encoding; end # Returns the value of attribute input. # - # source://yarp//lib/prism/serialize.rb#42 + # source://prism//lib/prism/serialize.rb#54 def input; end # Returns the value of attribute io. # - # source://yarp//lib/prism/serialize.rb#42 + # source://prism//lib/prism/serialize.rb#54 def io; end - # source://yarp//lib/prism/serialize.rb#59 + # source://prism//lib/prism/serialize.rb#92 + def load_comments; end + + # source://prism//lib/prism/serialize.rb#82 def load_encoding; end - # source://yarp//lib/prism/serialize.rb#63 + # source://prism//lib/prism/serialize.rb#73 + def load_header; end + + # source://prism//lib/prism/serialize.rb#102 def load_metadata; end - # source://yarp//lib/prism/serialize.rb#96 + # source://prism//lib/prism/serialize.rb#134 def load_nodes; end - # source://yarp//lib/prism/serialize.rb#115 + # source://prism//lib/prism/serialize.rb#147 def load_result; end - # source://yarp//lib/prism/serialize.rb#70 + # source://prism//lib/prism/serialize.rb#88 + def load_start_line; end + + # source://prism//lib/prism/serialize.rb#110 def load_tokens; end - # source://yarp//lib/prism/serialize.rb#83 + # source://prism//lib/prism/serialize.rb#123 def load_tokens_result; end # Returns the value of attribute serialized. # - # source://yarp//lib/prism/serialize.rb#42 + # source://prism//lib/prism/serialize.rb#54 def serialized; end # Returns the value of attribute source. # - # source://yarp//lib/prism/serialize.rb#43 + # 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://yarp//lib/prism/serialize.rb#172 + # source://prism//lib/prism/serialize.rb#205 def load_constant(index); end - # source://yarp//lib/prism/serialize.rb#149 + # source://prism//lib/prism/serialize.rb#181 def load_embedded_string; end - # source://yarp//lib/prism/serialize.rb#164 + # source://prism//lib/prism/serialize.rb#197 def load_location; end - # source://yarp//lib/prism/serialize.rb#202 + # source://prism//lib/prism/serialize.rb#236 def load_node; end - # source://yarp//lib/prism/serialize.rb#197 + # source://prism//lib/prism/serialize.rb#230 def load_optional_constant; end - # source://yarp//lib/prism/serialize.rb#168 + # source://prism//lib/prism/serialize.rb#201 def load_optional_location; end - # source://yarp//lib/prism/serialize.rb#142 + # source://prism//lib/prism/serialize.rb#174 def load_optional_node; end - # source://yarp//lib/prism/serialize.rb#193 + # source://prism//lib/prism/serialize.rb#226 def load_required_constant; end - # source://yarp//lib/prism/serialize.rb#138 + # source://prism//lib/prism/serialize.rb#170 def load_serialized_length; end - # source://yarp//lib/prism/serialize.rb#153 + # source://prism//lib/prism/serialize.rb#185 def load_string; 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://yarp//lib/prism/serialize.rb#124 + # source://prism//lib/prism/serialize.rb#156 def load_varint; end end -# source://yarp//lib/prism/serialize.rb#23 +# 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) -# source://yarp//lib/prism/serialize.rb#24 +# 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) -# source://yarp//lib/prism/serialize.rb#25 +# 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) -# source://yarp//lib/prism/serialize.rb#494 +# The token types that can be indexed by their enum values. +# +# source://prism//lib/prism/serialize.rb#1124 Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # Represents a singleton class declaration involving the `class` keyword. @@ -19075,97 +25402,128 @@ Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # class << self end # ^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#12648 +# source://prism//lib/prism/node.rb#14659 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://yarp//lib/prism/node.rb#12668 + # source://prism//lib/prism/node.rb#14679 + 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://yarp//lib/prism/node.rb#12679 + # source://prism//lib/prism/node.rb#14690 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Node? # - # source://yarp//lib/prism/node.rb#12662 + # source://prism//lib/prism/node.rb#14673 + sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12684 + # source://prism//lib/prism/node.rb#14695 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://yarp//lib/prism/node.rb#12723 + # source://prism//lib/prism/node.rb#14734 + sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#12653 + # source://prism//lib/prism/node.rb#14664 + sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#12697 + # source://prism//lib/prism/node.rb#14708 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#12689 + # source://prism//lib/prism/node.rb#14700 def compact_child_nodes; end # def copy: (**params) -> SingletonClassNode # - # source://yarp//lib/prism/node.rb#12702 + # source://prism//lib/prism/node.rb#14713 + sig { params(params: T.untyped).returns(Prism::SingletonClassNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12684 + # source://prism//lib/prism/node.rb#14695 + 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://yarp//lib/prism/node.rb#12718 + # source://prism//lib/prism/node.rb#14729 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#12733 + # source://prism//lib/prism/node.rb#14744 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://yarp//lib/prism/node.rb#12665 + # source://prism//lib/prism/node.rb#14676 + sig { returns(Prism::Location) } def end_keyword_loc; end # attr_reader expression: Node # - # source://yarp//lib/prism/node.rb#12659 + # source://prism//lib/prism/node.rb#14670 + sig { returns(Prism::Node) } def expression; end - # source://yarp//lib/prism/node.rb#12737 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14749 def inspect(inspector = T.unsafe(nil)); end # attr_reader locals: Array[Symbol] # - # source://yarp//lib/prism/node.rb#12650 + # source://prism//lib/prism/node.rb#14661 + sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#12728 + # source://prism//lib/prism/node.rb#14739 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#12656 + # source://prism//lib/prism/node.rb#14667 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -19183,47 +25541,108 @@ class Prism::SingletonClassNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#12768 + # source://prism//lib/prism/node.rb#14780 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#14790 + 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://yarp//lib/prism/parse_result.rb#7 +# 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://yarp//lib/prism/parse_result.rb#10 - def initialize(source, offsets = T.unsafe(nil)); end + # source://prism//lib/prism/parse_result.rb#20 + def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end - # source://yarp//lib/prism/parse_result.rb#27 - def column(value); 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 - # source://yarp//lib/prism/parse_result.rb#19 - def line(value); 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 - # source://yarp//lib/prism/parse_result.rb#23 + sig { params(value: Integer).returns(Integer) } def line_offset(value); end - # Returns the value of attribute offsets. + # 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://yarp//lib/prism/parse_result.rb#8 + # source://prism//lib/prism/parse_result.rb#15 + sig { returns(T::Array[Integer]) } def offsets; end - # source://yarp//lib/prism/parse_result.rb#15 - def slice(offset, length); 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 - # Returns the value of attribute source. + # The source code that this source object represents. # - # source://yarp//lib/prism/parse_result.rb#8 + # 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 - # source://yarp//lib/prism/parse_result.rb#33 + # 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. @@ -19231,52 +25650,64 @@ end # __ENCODING__ # ^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#12777 +# source://prism//lib/prism/node.rb#14799 class Prism::SourceEncodingNode < ::Prism::Node # def initialize: (location: Location) -> void # # @return [SourceEncodingNode] a new instance of SourceEncodingNode # - # source://yarp//lib/prism/node.rb#12779 + # source://prism//lib/prism/node.rb#14801 + sig { params(location: Prism::Location).void } def initialize(location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#12784 + # source://prism//lib/prism/node.rb#14806 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12789 + # source://prism//lib/prism/node.rb#14811 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#12799 + # source://prism//lib/prism/node.rb#14821 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#12794 + # source://prism//lib/prism/node.rb#14816 def compact_child_nodes; end # def copy: (**params) -> SourceEncodingNode # - # source://yarp//lib/prism/node.rb#12804 + # source://prism//lib/prism/node.rb#14826 + sig { params(params: T.untyped).returns(Prism::SourceEncodingNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12789 + # source://prism//lib/prism/node.rb#14811 + 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://yarp//lib/prism/node.rb#12814 + # 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 - # source://yarp//lib/prism/node.rb#12818 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14841 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -19294,8 +25725,20 @@ class Prism::SourceEncodingNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#12837 + # source://prism//lib/prism/node.rb#14860 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#14870 + def type; end + end end # Represents the use of the `__FILE__` keyword. @@ -19303,57 +25746,70 @@ end # __FILE__ # ^^^^^^^^ # -# source://yarp//lib/prism/node.rb#12846 +# source://prism//lib/prism/node.rb#14879 class Prism::SourceFileNode < ::Prism::Node # def initialize: (filepath: String, location: Location) -> void # # @return [SourceFileNode] a new instance of SourceFileNode # - # source://yarp//lib/prism/node.rb#12851 + # source://prism//lib/prism/node.rb#14884 + sig { params(filepath: String, location: Prism::Location).void } def initialize(filepath, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#12857 + # source://prism//lib/prism/node.rb#14890 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12862 + # source://prism//lib/prism/node.rb#14895 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#12872 + # source://prism//lib/prism/node.rb#14905 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#12867 + # source://prism//lib/prism/node.rb#14900 def compact_child_nodes; end # def copy: (**params) -> SourceFileNode # - # source://yarp//lib/prism/node.rb#12877 + # source://prism//lib/prism/node.rb#14910 + sig { params(params: T.untyped).returns(Prism::SourceFileNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12862 + # source://prism//lib/prism/node.rb#14895 + 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://yarp//lib/prism/node.rb#12888 + # source://prism//lib/prism/node.rb#14921 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#12848 + # source://prism//lib/prism/node.rb#14881 + sig { returns(String) } def filepath; end - # source://yarp//lib/prism/node.rb#12892 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#14926 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -19371,8 +25827,20 @@ class Prism::SourceFileNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#12912 + # source://prism//lib/prism/node.rb#14946 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#14956 + def type; end + end end # Represents the use of the `__LINE__` keyword. @@ -19380,52 +25848,64 @@ end # __LINE__ # ^^^^^^^^ # -# source://yarp//lib/prism/node.rb#12921 +# source://prism//lib/prism/node.rb#14965 class Prism::SourceLineNode < ::Prism::Node # def initialize: (location: Location) -> void # # @return [SourceLineNode] a new instance of SourceLineNode # - # source://yarp//lib/prism/node.rb#12923 + # source://prism//lib/prism/node.rb#14967 + sig { params(location: Prism::Location).void } def initialize(location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#12928 + # source://prism//lib/prism/node.rb#14972 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12933 + # source://prism//lib/prism/node.rb#14977 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#12943 + # source://prism//lib/prism/node.rb#14987 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#12938 + # source://prism//lib/prism/node.rb#14982 def compact_child_nodes; end # def copy: (**params) -> SourceLineNode # - # source://yarp//lib/prism/node.rb#12948 + # source://prism//lib/prism/node.rb#14992 + sig { params(params: T.untyped).returns(Prism::SourceLineNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#12933 + # source://prism//lib/prism/node.rb#14977 + 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://yarp//lib/prism/node.rb#12958 + # source://prism//lib/prism/node.rb#15002 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#12962 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15007 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -19443,8 +25923,20 @@ class Prism::SourceLineNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#12981 + # source://prism//lib/prism/node.rb#15026 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#15036 + def type; end + end end # Represents the use of the splat operator. @@ -19452,67 +25944,82 @@ end # [*a] # ^^ # -# source://yarp//lib/prism/node.rb#12990 +# source://prism//lib/prism/node.rb#15045 class Prism::SplatNode < ::Prism::Node # def initialize: (operator_loc: Location, expression: Node?, location: Location) -> void # # @return [SplatNode] a new instance of SplatNode # - # source://yarp//lib/prism/node.rb#12998 + # source://prism//lib/prism/node.rb#15053 + 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://yarp//lib/prism/node.rb#13005 + # source://prism//lib/prism/node.rb#15060 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13010 + # source://prism//lib/prism/node.rb#15065 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#13022 + # source://prism//lib/prism/node.rb#15077 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#13015 + # source://prism//lib/prism/node.rb#15070 def compact_child_nodes; end # def copy: (**params) -> SplatNode # - # source://yarp//lib/prism/node.rb#13027 + # source://prism//lib/prism/node.rb#15082 + sig { params(params: T.untyped).returns(Prism::SplatNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13010 + # source://prism//lib/prism/node.rb#15065 + 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://yarp//lib/prism/node.rb#13039 + # source://prism//lib/prism/node.rb#15094 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#12995 + # source://prism//lib/prism/node.rb#15050 + sig { returns(T.nilable(Prism::Node)) } def expression; end - # source://yarp//lib/prism/node.rb#13048 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15104 def inspect(inspector = T.unsafe(nil)); end # def operator: () -> String # - # source://yarp//lib/prism/node.rb#13044 + # source://prism//lib/prism/node.rb#15099 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://yarp//lib/prism/node.rb#12992 + # source://prism//lib/prism/node.rb#15047 + sig { returns(Prism::Location) } def operator_loc; end # Sometimes you want to check an instance of a node against a list of @@ -19530,8 +26037,20 @@ class Prism::SplatNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#13074 + # source://prism//lib/prism/node.rb#15130 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#15140 + def type; end + end end # Represents a set of statements contained within some scope. @@ -19539,141 +26058,72 @@ end # foo; bar; baz # ^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#13083 +# source://prism//lib/prism/node.rb#15149 class Prism::StatementsNode < ::Prism::Node # def initialize: (body: Array[Node], location: Location) -> void # # @return [StatementsNode] a new instance of StatementsNode # - # source://yarp//lib/prism/node.rb#13088 + # source://prism//lib/prism/node.rb#15154 + sig { params(body: T::Array[Prism::Node], location: Prism::Location).void } def initialize(body, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#13094 + # source://prism//lib/prism/node.rb#15160 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader body: Array[Node] # - # source://yarp//lib/prism/node.rb#13085 + # source://prism//lib/prism/node.rb#15151 + sig { returns(T::Array[Prism::Node]) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13099 + # source://prism//lib/prism/node.rb#15165 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#13109 + # source://prism//lib/prism/node.rb#15175 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#13104 + # source://prism//lib/prism/node.rb#15170 def compact_child_nodes; end # def copy: (**params) -> StatementsNode # - # source://yarp//lib/prism/node.rb#13114 + # source://prism//lib/prism/node.rb#15180 + sig { params(params: T.untyped).returns(Prism::StatementsNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13099 + # source://prism//lib/prism/node.rb#15165 + 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://yarp//lib/prism/node.rb#13125 + # source://prism//lib/prism/node.rb#15191 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#13129 - 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://yarp//lib/prism/node.rb#13149 - def type; end -end - -# Represents the use of compile-time string concatenation. -# -# "foo" "bar" -# ^^^^^^^^^^^ -# -# source://yarp//lib/prism/node.rb#13158 -class Prism::StringConcatNode < ::Prism::Node - # def initialize: (left: Node, right: Node, location: Location) -> void - # - # @return [StringConcatNode] a new instance of StringConcatNode - # - # source://yarp//lib/prism/node.rb#13166 - def initialize(left, right, location); end - - # def accept: (visitor: Visitor) -> void - # - # source://yarp//lib/prism/node.rb#13173 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://yarp//lib/prism/node.rb#13178 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://yarp//lib/prism/node.rb#13188 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://yarp//lib/prism/node.rb#13183 - def compact_child_nodes; end - - # def copy: (**params) -> StringConcatNode - # - # source://yarp//lib/prism/node.rb#13193 - def copy(**params); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://yarp//lib/prism/node.rb#13178 - def deconstruct; end - - # def deconstruct_keys: (keys: Array[Symbol]) -> Hash[Symbol, nil | Node | Array[Node] | String | Token | Array[Token] | Location] + # def inspect(inspector: NodeInspector) -> String # - # source://yarp//lib/prism/node.rb#13205 - def deconstruct_keys(keys); end - - # source://yarp//lib/prism/node.rb#13209 + # source://prism//lib/prism/node.rb#15196 def inspect(inspector = T.unsafe(nil)); end - # attr_reader left: Node - # - # source://yarp//lib/prism/node.rb#13160 - def left; end - - # attr_reader right: Node - # - # source://yarp//lib/prism/node.rb#13163 - 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 @@ -19689,16 +26139,30 @@ class Prism::StringConcatNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#13232 + # source://prism//lib/prism/node.rb#15216 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#15226 + def type; end + end end -# source://yarp//lib/prism/node.rb#14536 +# Flags for string nodes. +# +# source://prism//lib/prism/node.rb#16674 module Prism::StringFlags; end -# frozen by virtue of a frozen_string_literal comment +# frozen by virtue of a `frozen_string_literal` comment # -# source://yarp//lib/prism/node.rb#14538 +# source://prism//lib/prism/node.rb#16676 Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) # Represents a string literal, a string contained within a `%w` list, or @@ -19713,89 +26177,117 @@ Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) # "foo #{bar} baz" # ^^^^ ^^^^ # -# source://yarp//lib/prism/node.rb#13248 +# source://prism//lib/prism/node.rb#15242 class Prism::StringNode < ::Prism::Node # 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://yarp//lib/prism/node.rb#13265 + # source://prism//lib/prism/node.rb#15259 + 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://yarp//lib/prism/node.rb#13275 + # source://prism//lib/prism/node.rb#15269 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13280 + # source://prism//lib/prism/node.rb#15274 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://yarp//lib/prism/node.rb#13330 + # source://prism//lib/prism/node.rb#15324 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://yarp//lib/prism/node.rb#13259 + # source://prism//lib/prism/node.rb#15253 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#13290 + # source://prism//lib/prism/node.rb#15284 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#13285 + # source://prism//lib/prism/node.rb#15279 def compact_child_nodes; end # def content: () -> String # - # source://yarp//lib/prism/node.rb#13325 + # source://prism//lib/prism/node.rb#15319 + sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://yarp//lib/prism/node.rb#13256 + # source://prism//lib/prism/node.rb#15250 + sig { returns(Prism::Location) } def content_loc; end # def copy: (**params) -> StringNode # - # source://yarp//lib/prism/node.rb#13295 + # source://prism//lib/prism/node.rb#15289 + sig { params(params: T.untyped).returns(Prism::StringNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13280 + # source://prism//lib/prism/node.rb#15274 + 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://yarp//lib/prism/node.rb#13310 + # source://prism//lib/prism/node.rb#15304 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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 frozen?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#13315 + # source://prism//lib/prism/node.rb#15309 + sig { returns(T::Boolean) } def frozen?; end - # source://yarp//lib/prism/node.rb#13334 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15329 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://yarp//lib/prism/node.rb#13320 + # source://prism//lib/prism/node.rb#15314 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://yarp//lib/prism/node.rb#13253 + # source://prism//lib/prism/node.rb#15247 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Sometimes you want to check an instance of a node against a list of @@ -19813,20 +26305,34 @@ class Prism::StringNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#13359 + # source://prism//lib/prism/node.rb#15354 def type; end # attr_reader unescaped: String # - # source://yarp//lib/prism/node.rb#13262 + # source://prism//lib/prism/node.rb#15256 + sig { returns(String) } def unescaped; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#13250 + # source://prism//lib/prism/node.rb#15244 + 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#15364 + def type; end + end end # Represents the use of the `super` keyword with parentheses or arguments. @@ -19837,92 +26343,121 @@ end # super foo, bar # ^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#13371 +# source://prism//lib/prism/node.rb#15376 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://yarp//lib/prism/node.rb#13388 + # source://prism//lib/prism/node.rb#15393 + 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://yarp//lib/prism/node.rb#13398 + # source://prism//lib/prism/node.rb#15403 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://yarp//lib/prism/node.rb#13379 + # source://prism//lib/prism/node.rb#15384 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # attr_reader block: Node? # - # source://yarp//lib/prism/node.rb#13385 + # source://prism//lib/prism/node.rb#15390 + sig { returns(T.nilable(Prism::Node)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13403 + # source://prism//lib/prism/node.rb#15408 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#13416 + # source://prism//lib/prism/node.rb#15421 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#13408 + # source://prism//lib/prism/node.rb#15413 def compact_child_nodes; end # def copy: (**params) -> SuperNode # - # source://yarp//lib/prism/node.rb#13421 + # source://prism//lib/prism/node.rb#15426 + sig { params(params: T.untyped).returns(Prism::SuperNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13403 + # source://prism//lib/prism/node.rb#15408 + 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://yarp//lib/prism/node.rb#13436 + # source://prism//lib/prism/node.rb#15441 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#13455 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15461 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#13441 + # source://prism//lib/prism/node.rb#15446 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#13373 + # source://prism//lib/prism/node.rb#15378 + sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://yarp//lib/prism/node.rb#13446 + # source://prism//lib/prism/node.rb#15451 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://yarp//lib/prism/node.rb#13376 + # source://prism//lib/prism/node.rb#15381 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://yarp//lib/prism/node.rb#13451 + # source://prism//lib/prism/node.rb#15456 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://yarp//lib/prism/node.rb#13382 + # source://prism//lib/prism/node.rb#15387 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Sometimes you want to check an instance of a node against a list of @@ -19940,8 +26475,20 @@ class Prism::SuperNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#13489 + # source://prism//lib/prism/node.rb#15495 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#15505 + def type; end + end end # Represents a symbol literal or a symbol contained within a `%i` list. @@ -19952,72 +26499,96 @@ end # %i[foo] # ^^^ # -# source://yarp//lib/prism/node.rb#13501 +# source://prism//lib/prism/node.rb#15517 class Prism::SymbolNode < ::Prism::Node # def initialize: (opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location) -> void # # @return [SymbolNode] a new instance of SymbolNode # - # source://yarp//lib/prism/node.rb#13515 + # source://prism//lib/prism/node.rb#15531 + sig do + params( + 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(opening_loc, value_loc, closing_loc, unescaped, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#13524 + # source://prism//lib/prism/node.rb#15540 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13529 + # source://prism//lib/prism/node.rb#15545 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://yarp//lib/prism/node.rb#13573 + # source://prism//lib/prism/node.rb#15589 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://yarp//lib/prism/node.rb#13509 + # source://prism//lib/prism/node.rb#15525 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#13539 + # source://prism//lib/prism/node.rb#15555 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#13534 + # source://prism//lib/prism/node.rb#15550 def compact_child_nodes; end # def copy: (**params) -> SymbolNode # - # source://yarp//lib/prism/node.rb#13544 + # source://prism//lib/prism/node.rb#15560 + sig { params(params: T.untyped).returns(Prism::SymbolNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13529 + # source://prism//lib/prism/node.rb#15545 + 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://yarp//lib/prism/node.rb#13558 + # source://prism//lib/prism/node.rb#15574 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#13577 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15594 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String? # - # source://yarp//lib/prism/node.rb#13563 + # source://prism//lib/prism/node.rb#15579 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://yarp//lib/prism/node.rb#13503 + # source://prism//lib/prism/node.rb#15519 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Sometimes you want to check an instance of a node against a list of @@ -20035,56 +26606,86 @@ class Prism::SymbolNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#13600 + # source://prism//lib/prism/node.rb#15617 def type; end # attr_reader unescaped: String # - # source://yarp//lib/prism/node.rb#13512 + # source://prism//lib/prism/node.rb#15528 + sig { returns(String) } def unescaped; end # def value: () -> String? # - # source://yarp//lib/prism/node.rb#13568 + # source://prism//lib/prism/node.rb#15584 + sig { returns(T.nilable(String)) } def value; end # attr_reader value_loc: Location? # - # source://yarp//lib/prism/node.rb#13506 + # source://prism//lib/prism/node.rb#15522 + sig { returns(T.nilable(Prism::Location)) } def value_loc; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#15627 + def type; end + end end # This represents a token from the Ruby source. # -# source://yarp//lib/prism/parse_result.rb#233 +# source://prism//lib/prism/parse_result.rb#419 class Prism::Token + # Create a new token object with the given type, value, and location. + # # @return [Token] a new instance of Token # - # source://yarp//lib/prism/parse_result.rb#236 + # source://prism//lib/prism/parse_result.rb#430 + sig { params(type: T.untyped, value: String, location: Prism::Location).void } def initialize(type, value, location); end - # source://yarp//lib/prism/parse_result.rb#260 + # Returns true if the given other token is equal to this token. + # + # source://prism//lib/prism/parse_result.rb#457 + sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end - # source://yarp//lib/prism/parse_result.rb#242 + # Implement the hash pattern matching interface for Token. + # + # source://prism//lib/prism/parse_result.rb#437 + sig { params(keys: T.untyped).returns(T.untyped) } def deconstruct_keys(keys); end - # Returns the value of attribute location. + # A Location object representing the location of this token in the source. # - # source://yarp//lib/prism/parse_result.rb#234 + # source://prism//lib/prism/parse_result.rb#427 + sig { returns(Prism::Location) } def location; end - # source://yarp//lib/prism/parse_result.rb#246 + # Implement the pretty print interface for Token. + # + # source://prism//lib/prism/parse_result.rb#442 + sig { params(q: T.untyped).returns(T.untyped) } def pretty_print(q); end - # Returns the value of attribute type. + # The type of token that this token is. # - # source://yarp//lib/prism/parse_result.rb#234 + # source://prism//lib/prism/parse_result.rb#421 + sig { returns(T.untyped) } def type; end - # Returns the value of attribute value. + # A byteslice of the source that this token represents. # - # source://yarp//lib/prism/parse_result.rb#234 + # source://prism//lib/prism/parse_result.rb#424 + sig { returns(String) } def value; end end @@ -20093,52 +26694,64 @@ end # true # ^^^^ # -# source://yarp//lib/prism/node.rb#13609 +# source://prism//lib/prism/node.rb#15636 class Prism::TrueNode < ::Prism::Node # def initialize: (location: Location) -> void # # @return [TrueNode] a new instance of TrueNode # - # source://yarp//lib/prism/node.rb#13611 + # source://prism//lib/prism/node.rb#15638 + sig { params(location: Prism::Location).void } def initialize(location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#13616 + # source://prism//lib/prism/node.rb#15643 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13621 + # source://prism//lib/prism/node.rb#15648 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#13631 + # source://prism//lib/prism/node.rb#15658 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#13626 + # source://prism//lib/prism/node.rb#15653 def compact_child_nodes; end # def copy: (**params) -> TrueNode # - # source://yarp//lib/prism/node.rb#13636 + # source://prism//lib/prism/node.rb#15663 + sig { params(params: T.untyped).returns(Prism::TrueNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13621 + # source://prism//lib/prism/node.rb#15648 + 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://yarp//lib/prism/node.rb#13646 + # source://prism//lib/prism/node.rb#15673 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#13650 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15678 def inspect(inspector = T.unsafe(nil)); end # Sometimes you want to check an instance of a node against a list of @@ -20156,8 +26769,20 @@ class Prism::TrueNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#13669 + # source://prism//lib/prism/node.rb#15697 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#15707 + def type; end + end end # Represents the use of the `undef` keyword. @@ -20165,67 +26790,82 @@ end # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#13678 +# source://prism//lib/prism/node.rb#15716 class Prism::UndefNode < ::Prism::Node # def initialize: (names: Array[Node], keyword_loc: Location, location: Location) -> void # # @return [UndefNode] a new instance of UndefNode # - # source://yarp//lib/prism/node.rb#13686 + # source://prism//lib/prism/node.rb#15724 + 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://yarp//lib/prism/node.rb#13693 + # source://prism//lib/prism/node.rb#15731 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13698 + # source://prism//lib/prism/node.rb#15736 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#13708 + # source://prism//lib/prism/node.rb#15746 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#13703 + # source://prism//lib/prism/node.rb#15741 def compact_child_nodes; end # def copy: (**params) -> UndefNode # - # source://yarp//lib/prism/node.rb#13713 + # source://prism//lib/prism/node.rb#15751 + sig { params(params: T.untyped).returns(Prism::UndefNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13698 + # source://prism//lib/prism/node.rb#15736 + 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://yarp//lib/prism/node.rb#13725 + # source://prism//lib/prism/node.rb#15763 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#13734 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15773 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#13730 + # source://prism//lib/prism/node.rb#15768 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#13683 + # source://prism//lib/prism/node.rb#15721 + sig { returns(Prism::Location) } def keyword_loc; end # attr_reader names: Array[Node] # - # source://yarp//lib/prism/node.rb#13680 + # source://prism//lib/prism/node.rb#15718 + sig { returns(T::Array[Prism::Node]) } def names; end # Sometimes you want to check an instance of a node against a list of @@ -20243,8 +26883,20 @@ class Prism::UndefNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#13755 + # source://prism//lib/prism/node.rb#15794 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#15804 + def type; end + end end # Represents the use of the `unless` keyword, either in the block form or the modifier form. @@ -20255,92 +26907,133 @@ end # unless foo then bar end # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#13767 +# source://prism//lib/prism/node.rb#15816 class Prism::UnlessNode < ::Prism::Node - # def initialize: (keyword_loc: Location, predicate: Node, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location) -> void + # 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://yarp//lib/prism/node.rb#13784 - def initialize(keyword_loc, predicate, statements, consequent, end_keyword_loc, location); end + # source://prism//lib/prism/node.rb#15836 + 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://yarp//lib/prism/node.rb#13794 + # source://prism//lib/prism/node.rb#15847 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13803 + # source://prism//lib/prism/node.rb#15856 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#13817 + # source://prism//lib/prism/node.rb#15870 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#13808 + # source://prism//lib/prism/node.rb#15861 def compact_child_nodes; end # attr_reader consequent: ElseNode? # - # source://yarp//lib/prism/node.rb#13778 + # source://prism//lib/prism/node.rb#15830 + sig { returns(T.nilable(Prism::ElseNode)) } def consequent; end # def copy: (**params) -> UnlessNode # - # source://yarp//lib/prism/node.rb#13822 + # source://prism//lib/prism/node.rb#15875 + sig { params(params: T.untyped).returns(Prism::UnlessNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13803 + # source://prism//lib/prism/node.rb#15856 + 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://yarp//lib/prism/node.rb#13837 + # source://prism//lib/prism/node.rb#15891 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.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://yarp//lib/prism/node.rb#13847 + # source://prism//lib/prism/node.rb#15906 + sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://yarp//lib/prism/node.rb#13781 + # source://prism//lib/prism/node.rb#15833 + sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end - # source://yarp//lib/prism/node.rb#13851 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#15911 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#13842 + # source://prism//lib/prism/node.rb#15896 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#13769 + # source://prism//lib/prism/node.rb#15818 + sig { returns(Prism::Location) } def keyword_loc; end # attr_reader predicate: Node # - # source://yarp//lib/prism/node.rb#13772 + # source://prism//lib/prism/node.rb#15821 + sig { returns(Prism::Node) } def predicate; end - # source://yarp//lib/prism/node.rb#13798 + # source://prism//lib/prism/node.rb#15851 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://yarp//lib/prism/node.rb#13775 + # source://prism//lib/prism/node.rb#15827 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end + # def then_keyword: () -> String? + # + # source://prism//lib/prism/node.rb#15901 + sig { returns(T.nilable(String)) } + def then_keyword; end + + # attr_reader then_keyword_loc: Location? + # + # source://prism//lib/prism/node.rb#15824 + 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 @@ -20356,8 +27049,20 @@ class Prism::UnlessNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#13886 + # source://prism//lib/prism/node.rb#15947 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#15957 + def type; end + end end # Represents the use of the `until` keyword, either in the block form or the modifier form. @@ -20368,92 +27073,120 @@ end # until foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#13898 +# source://prism//lib/prism/node.rb#15969 class Prism::UntilNode < ::Prism::Node # def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void # # @return [UntilNode] a new instance of UntilNode # - # source://yarp//lib/prism/node.rb#13915 + # source://prism//lib/prism/node.rb#15986 + sig do + params( + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + flags: Integer, + location: Prism::Location + ).void + end def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#13925 + # source://prism//lib/prism/node.rb#15996 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def begin_modifier?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#13982 + # source://prism//lib/prism/node.rb#16053 + sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13934 + # source://prism//lib/prism/node.rb#16005 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://yarp//lib/prism/node.rb#13977 + # source://prism//lib/prism/node.rb#16048 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://yarp//lib/prism/node.rb#13903 + # source://prism//lib/prism/node.rb#15974 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#13947 + # source://prism//lib/prism/node.rb#16018 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#13939 + # source://prism//lib/prism/node.rb#16010 def compact_child_nodes; end # def copy: (**params) -> UntilNode # - # source://yarp//lib/prism/node.rb#13952 + # source://prism//lib/prism/node.rb#16023 + sig { params(params: T.untyped).returns(Prism::UntilNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#13934 + # source://prism//lib/prism/node.rb#16005 + 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://yarp//lib/prism/node.rb#13967 + # source://prism//lib/prism/node.rb#16038 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#13986 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#16058 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#13972 + # source://prism//lib/prism/node.rb#16043 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#13900 + # source://prism//lib/prism/node.rb#15971 + sig { returns(Prism::Location) } def keyword_loc; end # attr_reader predicate: Node # - # source://yarp//lib/prism/node.rb#13906 + # source://prism//lib/prism/node.rb#15977 + sig { returns(Prism::Node) } def predicate; end - # source://yarp//lib/prism/node.rb#13929 + # source://prism//lib/prism/node.rb#16000 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://yarp//lib/prism/node.rb#13909 + # source://prism//lib/prism/node.rb#15980 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of @@ -20471,15 +27204,28 @@ class Prism::UntilNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#14017 + # source://prism//lib/prism/node.rb#16089 def type; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#13912 + # source://prism//lib/prism/node.rb#15983 + 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#16099 + def type; end + end end # The version constant is set by reading the result of calling pm_version. @@ -20504,711 +27250,870 @@ Prism::VERSION = T.let(T.unsafe(nil), String) # end # end # -# source://yarp//lib/prism/visitor.rb#46 +# source://prism//lib/prism/visitor.rb#50 class Prism::Visitor < ::Prism::BasicVisitor # Visit a AliasGlobalVariableNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AndNode).void } def visit_and_node(node); end # Visit a ArgumentsNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ArgumentsNode).void } def visit_arguments_node(node); end # Visit a ArrayNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ArrayNode).void } def visit_array_node(node); end # Visit a ArrayPatternNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::AssocNode).void } def visit_assoc_node(node); end # Visit a AssocSplatNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BeginNode).void } def visit_begin_node(node); end # Visit a BlockArgumentNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BlockNode).void } def visit_block_node(node); end # Visit a BlockParameterNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::BreakNode).void } def visit_break_node(node); end # Visit a CallAndWriteNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CallNode).void } def visit_call_node(node); end # Visit a CallOperatorWriteNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CallOrWriteNode).void } def visit_call_or_write_node(node); end # Visit a CapturePatternNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::CaseNode).void } def visit_case_node(node); end # Visit a ClassNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ClassNode).void } def visit_class_node(node); end # Visit a ClassVariableAndWriteNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::DefNode).void } def visit_def_node(node); end # Visit a DefinedNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::DefinedNode).void } def visit_defined_node(node); end # Visit a ElseNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ElseNode).void } def visit_else_node(node); end # Visit a EmbeddedStatementsNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::EnsureNode).void } def visit_ensure_node(node); end # Visit a FalseNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::FalseNode).void } def visit_false_node(node); end # Visit a FindPatternNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::FloatNode).void } def visit_float_node(node); end # Visit a ForNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ForNode).void } def visit_for_node(node); end # Visit a ForwardingArgumentsNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::HashNode).void } def visit_hash_node(node); end # Visit a HashPatternNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::IfNode).void } def visit_if_node(node); end # Visit a ImaginaryNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ImaginaryNode).void } def visit_imaginary_node(node); end # Visit a ImplicitNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ImplicitNode).void } def visit_implicit_node(node); end # Visit a InNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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 InstanceVariableAndWriteNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::IntegerNode).void } def visit_integer_node(node); end # Visit a InterpolatedMatchLastLineNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::KeywordHashNode).void } def visit_keyword_hash_node(node); end - # Visit a KeywordParameterNode node - # - # source://yarp//lib/prism/visitor.rb#22 - def visit_keyword_parameter_node(node); end - # Visit a KeywordRestParameterNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::LambdaNode).void } def visit_lambda_node(node); end # Visit a LocalVariableAndWriteNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::MissingNode).void } def visit_missing_node(node); end # Visit a ModuleNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ModuleNode).void } def visit_module_node(node); end # Visit a MultiTargetNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::NextNode).void } def visit_next_node(node); end # Visit a NilNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::NilNode).void } def visit_nil_node(node); end # Visit a NoKeywordsParameterNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::NoKeywordsParameterNode).void } def visit_no_keywords_parameter_node(node); end # Visit a NumberedReferenceReadNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::OrNode).void } def visit_or_node(node); end # Visit a ParametersNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ParametersNode).void } def visit_parameters_node(node); end # Visit a ParenthesesNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ParenthesesNode).void } def visit_parentheses_node(node); end # Visit a PinnedExpressionNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ProgramNode).void } def visit_program_node(node); end # Visit a RangeNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RangeNode).void } def visit_range_node(node); end # Visit a RationalNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RationalNode).void } def visit_rational_node(node); end # Visit a RedoNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RedoNode).void } def visit_redo_node(node); end # Visit a RegularExpressionNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RegularExpressionNode).void } def visit_regular_expression_node(node); end - # Visit a RequiredDestructuredParameterNode node + # Visit a RequiredKeywordParameterNode node # - # source://yarp//lib/prism/visitor.rb#22 - def visit_required_destructured_parameter_node(node); end + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RescueNode).void } def visit_rescue_node(node); end # Visit a RestParameterNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::RetryNode).void } def visit_retry_node(node); end # Visit a ReturnNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::ReturnNode).void } def visit_return_node(node); end # Visit a SelfNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SelfNode).void } def visit_self_node(node); end # Visit a SingletonClassNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SplatNode).void } def visit_splat_node(node); end # Visit a StatementsNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::StatementsNode).void } def visit_statements_node(node); end - # Visit a StringConcatNode node - # - # source://yarp//lib/prism/visitor.rb#22 - def visit_string_concat_node(node); end - # Visit a StringNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::StringNode).void } def visit_string_node(node); end # Visit a SuperNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SuperNode).void } def visit_super_node(node); end # Visit a SymbolNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::SymbolNode).void } def visit_symbol_node(node); end # Visit a TrueNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::TrueNode).void } def visit_true_node(node); end # Visit a UndefNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::UndefNode).void } def visit_undef_node(node); end # Visit a UnlessNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::UnlessNode).void } def visit_unless_node(node); end # Visit a UntilNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::UntilNode).void } def visit_until_node(node); end # Visit a WhenNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::WhenNode).void } def visit_when_node(node); end # Visit a WhileNode node # - # source://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::WhileNode).void } def visit_while_node(node); end # Visit a XStringNode node # - # source://yarp//lib/prism/visitor.rb#22 + # 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://yarp//lib/prism/visitor.rb#22 + # source://prism//lib/prism/visitor.rb#26 + sig { params(node: Prism::YieldNode).void } def visit_yield_node(node); end end @@ -21219,72 +28124,95 @@ end # ^^^^^^^^^ # end # -# source://yarp//lib/prism/node.rb#14028 +# source://prism//lib/prism/node.rb#16110 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://yarp//lib/prism/node.rb#14039 + # source://prism//lib/prism/node.rb#16121 + 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://yarp//lib/prism/node.rb#14047 + # source://prism//lib/prism/node.rb#16129 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#14052 + # source://prism//lib/prism/node.rb#16134 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#14065 + # source://prism//lib/prism/node.rb#16147 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#14057 + # source://prism//lib/prism/node.rb#16139 def compact_child_nodes; end # attr_reader conditions: Array[Node] # - # source://yarp//lib/prism/node.rb#14033 + # source://prism//lib/prism/node.rb#16115 + sig { returns(T::Array[Prism::Node]) } def conditions; end # def copy: (**params) -> WhenNode # - # source://yarp//lib/prism/node.rb#14070 + # source://prism//lib/prism/node.rb#16152 + sig { params(params: T.untyped).returns(Prism::WhenNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#14052 + # source://prism//lib/prism/node.rb#16134 + 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://yarp//lib/prism/node.rb#14083 + # source://prism//lib/prism/node.rb#16165 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#14092 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#16175 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#14088 + # source://prism//lib/prism/node.rb#16170 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#14030 + # source://prism//lib/prism/node.rb#16112 + sig { returns(Prism::Location) } def keyword_loc; end # attr_reader statements: StatementsNode? # - # source://yarp//lib/prism/node.rb#14036 + # source://prism//lib/prism/node.rb#16118 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of @@ -21302,8 +28230,20 @@ class Prism::WhenNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#14119 + # source://prism//lib/prism/node.rb#16202 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#16212 + def type; end + end end # Represents the use of the `while` keyword, either in the block form or the modifier form. @@ -21314,92 +28254,120 @@ end # while foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://yarp//lib/prism/node.rb#14131 +# source://prism//lib/prism/node.rb#16224 class Prism::WhileNode < ::Prism::Node # def initialize: (keyword_loc: Location, closing_loc: Location?, predicate: Node, statements: StatementsNode?, flags: Integer, location: Location) -> void # # @return [WhileNode] a new instance of WhileNode # - # source://yarp//lib/prism/node.rb#14148 + # source://prism//lib/prism/node.rb#16241 + sig do + params( + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + flags: Integer, + location: Prism::Location + ).void + end def initialize(keyword_loc, closing_loc, predicate, statements, flags, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#14158 + # source://prism//lib/prism/node.rb#16251 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def begin_modifier?: () -> bool # # @return [Boolean] # - # source://yarp//lib/prism/node.rb#14215 + # source://prism//lib/prism/node.rb#16308 + sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#14167 + # source://prism//lib/prism/node.rb#16260 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://yarp//lib/prism/node.rb#14210 + # source://prism//lib/prism/node.rb#16303 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://yarp//lib/prism/node.rb#14136 + # source://prism//lib/prism/node.rb#16229 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#14180 + # source://prism//lib/prism/node.rb#16273 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#14172 + # source://prism//lib/prism/node.rb#16265 def compact_child_nodes; end # def copy: (**params) -> WhileNode # - # source://yarp//lib/prism/node.rb#14185 + # source://prism//lib/prism/node.rb#16278 + sig { params(params: T.untyped).returns(Prism::WhileNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#14167 + # source://prism//lib/prism/node.rb#16260 + 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://yarp//lib/prism/node.rb#14200 + # source://prism//lib/prism/node.rb#16293 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#14219 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#16313 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#14205 + # source://prism//lib/prism/node.rb#16298 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#14133 + # source://prism//lib/prism/node.rb#16226 + sig { returns(Prism::Location) } def keyword_loc; end # attr_reader predicate: Node # - # source://yarp//lib/prism/node.rb#14139 + # source://prism//lib/prism/node.rb#16232 + sig { returns(Prism::Node) } def predicate; end - # source://yarp//lib/prism/node.rb#14162 + # source://prism//lib/prism/node.rb#16255 def set_newline_flag(newline_marked); end # attr_reader statements: StatementsNode? # - # source://yarp//lib/prism/node.rb#14142 + # source://prism//lib/prism/node.rb#16235 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Sometimes you want to check an instance of a node against a list of @@ -21417,15 +28385,28 @@ class Prism::WhileNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#14250 + # source://prism//lib/prism/node.rb#16344 def type; end private # Returns the value of attribute flags. # - # source://yarp//lib/prism/node.rb#14145 + # source://prism//lib/prism/node.rb#16238 + 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#16354 + def type; end + end end # Represents an xstring literal with no interpolation. @@ -21433,82 +28414,108 @@ end # `foo` # ^^^^^ # -# source://yarp//lib/prism/node.rb#14259 +# source://prism//lib/prism/node.rb#16363 class Prism::XStringNode < ::Prism::Node # def initialize: (opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location) -> void # # @return [XStringNode] a new instance of XStringNode # - # source://yarp//lib/prism/node.rb#14273 + # source://prism//lib/prism/node.rb#16377 + sig do + params( + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + unescaped: String, + location: Prism::Location + ).void + end def initialize(opening_loc, content_loc, closing_loc, unescaped, location); end # def accept: (visitor: Visitor) -> void # - # source://yarp//lib/prism/node.rb#14282 + # source://prism//lib/prism/node.rb#16386 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#14287 + # source://prism//lib/prism/node.rb#16391 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://yarp//lib/prism/node.rb#14331 + # source://prism//lib/prism/node.rb#16435 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://yarp//lib/prism/node.rb#14267 + # source://prism//lib/prism/node.rb#16371 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#14297 + # source://prism//lib/prism/node.rb#16401 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#14292 + # source://prism//lib/prism/node.rb#16396 def compact_child_nodes; end # def content: () -> String # - # source://yarp//lib/prism/node.rb#14326 + # source://prism//lib/prism/node.rb#16430 + sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://yarp//lib/prism/node.rb#14264 + # source://prism//lib/prism/node.rb#16368 + sig { returns(Prism::Location) } def content_loc; end # def copy: (**params) -> XStringNode # - # source://yarp//lib/prism/node.rb#14302 + # source://prism//lib/prism/node.rb#16406 + sig { params(params: T.untyped).returns(Prism::XStringNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#14287 + # 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://yarp//lib/prism/node.rb#14316 + # source://prism//lib/prism/node.rb#16420 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#14335 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#16440 def inspect(inspector = T.unsafe(nil)); end # def opening: () -> String # - # source://yarp//lib/prism/node.rb#14321 + # source://prism//lib/prism/node.rb#16425 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://yarp//lib/prism/node.rb#14261 + # source://prism//lib/prism/node.rb#16365 + sig { returns(Prism::Location) } def opening_loc; end # Sometimes you want to check an instance of a node against a list of @@ -21526,13 +28533,26 @@ class Prism::XStringNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#14358 + # source://prism//lib/prism/node.rb#16463 def type; end # attr_reader unescaped: String # - # source://yarp//lib/prism/node.rb#14270 + # source://prism//lib/prism/node.rb#16374 + sig { returns(String) } def unescaped; end + + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16473 + def type; end + end end # Represents the use of the `yield` keyword. @@ -21540,87 +28560,114 @@ end # yield 1 # ^^^^^^^ # -# source://yarp//lib/prism/node.rb#14367 +# source://prism//lib/prism/node.rb#16482 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://yarp//lib/prism/node.rb#14381 + # source://prism//lib/prism/node.rb#16496 + 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://yarp//lib/prism/node.rb#14390 + # source://prism//lib/prism/node.rb#16505 + sig { params(visitor: Prism::Visitor).void } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://yarp//lib/prism/node.rb#14375 + # source://prism//lib/prism/node.rb#16490 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#14395 + # source://prism//lib/prism/node.rb#16510 + sig { returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://yarp//lib/prism/node.rb#14407 + # source://prism//lib/prism/node.rb#16522 def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://yarp//lib/prism/node.rb#14400 + # source://prism//lib/prism/node.rb#16515 def compact_child_nodes; end # def copy: (**params) -> YieldNode # - # source://yarp//lib/prism/node.rb#14412 + # source://prism//lib/prism/node.rb#16527 + sig { params(params: T.untyped).returns(Prism::YieldNode) } def copy(**params); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://yarp//lib/prism/node.rb#14395 + # source://prism//lib/prism/node.rb#16510 + 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://yarp//lib/prism/node.rb#14426 + # source://prism//lib/prism/node.rb#16541 + sig do + params( + keys: T::Array[Symbol] + ).returns(T::Hash[Symbol, T.nilable(T.any(Prism::Node, T::Array[Prism::Node], String, Prism::Token, T::Array[Prism::Token], Prism::Location))]) + end def deconstruct_keys(keys); end - # source://yarp//lib/prism/node.rb#14445 + # def inspect(inspector: NodeInspector) -> String + # + # source://prism//lib/prism/node.rb#16561 def inspect(inspector = T.unsafe(nil)); end # def keyword: () -> String # - # source://yarp//lib/prism/node.rb#14431 + # source://prism//lib/prism/node.rb#16546 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://yarp//lib/prism/node.rb#14369 + # source://prism//lib/prism/node.rb#16484 + sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://yarp//lib/prism/node.rb#14436 + # source://prism//lib/prism/node.rb#16551 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://yarp//lib/prism/node.rb#14372 + # source://prism//lib/prism/node.rb#16487 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://yarp//lib/prism/node.rb#14441 + # source://prism//lib/prism/node.rb#16556 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://yarp//lib/prism/node.rb#14378 + # source://prism//lib/prism/node.rb#16493 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Sometimes you want to check an instance of a node against a list of @@ -21638,9 +28685,18 @@ class Prism::YieldNode < ::Prism::Node # # def type: () -> Symbol # - # source://yarp//lib/prism/node.rb#14473 + # source://prism//lib/prism/node.rb#16589 def type; end -end -# source://yarp//lib/yarp.rb#4 -YARP = Prism + class << self + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # Note that like #type, it will still be slower than using == for a single + # class, but should be faster in a case statement or an array comparison. + # + # def self.type: () -> Symbol + # + # source://prism//lib/prism/node.rb#16599 + def type; end + end +end diff --git a/sorbet/rbi/gems/rake@13.0.6.rbi b/sorbet/rbi/gems/rake@13.1.0.rbi similarity index 92% rename from sorbet/rbi/gems/rake@13.0.6.rbi rename to sorbet/rbi/gems/rake@13.1.0.rbi index 245e6df..f128671 100644 --- a/sorbet/rbi/gems/rake@13.0.6.rbi +++ b/sorbet/rbi/gems/rake@13.1.0.rbi @@ -22,13 +22,13 @@ module FileUtils # Example: # ruby %{-pe '$_.upcase!' ['a', 'b', 'c'] # - # source://rake//lib/rake/file_utils.rb#128 + # source://rake//lib/rake/file_utils.rb#126 def split_all(path); end private @@ -75,14 +75,14 @@ module FileUtils # source://rake//lib/rake/file_utils.rb#61 def create_shell_runner(cmd); end - # source://rake//lib/rake/file_utils.rb#86 + # source://rake//lib/rake/file_utils.rb#84 def set_verbose_option(options); end - # source://rake//lib/rake/file_utils.rb#73 + # source://rake//lib/rake/file_utils.rb#71 def sh_show_command(cmd); end end -# source://rake//lib/rake/file_utils.rb#108 +# source://rake//lib/rake/file_utils.rb#106 FileUtils::LN_SUPPORTED = T.let(T.unsafe(nil), Array) # Path to the currently running Ruby program @@ -195,13 +195,13 @@ class Rake::Application # Add a file to the list of files to be imported. # - # source://rake//lib/rake/application.rb#777 + # source://rake//lib/rake/application.rb#801 def add_import(fn); end # Add a loader to handle imported files ending in the extension # +ext+. # - # source://rake//lib/rake/application.rb#139 + # source://rake//lib/rake/application.rb#161 def add_loader(ext, loader); end # Collect the list of tasks on the command line. If no tasks are @@ -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#758 + # source://rake//lib/rake/application.rb#782 def collect_command_line_tasks(args); end # Default task name ("default"). # (May be overridden by subclasses) # - # source://rake//lib/rake/application.rb#772 + # source://rake//lib/rake/application.rb#796 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#258 + # source://rake//lib/rake/application.rb#282 def deprecate(old_usage, new_usage, call_site); end - # source://rake//lib/rake/application.rb#222 + # source://rake//lib/rake/application.rb#244 def display_cause_details(ex); end # Display the error message that caused the exception. # - # source://rake//lib/rake/application.rb#206 + # source://rake//lib/rake/application.rb#228 def display_error_message(ex); end - # source://rake//lib/rake/application.rb#245 + # source://rake//lib/rake/application.rb#269 def display_exception_backtrace(ex); end - # source://rake//lib/rake/application.rb#214 + # source://rake//lib/rake/application.rb#236 def display_exception_details(ex); end - # source://rake//lib/rake/application.rb#229 + # source://rake//lib/rake/application.rb#251 def display_exception_details_seen; end - # source://rake//lib/rake/application.rb#237 + # source://rake//lib/rake/application.rb#259 def display_exception_message_details(ex); end # Display the tasks and prerequisites # - # source://rake//lib/rake/application.rb#381 + # source://rake//lib/rake/application.rb#405 def display_prerequisites; end # Display the tasks and comments. # - # source://rake//lib/rake/application.rb#298 + # source://rake//lib/rake/application.rb#322 def display_tasks_and_comments; end # Calculate the dynamic width of the # - # source://rake//lib/rake/application.rb#349 + # source://rake//lib/rake/application.rb#373 def dynamic_width; end - # source://rake//lib/rake/application.rb#353 + # source://rake//lib/rake/application.rb#377 def dynamic_width_stty; end - # source://rake//lib/rake/application.rb#357 + # source://rake//lib/rake/application.rb#381 def dynamic_width_tput; end # Exit the program because of an unhandled exception. # (may be overridden by subclasses) # - # source://rake//lib/rake/application.rb#201 + # source://rake//lib/rake/application.rb#223 def exit_because_of_exception(ex); end - # source://rake//lib/rake/application.rb#678 + # source://rake//lib/rake/application.rb#702 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#644 + # source://rake//lib/rake/application.rb#668 def handle_options(argv); end # @return [Boolean] # - # source://rake//lib/rake/application.rb#233 + # source://rake//lib/rake/application.rb#255 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#274 + # source://rake//lib/rake/application.rb#298 def have_rakefile; end # Initialize the command line parameters and app name. @@ -305,17 +305,17 @@ class Rake::Application # Invokes a task with arguments that are extracted from +task_string+ # - # source://rake//lib/rake/application.rb#157 + # source://rake//lib/rake/application.rb#179 def invoke_task(task_string); end # Load the pending list of imported files. # - # source://rake//lib/rake/application.rb#782 + # source://rake//lib/rake/application.rb#806 def load_imports; end # Find the rakefile and then load it and any pending imports. # - # source://rake//lib/rake/application.rb#102 + # source://rake//lib/rake/application.rb#124 def load_rakefile; end # The name of the application (typically 'rake') @@ -325,7 +325,7 @@ class Rake::Application # Application options from the command line # - # source://rake//lib/rake/application.rb#145 + # source://rake//lib/rake/application.rb#167 def options; end # The original directory where rake was invoked. @@ -333,16 +333,16 @@ class Rake::Application # source://rake//lib/rake/application.rb#27 def original_dir; end - # source://rake//lib/rake/application.rb#163 + # source://rake//lib/rake/application.rb#185 def parse_task_string(string); end - # source://rake//lib/rake/application.rb#690 + # source://rake//lib/rake/application.rb#714 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#664 + # source://rake//lib/rake/application.rb#688 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#798 + # source://rake//lib/rake/application.rb#822 def rakefile_location(backtrace = T.unsafe(nil)); end - # source://rake//lib/rake/application.rb#695 + # source://rake//lib/rake/application.rb#719 def raw_load_rakefile; end # Run the Rake application. The run method performs the following @@ -372,26 +372,26 @@ class Rake::Application # Run the given block with the thread startup and shutdown. # - # source://rake//lib/rake/application.rb#122 + # source://rake//lib/rake/application.rb#144 def run_with_threads; end - # source://rake//lib/rake/application.rb#807 + # source://rake//lib/rake/application.rb#831 def set_default_options; end # Provide standard exception handling for the given block. # - # source://rake//lib/rake/application.rb#185 + # source://rake//lib/rake/application.rb#207 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#402 + # source://rake//lib/rake/application.rb#426 def standard_rake_options; end # The directory path containing the system wide rakefiles. # - # source://rake//lib/rake/application.rb#727 + # source://rake//lib/rake/application.rb#751 def system_dir; end # Number of columns on the terminal @@ -404,17 +404,17 @@ class Rake::Application # source://rake//lib/rake/application.rb#33 def terminal_columns=(_arg0); end - # source://rake//lib/rake/application.rb#337 + # source://rake//lib/rake/application.rb#361 def terminal_width; end # Return the thread pool used for multithreaded processing. # - # source://rake//lib/rake/application.rb#150 + # source://rake//lib/rake/application.rb#172 def thread_pool; end # Run the top level tasks of a Rake application. # - # source://rake//lib/rake/application.rb#109 + # source://rake//lib/rake/application.rb#131 def top_level; end # List of the top level task names (task names from the command line). @@ -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#388 + # source://rake//lib/rake/application.rb#412 def trace(*strings); end - # source://rake//lib/rake/application.rb#370 + # source://rake//lib/rake/application.rb#394 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#293 + # source://rake//lib/rake/application.rb#317 def truncate_output?; end # Override the detected TTY output state (mostly for testing) @@ -445,41 +445,44 @@ class Rake::Application # # @return [Boolean] # - # source://rake//lib/rake/application.rb#287 + # source://rake//lib/rake/application.rb#311 def tty_output?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#361 + # source://rake//lib/rake/application.rb#385 def unix?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#366 + # source://rake//lib/rake/application.rb#390 def windows?; end private - # source://rake//lib/rake/application.rb#721 + # source://rake//lib/rake/application.rb#745 def glob(path, &block); end # Does the exception have a task invocation chain? # # @return [Boolean] # - # source://rake//lib/rake/application.rb#267 + # source://rake//lib/rake/application.rb#291 def has_chain?(exception); end - # source://rake//lib/rake/application.rb#620 + # source://rake//lib/rake/application.rb#102 + def load_debug_at_stop_feature; end + + # source://rake//lib/rake/application.rb#644 def select_tasks_to_show(options, show_tasks, value); end - # source://rake//lib/rake/application.rb#627 + # source://rake//lib/rake/application.rb#651 def select_trace_output(options, trace_option, value); end - # source://rake//lib/rake/application.rb#393 + # source://rake//lib/rake/application.rb#417 def sort_options(options); end - # source://rake//lib/rake/application.rb#744 + # source://rake//lib/rake/application.rb#768 def standard_system_dir; end end @@ -555,13 +558,43 @@ module Rake::DSL private + # source://rake//lib/rake/file_utils_ext.rb#34 + def cd(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chmod_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def chown_R(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def copy(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_lr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def cp_r(*args, **options, &block); end + # Describes the next rake task. Duplicate descriptions are discarded. # Descriptions are shown with rake -T (up to the first # sentence) and rake -D (the entire description). # # Example: # desc "Run the Unit Tests" - # task test: [:build] + # task test: [:build] do # # ... run tests # end # @@ -616,6 +649,39 @@ module Rake::DSL # source://rake//lib/rake/dsl_definition.rb#183 def import(*fns); end + # source://rake//lib/rake/file_utils_ext.rb#34 + def install(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def link(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_s(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sr(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def makedirs(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkdir_p(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def mkpath(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def move(*args, **options, &block); end + # Declare a task that performs its prerequisites in # parallel. Multitasks does *not* guarantee that its prerequisites # will execute in any given order (which is obvious when you think @@ -627,6 +693,9 @@ module Rake::DSL # source://rake//lib/rake/dsl_definition.rb#112 def multitask(*args, &block); end + # source://rake//lib/rake/file_utils_ext.rb#34 + def mv(*args, **options, &block); end + # Create a new rake namespace and use it for evaluating the given # block. Returns a NameSpace object that can be used to lookup # tasks defined in the namespace. @@ -649,6 +718,39 @@ module Rake::DSL # source://rake//lib/rake/dsl_definition.rb#135 def namespace(name = T.unsafe(nil), &block); end + # source://rake//lib/rake/file_utils_ext.rb#77 + def nowrite(value = T.unsafe(nil)); end + + # source://rake//lib/rake/file_utils_ext.rb#123 + def rake_check_options(options, *optdecl); end + + # source://rake//lib/rake/file_utils_ext.rb#116 + def rake_output_message(message); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def remove(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_f(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_r(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rm_rf(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmdir(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def rmtree(*args, **options, &block); end + + # source://rake//lib/rake/file_utils.rb#98 + def ruby(*args, **options, &block); end + # Declare a rule for auto-tasks. # # Example: @@ -659,6 +761,21 @@ module Rake::DSL # source://rake//lib/rake/dsl_definition.rb#151 def rule(*args, &block); end + # source://rake//lib/rake/file_utils.rb#110 + def safe_ln(*args, **options); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def safe_unlink(*args, **options, &block); end + + # source://rake//lib/rake/file_utils.rb#43 + def sh(*cmd, &block); end + + # source://rake//lib/rake/file_utils.rb#126 + def split_all(path); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def symlink(*args, **options, &block); end + # :call-seq: # task(task_name) # task(task_name: dependencies) @@ -692,6 +809,15 @@ module Rake::DSL # # source://rake//lib/rake/dsl_definition.rb#59 def task(*args, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#34 + def touch(*args, **options, &block); end + + # source://rake//lib/rake/file_utils_ext.rb#53 + def verbose(value = T.unsafe(nil)); end + + # source://rake//lib/rake/file_utils_ext.rb#107 + def when_writing(msg = T.unsafe(nil)); end end # Default Rakefile loader used by +import+. @@ -725,6 +851,13 @@ class Rake::EarlyTime # source://rake//lib/rake/early_time.rb#16 def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end end # A FileCreationTask is a file task that when used as a dependency will be @@ -732,7 +865,7 @@ end # not re-triggered if any of its dependencies are newer, nor does trigger # any rebuilds of tasks that depend on it whenever it is updated. # -# source://rake//lib/rake/file_creation_task.rb#13 +# source://rake//lib/rake/file_creation_task.rb#12 class Rake::FileCreationTask < ::Rake::FileTask # Is this file task needed? Yes if it doesn't exist. # @@ -1450,7 +1583,7 @@ class Rake::FileTask < ::Rake::Task # Time stamp for file task. # - # source://rake//lib/rake/file_task.rb#21 + # source://rake//lib/rake/file_task.rb#25 def timestamp; end private @@ -1459,14 +1592,14 @@ class Rake::FileTask < ::Rake::Task # # @return [Boolean] # - # source://rake//lib/rake/file_task.rb#32 + # source://rake//lib/rake/file_task.rb#36 def out_of_date?(stamp); end class << self # Apply the scope to the task name according to the rules for this kind # of task. File based tasks ignore the scope when creating the name. # - # source://rake//lib/rake/file_task.rb#49 + # source://rake//lib/rake/file_task.rb#53 def scope_name(scope, task_name); end end end @@ -1528,6 +1661,9 @@ module Rake::FileUtilsExt # source://rake//lib/rake/file_utils_ext.rb#34 def ln_sf(*args, **options, &block); end + # source://rake//lib/rake/file_utils_ext.rb#34 + def ln_sr(*args, **options, &block); end + # source://rake//lib/rake/file_utils_ext.rb#34 def makedirs(*args, **options, &block); end @@ -1757,6 +1893,13 @@ class Rake::LateTime # source://rake//lib/rake/late_time.rb#12 def to_s; end + + class << self + private + + def allocate; end + def new(*_arg0); end + end end # Polylithic linked list structure used to implement several data @@ -2714,14 +2857,14 @@ class Rake::ThreadHistoryDisplay def threads; end end -# source://rake//lib/rake/thread_pool.rb#7 +# source://rake//lib/rake/thread_pool.rb#8 class Rake::ThreadPool # Creates a ThreadPool object. The +thread_count+ parameter is the size # of the pool. # # @return [ThreadPool] a new instance of ThreadPool # - # source://rake//lib/rake/thread_pool.rb#11 + # source://rake//lib/rake/thread_pool.rb#12 def initialize(thread_count); end # Creates a future executed by the +ThreadPool+. diff --git a/sorbet/rbi/gems/rbi@0.1.1.rbi b/sorbet/rbi/gems/rbi@0.1.5.rbi similarity index 97% rename from sorbet/rbi/gems/rbi@0.1.1.rbi rename to sorbet/rbi/gems/rbi@0.1.5.rbi index 0139952..4177bd1 100644 --- a/sorbet/rbi/gems/rbi@0.1.1.rbi +++ b/sorbet/rbi/gems/rbi@0.1.5.rbi @@ -853,8 +853,8 @@ class RBI::Loc class << self # source://rbi//lib/rbi/loc.rb#12 - sig { params(file: ::String, yarp_location: ::Prism::Location).returns(::RBI::Loc) } - def from_yarp(file, yarp_location); end + sig { params(file: ::String, prism_location: ::Prism::Location).returns(::RBI::Loc) } + def from_prism(file, prism_location); end end end @@ -1302,68 +1302,64 @@ class RBI::Parser end end -# source://rbi//lib/rbi/parser.rb#746 +# source://rbi//lib/rbi/parser.rb#791 class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor - # source://rbi//lib/rbi/parser.rb#753 + # source://rbi//lib/rbi/parser.rb#798 sig { params(content: ::String, file: ::String).void } def initialize(content, file:); end - # source://rbi//lib/rbi/parser.rb#750 + # source://rbi//lib/rbi/parser.rb#795 sig { returns(::RBI::Sig) } def current; end - # source://rbi//lib/rbi/parser.rb#805 + # source://rbi//lib/rbi/parser.rb#850 sig { override.params(node: ::Prism::AssocNode).void } def visit_assoc_node(node); end - # source://rbi//lib/rbi/parser.rb#760 + # source://rbi//lib/rbi/parser.rb#805 sig { override.params(node: ::Prism::CallNode).void } def visit_call_node(node); end end -# source://rbi//lib/rbi/parser.rb#155 +# source://rbi//lib/rbi/parser.rb#153 class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor - # source://rbi//lib/rbi/parser.rb#165 + # source://rbi//lib/rbi/parser.rb#163 sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } def initialize(source, comments:, file:); end - # source://rbi//lib/rbi/parser.rb#162 + # source://rbi//lib/rbi/parser.rb#160 sig { returns(T.nilable(::Prism::Node)) } def last_node; end - # source://rbi//lib/rbi/parser.rb#159 + # source://rbi//lib/rbi/parser.rb#157 sig { returns(::RBI::Tree) } def tree; end - # source://rbi//lib/rbi/parser.rb#178 - sig { override.params(node: T.nilable(::Prism::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/parser.rb#295 + # source://rbi//lib/rbi/parser.rb#299 sig { params(node: ::Prism::CallNode).void } def visit_call_node(node); end - # source://rbi//lib/rbi/parser.rb#186 + # source://rbi//lib/rbi/parser.rb#176 sig { override.params(node: ::Prism::ClassNode).void } def visit_class_node(node); end - # source://rbi//lib/rbi/parser.rb#212 + # source://rbi//lib/rbi/parser.rb#208 sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } def visit_constant_assign(node); end - # source://rbi//lib/rbi/parser.rb#207 + # source://rbi//lib/rbi/parser.rb#201 sig { override.params(node: ::Prism::ConstantPathWriteNode).void } def visit_constant_path_write_node(node); end - # source://rbi//lib/rbi/parser.rb#202 + # source://rbi//lib/rbi/parser.rb#194 sig { override.params(node: ::Prism::ConstantWriteNode).void } def visit_constant_write_node(node); end - # source://rbi//lib/rbi/parser.rb#245 + # source://rbi//lib/rbi/parser.rb#241 sig { override.params(node: ::Prism::DefNode).void } def visit_def_node(node); end - # source://rbi//lib/rbi/parser.rb#257 + # source://rbi//lib/rbi/parser.rb#255 sig { override.params(node: ::Prism::ModuleNode).void } def visit_module_node(node); end @@ -1371,7 +1367,7 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor sig { override.params(node: ::Prism::ProgramNode).void } def visit_program_node(node); end - # source://rbi//lib/rbi/parser.rb#281 + # source://rbi//lib/rbi/parser.rb#283 sig { override.params(node: ::Prism::SingletonClassNode).void } def visit_singleton_class_node(node); end @@ -1379,49 +1375,49 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor # Collect all the remaining comments within a node # - # source://rbi//lib/rbi/parser.rb#420 + # source://rbi//lib/rbi/parser.rb#467 sig { params(node: ::Prism::Node).void } def collect_dangling_comments(node); end # Collect all the remaining comments after visiting the tree # - # source://rbi//lib/rbi/parser.rb#438 + # source://rbi//lib/rbi/parser.rb#485 sig { void } def collect_orphan_comments; end - # source://rbi//lib/rbi/parser.rb#461 + # source://rbi//lib/rbi/parser.rb#508 sig { returns(::RBI::Tree) } def current_scope; end - # source://rbi//lib/rbi/parser.rb#466 + # source://rbi//lib/rbi/parser.rb#513 sig { returns(T::Array[::RBI::Sig]) } def current_sigs; end - # source://rbi//lib/rbi/parser.rb#473 + # source://rbi//lib/rbi/parser.rb#520 sig { returns(T::Array[::RBI::Comment]) } def current_sigs_comments; end - # source://rbi//lib/rbi/parser.rb#480 + # source://rbi//lib/rbi/parser.rb#527 sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } def node_comments(node); end - # source://rbi//lib/rbi/parser.rb#498 + # source://rbi//lib/rbi/parser.rb#545 sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } def parse_comment(node); end - # source://rbi//lib/rbi/parser.rb#527 + # source://rbi//lib/rbi/parser.rb#574 sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } def parse_params(node); end - # source://rbi//lib/rbi/parser.rb#503 + # source://rbi//lib/rbi/parser.rb#550 sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } def parse_send_args(node); end - # source://rbi//lib/rbi/parser.rb#603 + # source://rbi//lib/rbi/parser.rb#648 sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } def parse_sig(node); end - # source://rbi//lib/rbi/parser.rb#613 + # source://rbi//lib/rbi/parser.rb#658 sig do params( node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) @@ -1429,44 +1425,44 @@ class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor end def parse_struct(node); end - # source://rbi//lib/rbi/parser.rb#663 + # source://rbi//lib/rbi/parser.rb#708 sig { params(send: ::Prism::CallNode).void } def parse_tstruct_field(send); end - # source://rbi//lib/rbi/parser.rb#700 + # source://rbi//lib/rbi/parser.rb#745 sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } def parse_visibility(name, node); end - # source://rbi//lib/rbi/parser.rb#714 + # source://rbi//lib/rbi/parser.rb#759 sig { void } def separate_header_comments; end - # source://rbi//lib/rbi/parser.rb#724 + # source://rbi//lib/rbi/parser.rb#769 sig { void } def set_root_tree_loc; end - # source://rbi//lib/rbi/parser.rb#738 + # source://rbi//lib/rbi/parser.rb#783 sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def type_variable_definition?(node); end end -# source://rbi//lib/rbi/parser.rb#124 +# source://rbi//lib/rbi/parser.rb#122 class RBI::Parser::Visitor < ::Prism::Visitor - # source://rbi//lib/rbi/parser.rb#128 + # source://rbi//lib/rbi/parser.rb#126 sig { params(source: ::String, file: ::String).void } def initialize(source, file:); end private - # source://rbi//lib/rbi/parser.rb#138 + # source://rbi//lib/rbi/parser.rb#136 sig { params(node: ::Prism::Node).returns(::RBI::Loc) } def node_loc(node); end - # source://rbi//lib/rbi/parser.rb#143 + # source://rbi//lib/rbi/parser.rb#141 sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } def node_string(node); end - # source://rbi//lib/rbi/parser.rb#150 + # source://rbi//lib/rbi/parser.rb#148 sig { params(node: ::Prism::Node).returns(::String) } def node_string!(node); end end @@ -1824,7 +1820,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11142/lib/types/struct.rb#13 def inherited(s); end end end @@ -2041,7 +2037,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11142/lib/types/struct.rb#13 def inherited(s); end end end @@ -2674,7 +2670,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.11.9/lib/tapioca/rbi_ext/model.rb#38 + # source://tapioca/0.11.12/lib/tapioca/rbi_ext/model.rb#38 sig do params( name: ::String, @@ -2684,19 +2680,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_class(name, superclass_name: T.unsafe(nil), &block); end - # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#45 + # source://tapioca/0.11.12/lib/tapioca/rbi_ext/model.rb#45 sig { params(name: ::String, value: ::String).void } def create_constant(name, value:); end - # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#55 + # source://tapioca/0.11.12/lib/tapioca/rbi_ext/model.rb#55 sig { params(name: ::String).void } def create_extend(name); end - # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#50 + # source://tapioca/0.11.12/lib/tapioca/rbi_ext/model.rb#50 sig { params(name: ::String).void } def create_include(name); end - # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#89 + # source://tapioca/0.11.12/lib/tapioca/rbi_ext/model.rb#89 sig do params( name: ::String, @@ -2709,19 +2705,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#60 + # source://tapioca/0.11.12/lib/tapioca/rbi_ext/model.rb#60 sig { params(name: ::String).void } def create_mixes_in_class_methods(name); end - # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#25 + # source://tapioca/0.11.12/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.11.9/lib/tapioca/rbi_ext/model.rb#9 + # source://tapioca/0.11.12/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.11.9/lib/tapioca/rbi_ext/model.rb#74 + # source://tapioca/0.11.12/lib/tapioca/rbi_ext/model.rb#74 sig do params( name: ::String, @@ -2783,11 +2779,11 @@ class RBI::Tree < ::RBI::NodeWithComments private - # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#116 + # source://tapioca/0.11.12/lib/tapioca/rbi_ext/model.rb#116 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # source://tapioca/0.11.9/lib/tapioca/rbi_ext/model.rb#111 + # source://tapioca/0.11.12/lib/tapioca/rbi_ext/model.rb#111 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end diff --git a/sorbet/rbi/gems/tapioca@0.11.9.rbi b/sorbet/rbi/gems/tapioca@0.11.12.rbi similarity index 97% rename from sorbet/rbi/gems/tapioca@0.11.9.rbi rename to sorbet/rbi/gems/tapioca@0.11.12.rbi index 8b41007..6ea365d 100644 --- a/sorbet/rbi/gems/tapioca@0.11.9.rbi +++ b/sorbet/rbi/gems/tapioca@0.11.12.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.1/lib/rbi/model.rb#119 + # source://rbi/0.1.5/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.1/lib/rbi/model.rb#126 + # source://rbi/0.1.5/lib/rbi/model.rb#126 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi/0.1.1/lib/rbi/printer.rb#226 + # source://rbi/0.1.5/lib/rbi/printer.rb#226 sig { override.params(v: ::RBI::Printer).void } def accept_printer(v); end - # source://rbi/0.1.1/lib/rbi/rewriters/add_sig_templates.rb#66 + # source://rbi/0.1.5/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.1/lib/rbi/rewriters/annotate.rb#49 + # source://rbi/0.1.5/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 @@ -140,23 +140,23 @@ 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.1/lib/rbi/rewriters/deannotate.rb#41 + # source://rbi/0.1.5/lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi/0.1.1/lib/rbi/model.rb#132 + # source://rbi/0.1.5/lib/rbi/model.rb#132 sig { returns(T::Boolean) } def empty?; end - # source://rbi/0.1.1/lib/rbi/rewriters/group_nodes.rb#38 + # source://rbi/0.1.5/lib/rbi/rewriters/group_nodes.rb#38 sig { void } def group_nodes!; end - # source://rbi/0.1.1/lib/rbi/index.rb#68 + # source://rbi/0.1.5/lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end - # source://rbi/0.1.1/lib/rbi/rewriters/merge_trees.rb#324 + # source://rbi/0.1.5/lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -167,23 +167,23 @@ 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.1/lib/rbi/rewriters/nest_non_public_methods.rb#46 + # source://rbi/0.1.5/lib/rbi/rewriters/nest_non_public_methods.rb#46 sig { void } def nest_non_public_methods!; end - # source://rbi/0.1.1/lib/rbi/rewriters/nest_singleton_methods.rb#36 + # source://rbi/0.1.5/lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end - # source://rbi/0.1.1/lib/rbi/model.rb#110 + # source://rbi/0.1.5/lib/rbi/model.rb#110 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi/0.1.1/lib/rbi/printer.rb#233 + # source://rbi/0.1.5/lib/rbi/printer.rb#233 sig { override.returns(T::Boolean) } def oneline?; end - # source://rbi/0.1.1/lib/rbi/rewriters/sort_nodes.rb#119 + # source://rbi/0.1.5/lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end @@ -204,7 +204,7 @@ class RBI::TypedParam < ::T::Struct const :type, ::String class << self - # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11142/lib/types/struct.rb#13 def inherited(s); end end end @@ -859,7 +859,7 @@ class Tapioca::Commands::Command sig { void } def initialize; end - # source://thor/1.2.2/lib/thor/base.rb#139 + # source://thor/1.3.0/lib/thor/base.rb#155 sig { returns(::Thor::Actions) } def file_writer; end @@ -1121,7 +1121,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11142/lib/types/struct.rb#13 def inherited(s); end end end @@ -1132,7 +1132,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11074/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11142/lib/types/struct.rb#13 def inherited(s); end end end @@ -2204,94 +2204,94 @@ end class Tapioca::Gemfile::GemSpec include ::Tapioca::GemHelper - # source://tapioca//lib/tapioca/gemfile.rb#135 + # source://tapioca//lib/tapioca/gemfile.rb#136 sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void } def initialize(spec); end - # source://tapioca//lib/tapioca/gemfile.rb#145 + # source://tapioca//lib/tapioca/gemfile.rb#146 sig { params(other: ::BasicObject).returns(T::Boolean) } def ==(other); end - # source://tapioca//lib/tapioca/gemfile.rb#170 + # source://tapioca//lib/tapioca/gemfile.rb#171 sig { params(path: ::String).returns(T::Boolean) } def contains_path?(path); end - # source://tapioca//lib/tapioca/gemfile.rb#160 + # source://tapioca//lib/tapioca/gemfile.rb#161 sig { returns(T::Array[::Gem::Dependency]) } def dependencies; end - # source://tapioca//lib/tapioca/gemfile.rb#189 + # source://tapioca//lib/tapioca/gemfile.rb#190 sig { returns(T::Boolean) } def export_rbi_files?; end - # source://tapioca//lib/tapioca/gemfile.rb#184 + # source://tapioca//lib/tapioca/gemfile.rb#185 sig { returns(T::Array[::String]) } def exported_rbi_files; end - # source://tapioca//lib/tapioca/gemfile.rb#194 + # source://tapioca//lib/tapioca/gemfile.rb#195 sig { returns(::RBI::MergeTree) } def exported_rbi_tree; end - # source://tapioca//lib/tapioca/gemfile.rb#132 + # source://tapioca//lib/tapioca/gemfile.rb#133 sig { returns(T::Array[::Pathname]) } def files; end - # source://tapioca//lib/tapioca/gemfile.rb#129 + # source://tapioca//lib/tapioca/gemfile.rb#130 sig { returns(::String) } def full_gem_path; end - # source://tapioca//lib/tapioca/gemfile.rb#150 + # source://tapioca//lib/tapioca/gemfile.rb#151 sig { params(gemfile_dir: ::String).returns(T::Boolean) } def ignore?(gemfile_dir); end - # source://tapioca//lib/tapioca/gemfile.rb#155 + # source://tapioca//lib/tapioca/gemfile.rb#156 sig { returns(::String) } def name; end - # source://tapioca//lib/tapioca/gemfile.rb#179 + # source://tapioca//lib/tapioca/gemfile.rb#180 sig { void } def parse_yard_docs; end - # source://tapioca//lib/tapioca/gemfile.rb#165 + # source://tapioca//lib/tapioca/gemfile.rb#166 sig { returns(::String) } def rbi_file_name; end - # source://tapioca//lib/tapioca/gemfile.rb#206 + # source://tapioca//lib/tapioca/gemfile.rb#207 sig { params(file: ::Pathname).returns(::Pathname) } def relative_path_for(file); end # @return [String] # - # source://tapioca//lib/tapioca/gemfile.rb#129 + # source://tapioca//lib/tapioca/gemfile.rb#130 def version; end private - # source://tapioca//lib/tapioca/gemfile.rb#217 + # source://tapioca//lib/tapioca/gemfile.rb#218 sig { returns(T::Array[::Pathname]) } def collect_files; end - # source://tapioca//lib/tapioca/gemfile.rb#232 + # source://tapioca//lib/tapioca/gemfile.rb#233 sig { returns(T.nilable(T::Boolean)) } def default_gem?; end - # source://tapioca//lib/tapioca/gemfile.rb#291 + # source://tapioca//lib/tapioca/gemfile.rb#292 sig { returns(T::Boolean) } def gem_ignored?; end - # source://tapioca//lib/tapioca/gemfile.rb#270 + # source://tapioca//lib/tapioca/gemfile.rb#271 sig { params(path: ::String).returns(T::Boolean) } def has_parent_gemspec?(path); end - # source://tapioca//lib/tapioca/gemfile.rb#237 + # source://tapioca//lib/tapioca/gemfile.rb#238 sig { returns(::Regexp) } def require_paths_prefix_matcher; end - # source://tapioca//lib/tapioca/gemfile.rb#249 + # source://tapioca//lib/tapioca/gemfile.rb#250 sig { params(file: ::String).returns(::Pathname) } def resolve_to_ruby_lib_dir(file); end - # source://tapioca//lib/tapioca/gemfile.rb#263 + # source://tapioca//lib/tapioca/gemfile.rb#264 sig { returns(::String) } def version_string; end @@ -2421,6 +2421,17 @@ class Tapioca::Loaders::Loader private + # Rails 7.2 renamed `eager_load_paths` to `all_eager_load_paths`, which maintains the same original functionality. + # The `eager_load_paths` method still exists, but doesn't return all paths anymore and causes Tapioca to miss some + # engine paths. The following commit is the change: + # https://github.com/rails/rails/commit/ebfca905db14020589c22e6937382e6f8f687664 + # + # @param engine [T.class_of(Rails::Engine)] + # @return [Array] + # + # source://sorbet-runtime/0.5.11142/lib/types/private/methods/_methods.rb#255 + def eager_load_paths(*args, **_arg1, &blk); end + # source://tapioca//lib/tapioca/loaders/loader.rb#198 sig { void } def eager_load_rails_app; end @@ -3306,7 +3317,7 @@ module Tapioca::Static::SymbolLoader sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } def engine_symbols(gem); end - # source://tapioca//lib/tapioca/static/symbol_loader.rb#40 + # source://tapioca//lib/tapioca/static/symbol_loader.rb#48 sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } def gem_symbols(gem); end @@ -3314,7 +3325,7 @@ module Tapioca::Static::SymbolLoader sig { returns(T::Set[::String]) } def payload_symbols; end - # source://tapioca//lib/tapioca/static/symbol_loader.rb#45 + # source://tapioca//lib/tapioca/static/symbol_loader.rb#53 sig { params(paths: T::Array[::Pathname]).returns(T::Set[::String]) } def symbols_from_paths(paths); end @@ -3322,10 +3333,10 @@ module Tapioca::Static::SymbolLoader # @return [Array] # - # source://sorbet-runtime/0.5.11074/lib/types/private/methods/_methods.rb#255 + # source://sorbet-runtime/0.5.11142/lib/types/private/methods/_methods.rb#255 def engines(*args, **_arg1, &blk); end - # source://tapioca//lib/tapioca/static/symbol_loader.rb#74 + # source://tapioca//lib/tapioca/static/symbol_loader.rb#82 sig { params(input: ::String, table_type: ::String).returns(::String) } def symbol_table_json_from(input, table_type: T.unsafe(nil)); end end diff --git a/sorbet/rbi/gems/thor@1.2.2.rbi b/sorbet/rbi/gems/thor@1.3.0.rbi similarity index 80% rename from sorbet/rbi/gems/thor@1.2.2.rbi rename to sorbet/rbi/gems/thor@1.3.0.rbi index dcb11ee..9ed8f62 100644 --- a/sorbet/rbi/gems/thor@1.2.2.rbi +++ b/sorbet/rbi/gems/thor@1.3.0.rbi @@ -4,6 +4,30 @@ # This is an autogenerated file for types exported from the `thor` gem. # Please instead update this file by running `bin/tapioca gem thor`. +# source://thor//lib/thor/shell/lcs_diff.rb#1 +module LCSDiff + protected + + # Overwrite show_diff to show diff with colors if Diff::LCS is + # available. + # + # source://thor//lib/thor/shell/lcs_diff.rb#6 + def show_diff(destination, content); end + + private + + # Check if Diff::LCS is loaded. If it is, use it to create pretty output + # for diff. + # + # @return [Boolean] + # + # source://thor//lib/thor/shell/lcs_diff.rb#37 + def diff_lcs_loaded?; end + + # source://thor//lib/thor/shell/lcs_diff.rb#21 + def output_diff_line(diff); end +end + # source://thor//lib/thor/command.rb#1 class Thor include ::Thor::Base @@ -12,23 +36,63 @@ class Thor extend ::Thor::Base::ClassMethods extend ::Thor::Invocation::ClassMethods - # source://thor//lib/thor.rb#505 + # source://thor//lib/thor.rb#652 def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end class << self + # Adds and declares option group for required at least one of options in the + # block of arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options:: :for is applied for previous defined command. + # + # ==== Examples + # + # at_least_one do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # at_least_one :one, :two + # + # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError + # will be raised. + # + # You can use at_least_one and exclusive at the same time. + # + # exclusive do + # at_least_one do + # option :one + # option :two + # end + # end + # + # Then it is required either only one of "--one" or "--two". + # + # source://thor//lib/thor.rb#246 + def at_least_one(*args, &block); end + # Extend check unknown options to accept a hash of conditions. # # === Parameters # options: A hash containing :only and/or :except keys # - # source://thor//lib/thor.rb#255 + # source://thor//lib/thor.rb#350 def check_unknown_options!(options = T.unsafe(nil)); end # Overwrite check_unknown_options? to take subcommands and options into account. # # @return [Boolean] # - # source://thor//lib/thor.rb#268 + # source://thor//lib/thor.rb#363 def check_unknown_options?(config); end # Prints help information for the given command. @@ -37,7 +101,7 @@ class Thor # shell # command_name # - # source://thor//lib/thor.rb#172 + # source://thor//lib/thor.rb#258 def command_help(shell, command_name); end # Sets the default command when thor is executed without an explicit command to be called. @@ -76,28 +140,64 @@ class Thor # ==== Parameters # Symbol ...:: A list of commands that should be affected. # - # source://thor//lib/thor.rb#339 + # source://thor//lib/thor.rb#434 def disable_required_check!(*command_names); end # @return [Boolean] # - # source://thor//lib/thor.rb#343 + # source://thor//lib/thor.rb#438 def disable_required_check?(command); end + # Adds and declares option group for exclusive options in the + # block and arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options:: :for is applied for previous defined command. + # + # ==== Examples + # + # exclusive do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # exclusive :one, :two + # + # If you give "--one" and "--two" at the same time ExclusiveArgumentsError + # will be raised. + # + # source://thor//lib/thor.rb#203 + def exclusive(*args, &block); end + # Prints help information for this class. # # ==== Parameters # shell # - # source://thor//lib/thor.rb#195 + # source://thor//lib/thor.rb#288 def help(shell, subcommand = T.unsafe(nil)); end # Defines the long description of the next command. # + # Long description is by default indented, line-wrapped and repeated whitespace merged. + # In order to print long description verbatim, with indentation and spacing exactly + # as found in the code, use the +wrap+ option + # + # long_desc 'your very long description', wrap: false + # # ==== Parameters # long description + # options # - # source://thor//lib/thor.rb#71 + # source://thor//lib/thor.rb#78 def long_desc(long_description, options = T.unsafe(nil)); end # Maps an input to a command. If you define: @@ -113,9 +213,78 @@ class Thor # ==== Parameters # Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given command. # - # source://thor//lib/thor.rb#93 + # source://thor//lib/thor.rb#101 def map(mappings = T.unsafe(nil), **kw); end + # Adds and declares option group for required at least one of options in the + # block of arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options:: :for is applied for previous defined command. + # + # ==== Examples + # + # at_least_one do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # at_least_one :one, :two + # + # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError + # will be raised. + # + # You can use at_least_one and exclusive at the same time. + # + # exclusive do + # at_least_one do + # option :one + # option :two + # end + # end + # + # Then it is required either only one of "--one" or "--two". + # + # source://thor//lib/thor.rb#246 + def method_at_least_one(*args, &block); end + + # Adds and declares option group for exclusive options in the + # block and arguments. You can declare options as the outside of the block. + # + # If :for is given as option, it allows you to change the options from + # a previous defined command. + # + # ==== Parameters + # Array[Thor::Option.name] + # options:: :for is applied for previous defined command. + # + # ==== Examples + # + # exclusive do + # option :one + # option :two + # end + # + # Or + # + # option :one + # option :two + # exclusive :one, :two + # + # If you give "--one" and "--two" at the same time ExclusiveArgumentsError + # will be raised. + # + # source://thor//lib/thor.rb#203 + def method_exclusive(*args, &block); end + # Adds an option to the set of method options. If :for is given as option, # it allows you to change the options from a previous defined command. # @@ -123,7 +292,7 @@ class Thor # # magic # end # - # method_option :foo => :bar, :for => :previous_command + # method_option :foo, :for => :previous_command # # def next_command # # magic @@ -142,7 +311,7 @@ class Thor # :banner - String to show on usage notes. # :hide - If you want to hide this option from the help. # - # source://thor//lib/thor.rb#155 + # source://thor//lib/thor.rb#163 def method_option(name, options = T.unsafe(nil)); end # Declares the options for the next command to be declared. @@ -152,7 +321,7 @@ class Thor # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric # or :required (string). If you give a value, the type of the value is used. # - # source://thor//lib/thor.rb#121 + # source://thor//lib/thor.rb#129 def method_options(options = T.unsafe(nil)); end # Adds an option to the set of method options. If :for is given as option, @@ -162,7 +331,7 @@ class Thor # # magic # end # - # method_option :foo => :bar, :for => :previous_command + # method_option :foo, :for => :previous_command # # def next_command # # magic @@ -181,7 +350,7 @@ class Thor # :banner - String to show on usage notes. # :hide - If you want to hide this option from the help. # - # source://thor//lib/thor.rb#155 + # source://thor//lib/thor.rb#163 def option(name, options = T.unsafe(nil)); end # Declares the options for the next command to be declared. @@ -191,7 +360,7 @@ class Thor # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric # or :required (string). If you give a value, the type of the value is used. # - # source://thor//lib/thor.rb#121 + # source://thor//lib/thor.rb#129 def options(options = T.unsafe(nil)); end # Allows for custom "Command" package naming. @@ -205,12 +374,12 @@ class Thor # Returns commands ready to be printed. # - # source://thor//lib/thor.rb#214 + # source://thor//lib/thor.rb#309 def printable_commands(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end # Returns commands ready to be printed. # - # source://thor//lib/thor.rb#214 + # source://thor//lib/thor.rb#309 def printable_tasks(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end # Registers another Thor subclass as a command. @@ -262,27 +431,27 @@ class Thor # ==== Parameters # Symbol ...:: A list of commands that should be affected. # - # source://thor//lib/thor.rb#325 + # source://thor//lib/thor.rb#420 def stop_on_unknown_option!(*command_names); end # @return [Boolean] # - # source://thor//lib/thor.rb#329 + # source://thor//lib/thor.rb#424 def stop_on_unknown_option?(command); end - # source://thor//lib/thor.rb#234 + # source://thor//lib/thor.rb#329 def subcommand(subcommand, subcommand_class); end - # source://thor//lib/thor.rb#230 + # source://thor//lib/thor.rb#325 def subcommand_classes; end - # source://thor//lib/thor.rb#225 + # source://thor//lib/thor.rb#320 def subcommands; end - # source://thor//lib/thor.rb#234 + # source://thor//lib/thor.rb#329 def subtask(subcommand, subcommand_class); end - # source://thor//lib/thor.rb#225 + # source://thor//lib/thor.rb#320 def subtasks; end # Prints help information for the given command. @@ -291,7 +460,7 @@ class Thor # shell # command_name # - # source://thor//lib/thor.rb#172 + # source://thor//lib/thor.rb#258 def task_help(shell, command_name); end protected @@ -301,50 +470,66 @@ class Thor # the command that is going to be invoked and a boolean which indicates if # the namespace should be displayed as arguments. # - # source://thor//lib/thor.rb#400 + # source://thor//lib/thor.rb#535 def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://thor//lib/thor.rb#406 + # source://thor//lib/thor.rb#541 def baseclass; end - # source://thor//lib/thor.rb#414 + # source://thor//lib/thor.rb#549 def create_command(meth); end - # source://thor//lib/thor.rb#414 + # source://thor//lib/thor.rb#549 def create_task(meth); end # help command has the required check disabled by default. # - # source://thor//lib/thor.rb#354 + # source://thor//lib/thor.rb#467 def disable_required_check; end # The method responsible for dispatching given the args. # # @yield [instance] # - # source://thor//lib/thor.rb#359 + # source://thor//lib/thor.rb#494 def dispatch(meth, given_args, given_opts, config); end - # source://thor//lib/thor.rb#410 + # source://thor//lib/thor.rb#545 def dynamic_command_class; end # this is the logic that takes the command name passed in by the user # and determines whether it is an unambiguous substrings of a command or # alias name. # - # source://thor//lib/thor.rb#476 + # source://thor//lib/thor.rb#615 def find_command_possibilities(meth); end # this is the logic that takes the command name passed in by the user # and determines whether it is an unambiguous substrings of a command or # alias name. # - # source://thor//lib/thor.rb#476 + # source://thor//lib/thor.rb#615 def find_task_possibilities(meth); end - # source://thor//lib/thor.rb#436 + # source://thor//lib/thor.rb#575 def initialize_added; end + # Returns this class at least one of required options array set. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # source://thor//lib/thor.rb#458 + def method_at_least_one_option_names; end + + # Returns this class exclusive options array set. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # source://thor//lib/thor.rb#449 + def method_exclusive_option_names; end + # receives a (possibly nil) command name and returns a name that is in # the commands hash. In addition to normalizing aliases, this logic # will determine if a shortened command is an unambiguous substring of @@ -355,7 +540,7 @@ class Thor # # @raise [AmbiguousTaskError] # - # source://thor//lib/thor.rb#455 + # source://thor//lib/thor.rb#594 def normalize_command_name(meth); end # receives a (possibly nil) command name and returns a name that is in @@ -368,26 +553,40 @@ class Thor # # @raise [AmbiguousTaskError] # - # source://thor//lib/thor.rb#455 + # source://thor//lib/thor.rb#594 def normalize_task_name(meth); end + # source://thor//lib/thor.rb#482 + def print_at_least_one_required_options(shell, command = T.unsafe(nil)); end + + # source://thor//lib/thor.rb#471 + def print_exclusive_options(shell, command = T.unsafe(nil)); end + # Retrieve the command name from given args. # - # source://thor//lib/thor.rb#442 + # source://thor//lib/thor.rb#581 def retrieve_command_name(args); end # Retrieve the command name from given args. # - # source://thor//lib/thor.rb#442 + # source://thor//lib/thor.rb#581 def retrieve_task_name(args); end - # source://thor//lib/thor.rb#349 + # Sort the commands, lexicographically by default. + # + # Can be overridden in the subclass to change the display order of the + # commands. + # + # source://thor//lib/thor.rb#642 + def sort_commands!(list); end + + # source://thor//lib/thor.rb#462 def stop_on_unknown_option; end - # source://thor//lib/thor.rb#491 + # source://thor//lib/thor.rb#630 def subcommand_help(cmd); end - # source://thor//lib/thor.rb#491 + # source://thor//lib/thor.rb#630 def subtask_help(cmd); end end end @@ -463,7 +662,7 @@ module Thor::Actions # 'config.gem "rspec"' # end # - # source://thor//lib/thor/actions/file_manipulation.rb#195 + # source://thor//lib/thor/actions/file_manipulation.rb#193 def append_file(path, *args, &block); end # Append text to a file. Since it depends on insert_into_file, it's reversible. @@ -481,7 +680,7 @@ module Thor::Actions # 'config.gem "rspec"' # end # - # source://thor//lib/thor/actions/file_manipulation.rb#195 + # source://thor//lib/thor/actions/file_manipulation.rb#193 def append_to_file(path, *args, &block); end # Loads an external file and execute it in the instance binding. @@ -522,7 +721,7 @@ module Thor::Actions # # chmod "script/server", 0755 # - # source://thor//lib/thor/actions/file_manipulation.rb#148 + # source://thor//lib/thor/actions/file_manipulation.rb#146 def chmod(path, mode, config = T.unsafe(nil)); end # Comment all lines matching a given regex. It will leave the space @@ -538,7 +737,7 @@ module Thor::Actions # # comment_lines 'config/initializers/session_store.rb', /cookie_store/ # - # source://thor//lib/thor/actions/file_manipulation.rb#312 + # source://thor//lib/thor/actions/file_manipulation.rb#310 def comment_lines(path, flag, *args); end # ==== Examples @@ -673,17 +872,20 @@ module Thor::Actions # ==== Parameters # source:: the address of the given content. # destination:: the relative path to the destination root. - # config:: give :verbose => false to not log the status. + # config:: give :verbose => false to not log the status, and + # :http_headers => to add headers to an http request. # # ==== Examples # # get "http://gist.github.com/103208", "doc/README" # + # get "http://gist.github.com/103208", "doc/README", :http_headers => {"Content-Type" => "application/json"} + # # get "http://gist.github.com/103208" do |content| # content.split("\n").first # end # - # source://thor//lib/thor/actions/file_manipulation.rb#79 + # source://thor//lib/thor/actions/file_manipulation.rb#82 def get(source, *args, &block); end # Run a regular expression replacement on a file. @@ -703,7 +905,7 @@ module Thor::Actions # match << " no more. Use thor!" # end # - # source://thor//lib/thor/actions/file_manipulation.rb#265 + # source://thor//lib/thor/actions/file_manipulation.rb#263 def gsub_file(path, flag, *args, &block); end # Goes to the root and execute the given block. @@ -728,7 +930,7 @@ module Thor::Actions # " filter_parameter :password\n" # end # - # source://thor//lib/thor/actions/file_manipulation.rb#219 + # source://thor//lib/thor/actions/file_manipulation.rb#217 def inject_into_class(path, klass, *args, &block); end # source://thor//lib/thor/actions/inject_into_file.rb#26 @@ -751,7 +953,7 @@ module Thor::Actions # " def help; 'help'; end\n" # end # - # source://thor//lib/thor/actions/file_manipulation.rb#242 + # source://thor//lib/thor/actions/file_manipulation.rb#240 def inject_into_module(path, module_name, *args, &block); end # source://thor//lib/thor/actions/inject_into_file.rb#26 @@ -803,7 +1005,7 @@ module Thor::Actions # 'config.gem "rspec"' # end # - # source://thor//lib/thor/actions/file_manipulation.rb#173 + # source://thor//lib/thor/actions/file_manipulation.rb#171 def prepend_file(path, *args, &block); end # Prepend text to a file. Since it depends on insert_into_file, it's reversible. @@ -821,7 +1023,7 @@ module Thor::Actions # 'config.gem "rspec"' # end # - # source://thor//lib/thor/actions/file_manipulation.rb#173 + # source://thor//lib/thor/actions/file_manipulation.rb#171 def prepend_to_file(path, *args, &block); end # Returns the given path relative to the absolute root (ie, root where @@ -841,7 +1043,7 @@ module Thor::Actions # remove_file 'README' # remove_file 'app/controllers/application_controller.rb' # - # source://thor//lib/thor/actions/file_manipulation.rb#329 + # source://thor//lib/thor/actions/file_manipulation.rb#327 def remove_dir(path, config = T.unsafe(nil)); end # Removes a file at the given location. @@ -855,7 +1057,7 @@ module Thor::Actions # remove_file 'README' # remove_file 'app/controllers/application_controller.rb' # - # source://thor//lib/thor/actions/file_manipulation.rb#329 + # source://thor//lib/thor/actions/file_manipulation.rb#327 def remove_file(path, config = T.unsafe(nil)); end # Executes a command returning the contents of the command. @@ -871,7 +1073,7 @@ module Thor::Actions # run('ln -s ~/edge rails') # end # - # source://thor//lib/thor/actions.rb#249 + # source://thor//lib/thor/actions.rb#248 def run(command, config = T.unsafe(nil)); end # Executes a ruby script (taking into account WIN32 platform quirks). @@ -880,7 +1082,7 @@ module Thor::Actions # command:: the command to be executed. # config:: give :verbose => false to not log the status. # - # source://thor//lib/thor/actions.rb#286 + # source://thor//lib/thor/actions.rb#285 def run_ruby_script(command, config = T.unsafe(nil)); end # Holds source paths in instance so they can be manipulated. @@ -903,7 +1105,7 @@ module Thor::Actions # # template "doc/README" # - # source://thor//lib/thor/actions/file_manipulation.rb#115 + # source://thor//lib/thor/actions/file_manipulation.rb#118 def template(source, *args, &block); end # Run a thor command. A hash of options can be given and it's converted to @@ -924,7 +1126,7 @@ module Thor::Actions # thor :list, :all => true, :substring => 'rails' # #=> thor list --all --substring=rails # - # source://thor//lib/thor/actions.rb#309 + # source://thor//lib/thor/actions.rb#308 def thor(command, *args); end # Uncomment all lines matching a given regex. It will leave the space @@ -940,40 +1142,40 @@ module Thor::Actions # # uncomment_lines 'config/initializers/session_store.rb', /active_record/ # - # source://thor//lib/thor/actions/file_manipulation.rb#293 + # source://thor//lib/thor/actions/file_manipulation.rb#291 def uncomment_lines(path, flag, *args); end protected - # source://thor//lib/thor/actions.rb#330 + # source://thor//lib/thor/actions.rb#329 def _cleanup_options_and_set(options, key); end # Allow current root to be shared between invocations. # - # source://thor//lib/thor/actions.rb#326 + # source://thor//lib/thor/actions.rb#325 def _shared_configuration; end private - # source://thor//lib/thor/actions/file_manipulation.rb#350 + # source://thor//lib/thor/actions/file_manipulation.rb#348 def capture(*args); end - # source://thor//lib/thor/actions/file_manipulation.rb#346 + # source://thor//lib/thor/actions/file_manipulation.rb#344 def concat(string); end # Returns the value of attribute output_buffer. # - # source://thor//lib/thor/actions/file_manipulation.rb#341 + # source://thor//lib/thor/actions/file_manipulation.rb#339 def output_buffer; end # Sets the attribute output_buffer # # @param value the value to set the attribute output_buffer to. # - # source://thor//lib/thor/actions/file_manipulation.rb#341 + # source://thor//lib/thor/actions/file_manipulation.rb#339 def output_buffer=(_arg0); end - # source://thor//lib/thor/actions/file_manipulation.rb#354 + # source://thor//lib/thor/actions/file_manipulation.rb#352 def with_output_buffer(buf = T.unsafe(nil)); end class << self @@ -985,9 +1187,9 @@ end # Thor::Actions#capture depends on what kind of buffer is used in ERB. # Thus CapturableERB fixes ERB to use String buffer. # -# source://thor//lib/thor/actions/file_manipulation.rb#366 +# source://thor//lib/thor/actions/file_manipulation.rb#364 class Thor::Actions::CapturableERB < ::ERB - # source://thor//lib/thor/actions/file_manipulation.rb#367 + # source://thor//lib/thor/actions/file_manipulation.rb#365 def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end end @@ -1043,12 +1245,12 @@ class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory # source://thor//lib/thor/actions/create_file.rb#45 def identical?; end - # source://thor//lib/thor/actions/create_file.rb#59 + # source://thor//lib/thor/actions/create_file.rb#60 def invoke!; end # Holds the content to be added to the file. # - # source://thor//lib/thor/actions/create_file.rb#51 + # source://thor//lib/thor/actions/create_file.rb#52 def render; end protected @@ -1057,19 +1259,19 @@ class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory # # @return [Boolean] # - # source://thor//lib/thor/actions/create_file.rb#99 + # source://thor//lib/thor/actions/create_file.rb#100 def force_on_collision?; end # If force is true, run the action, otherwise check if it's not being # skipped. If both are false, show the file_collision menu, if the menu # returns true, force it, otherwise skip. # - # source://thor//lib/thor/actions/create_file.rb#85 + # source://thor//lib/thor/actions/create_file.rb#86 def force_or_skip_or_conflict(force, skip, &block); end # Now on conflict we check if the file is identical or not. # - # source://thor//lib/thor/actions/create_file.rb#72 + # source://thor//lib/thor/actions/create_file.rb#73 def on_conflict_behavior(&block); end end @@ -1261,17 +1463,25 @@ class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory # source://thor//lib/thor/actions/inject_into_file.rb#37 def replacement; end - # source://thor//lib/thor/actions/inject_into_file.rb#72 + # source://thor//lib/thor/actions/inject_into_file.rb#74 def revoke!; end protected + # source://thor//lib/thor/actions/inject_into_file.rb#110 + def content; end + # Adds the content to the file. # - # source://thor//lib/thor/actions/inject_into_file.rb#108 + # source://thor//lib/thor/actions/inject_into_file.rb#120 def replace!(regexp, string, force); end - # source://thor//lib/thor/actions/inject_into_file.rb#88 + # @return [Boolean] + # + # source://thor//lib/thor/actions/inject_into_file.rb#114 + def replacement_present?; end + + # source://thor//lib/thor/actions/inject_into_file.rb#90 def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end end @@ -1297,10 +1507,10 @@ end # source://thor//lib/thor/actions/inject_into_file.rb#24 Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash) -# source://thor//lib/thor/error.rb#68 +# source://thor//lib/thor/error.rb#57 class Thor::AmbiguousCommandError < ::Thor::Error; end -# source://thor//lib/thor/error.rb#70 +# source://thor//lib/thor/error.rb#59 Thor::AmbiguousTaskError = Thor::AmbiguousCommandError # source://thor//lib/thor/parser/argument.rb#2 @@ -1331,6 +1541,9 @@ class Thor::Argument # source://thor//lib/thor/parser/argument.rb#5 def enum; end + # source://thor//lib/thor/parser/argument.rb#55 + def enum_to_s; end + # Returns the value of attribute name. # # source://thor//lib/thor/parser/argument.rb#5 @@ -1341,6 +1554,9 @@ class Thor::Argument # source://thor//lib/thor/parser/argument.rb#5 def name; end + # source://thor//lib/thor/parser/argument.rb#27 + def print_default; end + # Returns the value of attribute required. # # source://thor//lib/thor/parser/argument.rb#5 @@ -1348,12 +1564,12 @@ class Thor::Argument # @return [Boolean] # - # source://thor//lib/thor/parser/argument.rb#31 + # source://thor//lib/thor/parser/argument.rb#42 def required?; end # @return [Boolean] # - # source://thor//lib/thor/parser/argument.rb#35 + # source://thor//lib/thor/parser/argument.rb#46 def show_default?; end # Returns the value of attribute type. @@ -1361,22 +1577,22 @@ class Thor::Argument # source://thor//lib/thor/parser/argument.rb#5 def type; end - # source://thor//lib/thor/parser/argument.rb#27 + # source://thor//lib/thor/parser/argument.rb#38 def usage; end protected - # source://thor//lib/thor/parser/argument.rb#55 + # source://thor//lib/thor/parser/argument.rb#74 def default_banner; end # @return [Boolean] # - # source://thor//lib/thor/parser/argument.rb#51 + # source://thor//lib/thor/parser/argument.rb#70 def valid_type?(type); end # @raise [ArgumentError] # - # source://thor//lib/thor/parser/argument.rb#46 + # source://thor//lib/thor/parser/argument.rb#65 def validate!; end end @@ -1392,10 +1608,10 @@ class Thor::Arguments # source://thor//lib/thor/parser/arguments.rb#26 def initialize(arguments = T.unsafe(nil)); end - # source://thor//lib/thor/parser/arguments.rb#44 + # source://thor//lib/thor/parser/arguments.rb#40 def parse(args); end - # source://thor//lib/thor/parser/arguments.rb#57 + # source://thor//lib/thor/parser/arguments.rb#53 def remaining; end private @@ -1404,22 +1620,22 @@ class Thor::Arguments # # @raise [RequiredArgumentMissingError] # - # source://thor//lib/thor/parser/arguments.rb#170 + # source://thor//lib/thor/parser/arguments.rb#186 def check_requirement!; end # @return [Boolean] # - # source://thor//lib/thor/parser/arguments.rb#88 + # source://thor//lib/thor/parser/arguments.rb#84 def current_is_value?; end # @return [Boolean] # - # source://thor//lib/thor/parser/arguments.rb#68 + # source://thor//lib/thor/parser/arguments.rb#64 def last?; end # @return [Boolean] # - # source://thor//lib/thor/parser/arguments.rb#63 + # source://thor//lib/thor/parser/arguments.rb#59 def no_or_skip?(arg); end # Runs through the argument array getting all strings until no string is @@ -1431,7 +1647,7 @@ class Thor::Arguments # # ["a", "b", "c"] # - # source://thor//lib/thor/parser/arguments.rb#122 + # source://thor//lib/thor/parser/arguments.rb#118 def parse_array(name); end # Runs through the argument array getting strings that contains ":" and @@ -1443,14 +1659,14 @@ class Thor::Arguments # # { "name" => "string", "age" => "integer" } # - # source://thor//lib/thor/parser/arguments.rb#101 + # source://thor//lib/thor/parser/arguments.rb#97 def parse_hash(name); end # Check if the peek is numeric format and return a Float or Integer. # Check if the peek is included in enum if enum is provided. # Otherwise raises an error. # - # source://thor//lib/thor/parser/arguments.rb#133 + # source://thor//lib/thor/parser/arguments.rb#139 def parse_numeric(name); end # Parse string: @@ -1458,18 +1674,23 @@ class Thor::Arguments # for --no-string-arg, nil # Check if the peek is included in enum if enum is provided. Otherwise raises an error. # - # source://thor//lib/thor/parser/arguments.rb#154 + # source://thor//lib/thor/parser/arguments.rb#158 def parse_string(name); end - # source://thor//lib/thor/parser/arguments.rb#72 + # source://thor//lib/thor/parser/arguments.rb#68 def peek; end - # source://thor//lib/thor/parser/arguments.rb#76 + # source://thor//lib/thor/parser/arguments.rb#72 def shift; end - # source://thor//lib/thor/parser/arguments.rb#80 + # source://thor//lib/thor/parser/arguments.rb#76 def unshift(arg); end + # Raises an error if the switch is an enum and the values aren't included on it. + # + # source://thor//lib/thor/parser/arguments.rb#172 + def validate_enum_value!(name, value, message); end + class << self # source://thor//lib/thor/parser/arguments.rb#19 def parse(*args); end @@ -1485,6 +1706,9 @@ end # source://thor//lib/thor/parser/arguments.rb#3 Thor::Arguments::NUMERIC = T.let(T.unsafe(nil), Regexp) +# source://thor//lib/thor/error.rb#104 +class Thor::AtLeastOneRequiredArgumentError < ::Thor::InvocationError; end + # source://thor//lib/thor/shell.rb#4 module Thor::Base include ::Thor::Invocation @@ -1549,13 +1773,13 @@ module Thor::Base def parent_options=(_arg0); end class << self - # source://thor//lib/thor/base.rb#100 + # source://thor//lib/thor/base.rb#116 def included(base); end # Whenever a class inherits from Thor or Thor::Group, we should track the # class and the file on Thor::Base. This is the method responsible for it. # - # source://thor//lib/thor/base.rb#128 + # source://thor//lib/thor/base.rb#144 def register_klass_file(klass); end # Returns the shell used in all Thor classes. If you are in a Unix platform @@ -1576,7 +1800,7 @@ module Thor::Base # ==== Returns # Hash[path => Class] # - # source://thor//lib/thor/base.rb#121 + # source://thor//lib/thor/base.rb#137 def subclass_files; end # Returns the classes that inherits from Thor or Thor::Group. @@ -1584,12 +1808,12 @@ module Thor::Base # ==== Returns # Array[Class] # - # source://thor//lib/thor/base.rb#112 + # source://thor//lib/thor/base.rb#128 def subclasses; end end end -# source://thor//lib/thor/base.rb#137 +# source://thor//lib/thor/base.rb#153 module Thor::Base::ClassMethods # Returns the commands for this Thor class and all subclasses. # @@ -1597,7 +1821,7 @@ module Thor::Base::ClassMethods # Hash:: An ordered hash with commands names as keys and Thor::Command # objects as values. # - # source://thor//lib/thor/base.rb#383 + # source://thor//lib/thor/base.rb#482 def all_commands; end # Returns the commands for this Thor class and all subclasses. @@ -1606,13 +1830,13 @@ module Thor::Base::ClassMethods # Hash:: An ordered hash with commands names as keys and Thor::Command # objects as values. # - # source://thor//lib/thor/base.rb#383 + # source://thor//lib/thor/base.rb#482 def all_tasks; end # If you want to use defaults that don't match the type of an option, # either specify `check_default_type: false` or call `allow_incompatible_default_type!` # - # source://thor//lib/thor/base.rb#173 + # source://thor//lib/thor/base.rb#189 def allow_incompatible_default_type!; end # Adds an argument to the class and creates an attr_accessor for it. @@ -1650,7 +1874,7 @@ module Thor::Base::ClassMethods # ==== Errors # ArgumentError:: Raised if you supply a required argument after a non required one. # - # source://thor//lib/thor/base.rb#245 + # source://thor//lib/thor/base.rb#261 def argument(name, options = T.unsafe(nil)); end # Returns this class arguments, looking up in the ancestors chain. @@ -1658,42 +1882,116 @@ module Thor::Base::ClassMethods # ==== Returns # Array[Thor::Argument] # - # source://thor//lib/thor/base.rb#277 + # source://thor//lib/thor/base.rb#293 def arguments; end - # source://thor//lib/thor/base.rb#146 + # source://thor//lib/thor/base.rb#162 def attr_accessor(*_arg0); end - # source://thor//lib/thor/base.rb#138 + # source://thor//lib/thor/base.rb#154 def attr_reader(*_arg0); end - # source://thor//lib/thor/base.rb#142 + # source://thor//lib/thor/base.rb#158 def attr_writer(*_arg0); end - # source://thor//lib/thor/base.rb#177 + # source://thor//lib/thor/base.rb#193 def check_default_type; end # If you want to raise an error when the default value of an option does not match # the type call check_default_type! # This will be the default; for compatibility a deprecation warning is issued if necessary. # - # source://thor//lib/thor/base.rb#167 + # source://thor//lib/thor/base.rb#183 def check_default_type!; end - # source://thor//lib/thor/base.rb#156 + # source://thor//lib/thor/base.rb#172 def check_unknown_options; end # If you want to raise an error for unknown options, call check_unknown_options! # This is disabled by default to allow dynamic invocations. # - # source://thor//lib/thor/base.rb#152 + # source://thor//lib/thor/base.rb#168 def check_unknown_options!; end # @return [Boolean] # - # source://thor//lib/thor/base.rb#160 + # source://thor//lib/thor/base.rb#176 def check_unknown_options?(config); end + # Adds and declares option group for required at least one of options in the + # block and arguments. You can declare options as the outside of the block. + # + # ==== Examples + # + # class_at_least_one do + # class_option :one + # class_option :two + # end + # + # Or + # + # class_option :one + # class_option :two + # class_at_least_one :one, :two + # + # If you do not give "--one" and "--two" AtLeastOneRequiredArgumentError + # will be raised. + # + # You can use class_at_least_one and class_exclusive at the same time. + # + # class_exclusive do + # class_at_least_one do + # class_option :one + # class_option :two + # end + # end + # + # Then it is required either only one of "--one" or "--two". + # + # source://thor//lib/thor/base.rb#392 + def class_at_least_one(*args, &block); end + + # Returns this class at least one of required options array set, looking up in the ancestors chain. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # source://thor//lib/thor/base.rb#411 + def class_at_least_one_option_names; end + + # Adds and declares option group for exclusive options in the + # block and arguments. You can declare options as the outside of the block. + # + # ==== Parameters + # Array[Thor::Option.name] + # + # ==== Examples + # + # class_exclusive do + # class_option :one + # class_option :two + # end + # + # Or + # + # class_option :one + # class_option :two + # class_exclusive :one, :two + # + # If you give "--one" and "--two" at the same time ExclusiveArgumentsError + # will be raised. + # + # source://thor//lib/thor/base.rb#357 + def class_exclusive(*args, &block); end + + # Returns this class exclusive options array set, looking up in the ancestors chain. + # + # ==== Returns + # Array[Array[Thor::Option.name]] + # + # source://thor//lib/thor/base.rb#402 + def class_exclusive_option_names; end + # Adds an option to the set of class options # # ==== Parameters @@ -1710,7 +2008,7 @@ module Thor::Base::ClassMethods # :banner:: -- String to show on usage notes. # :hide:: -- If you want to hide this option from the help. # - # source://thor//lib/thor/base.rb#312 + # source://thor//lib/thor/base.rb#328 def class_option(name, options = T.unsafe(nil)); end # Adds a bunch of options to the set of class options. @@ -1722,7 +2020,7 @@ module Thor::Base::ClassMethods # ==== Parameters # Hash[Symbol => Object] # - # source://thor//lib/thor/base.rb#290 + # source://thor//lib/thor/base.rb#306 def class_options(options = T.unsafe(nil)); end # Returns the commands for this Thor class. @@ -1731,7 +2029,7 @@ module Thor::Base::ClassMethods # Hash:: An ordered hash with commands names as keys and Thor::Command # objects as values. # - # source://thor//lib/thor/base.rb#372 + # source://thor//lib/thor/base.rb#471 def commands; end # If true, option set will not suspend the execution of the command when @@ -1739,14 +2037,14 @@ module Thor::Base::ClassMethods # # @return [Boolean] # - # source://thor//lib/thor/base.rb#191 + # source://thor//lib/thor/base.rb#207 def disable_required_check?(command_name); end # A flag that makes the process exit with status 1 if any error happens. # # @return [Boolean] # - # source://thor//lib/thor/base.rb#529 + # source://thor//lib/thor/base.rb#628 def exit_on_failure?; end # Defines the group. This is used when thor list is invoked so you can specify @@ -1755,22 +2053,22 @@ module Thor::Base::ClassMethods # ==== Parameters # name # - # source://thor//lib/thor/base.rb#358 + # source://thor//lib/thor/base.rb#457 def group(name = T.unsafe(nil)); end # @raise [InvocationError] # - # source://thor//lib/thor/base.rb#519 + # source://thor//lib/thor/base.rb#618 def handle_argument_error(command, error, args, arity); end # @raise [UndefinedCommandError] # - # source://thor//lib/thor/base.rb#514 + # source://thor//lib/thor/base.rb#613 def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end # @raise [UndefinedCommandError] # - # source://thor//lib/thor/base.rb#514 + # source://thor//lib/thor/base.rb#613 def handle_no_task_error(command, has_namespace = T.unsafe(nil)); end # Sets the namespace for the Thor or Thor::Group class. By default the @@ -1795,7 +2093,7 @@ module Thor::Base::ClassMethods # # thor :my_command # - # source://thor//lib/thor/base.rb#467 + # source://thor//lib/thor/base.rb#566 def namespace(name = T.unsafe(nil)); end # All methods defined inside the given block are not added as commands. @@ -1817,15 +2115,15 @@ module Thor::Base::ClassMethods # remove_command :this_is_not_a_command # end # - # source://thor//lib/thor/base.rb#431 + # source://thor//lib/thor/base.rb#530 def no_commands(&block); end # @return [Boolean] # - # source://thor//lib/thor/base.rb#441 + # source://thor//lib/thor/base.rb#540 def no_commands?; end - # source://thor//lib/thor/base.rb#437 + # source://thor//lib/thor/base.rb#536 def no_commands_context; end # All methods defined inside the given block are not added as commands. @@ -1847,7 +2145,7 @@ module Thor::Base::ClassMethods # remove_command :this_is_not_a_command # end # - # source://thor//lib/thor/base.rb#431 + # source://thor//lib/thor/base.rb#530 def no_tasks(&block); end # Allows to use private methods from parent in child classes as commands. @@ -1860,7 +2158,7 @@ module Thor::Base::ClassMethods # public_command :foo # public_command :foo, :bar, :baz # - # source://thor//lib/thor/base.rb#507 + # source://thor//lib/thor/base.rb#606 def public_command(*names); end # Allows to use private methods from parent in child classes as commands. @@ -1873,7 +2171,7 @@ module Thor::Base::ClassMethods # public_command :foo # public_command :foo, :bar, :baz # - # source://thor//lib/thor/base.rb#507 + # source://thor//lib/thor/base.rb#606 def public_task(*names); end # Removes a previous defined argument. If :undefine is given, undefine @@ -1887,7 +2185,7 @@ module Thor::Base::ClassMethods # remove_argument :foo # remove_argument :foo, :bar, :baz, :undefine => true # - # source://thor//lib/thor/base.rb#327 + # source://thor//lib/thor/base.rb#426 def remove_argument(*names); end # Removes a previous defined class option. @@ -1900,7 +2198,7 @@ module Thor::Base::ClassMethods # remove_class_option :foo # remove_class_option :foo, :bar, :baz # - # source://thor//lib/thor/base.rb#346 + # source://thor//lib/thor/base.rb#445 def remove_class_option(*names); end # Removes a given command from this Thor class. This is usually done if you @@ -1915,7 +2213,7 @@ module Thor::Base::ClassMethods # options:: You can give :undefine => true if you want commands the method # to be undefined from the class as well. # - # source://thor//lib/thor/base.rb#401 + # source://thor//lib/thor/base.rb#500 def remove_command(*names); end # Removes a given command from this Thor class. This is usually done if you @@ -1930,7 +2228,7 @@ module Thor::Base::ClassMethods # options:: You can give :undefine => true if you want commands the method # to be undefined from the class as well. # - # source://thor//lib/thor/base.rb#401 + # source://thor//lib/thor/base.rb#500 def remove_task(*names); end # Parses the command and options from the given args, instantiate the class @@ -1941,7 +2239,7 @@ module Thor::Base::ClassMethods # script = MyScript.new(args, options, config) # script.invoke(:command, first_arg, second_arg, third_arg) # - # source://thor//lib/thor/base.rb#483 + # source://thor//lib/thor/base.rb#582 def start(given_args = T.unsafe(nil), config = T.unsafe(nil)); end # If true, option parsing is suspended as soon as an unknown option or a @@ -1950,22 +2248,22 @@ module Thor::Base::ClassMethods # # @return [Boolean] # - # source://thor//lib/thor/base.rb#185 + # source://thor//lib/thor/base.rb#201 def stop_on_unknown_option?(command_name); end - # source://thor//lib/thor/base.rb#202 + # source://thor//lib/thor/base.rb#218 def strict_args_position; end # If you want only strict string args (useful when cascading thor classes), # call strict_args_position! This is disabled by default to allow dynamic # invocations. # - # source://thor//lib/thor/base.rb#198 + # source://thor//lib/thor/base.rb#214 def strict_args_position!; end # @return [Boolean] # - # source://thor//lib/thor/base.rb#206 + # source://thor//lib/thor/base.rb#222 def strict_args_position?(config); end # Returns the commands for this Thor class. @@ -1974,7 +2272,7 @@ module Thor::Base::ClassMethods # Hash:: An ordered hash with commands names as keys and Thor::Command # objects as values. # - # source://thor//lib/thor/base.rb#372 + # source://thor//lib/thor/base.rb#471 def tasks; end protected @@ -1982,12 +2280,12 @@ module Thor::Base::ClassMethods # SIGNATURE: Sets the baseclass. This is where the superclass lookup # finishes. # - # source://thor//lib/thor/base.rb#678 + # source://thor//lib/thor/base.rb#777 def baseclass; end # The basename of the program invoking the thor class. # - # source://thor//lib/thor/base.rb#672 + # source://thor//lib/thor/base.rb#771 def basename; end # Build an option and adds it to the given scope. @@ -1997,7 +2295,7 @@ module Thor::Base::ClassMethods # options:: Described in both class_option and method_option. # scope:: Options hash that is being built up # - # source://thor//lib/thor/base.rb#589 + # source://thor//lib/thor/base.rb#688 def build_option(name, options, scope); end # Receives a hash of options, parse them and add to the scope. This is a @@ -2008,83 +2306,100 @@ module Thor::Base::ClassMethods # ==== Parameters # Hash[Symbol => Object] # - # source://thor//lib/thor/base.rb#600 + # source://thor//lib/thor/base.rb#699 def build_options(options, scope); end + # Get target(method_options or class_options) options + # of before and after by block evaluation. + # + # source://thor//lib/thor/base.rb#808 + def built_option_names(target, opt = T.unsafe(nil), &block); end + # Prints the class options per group. If an option does not belong to # any group, it's printed as Class option. # - # source://thor//lib/thor/base.rb#539 + # source://thor//lib/thor/base.rb#638 def class_options_help(shell, groups = T.unsafe(nil)); end + # Get command scope member by name. + # + # source://thor//lib/thor/base.rb#816 + def command_scope_member(name, options = T.unsafe(nil)); end + # SIGNATURE: Creates a new command if valid_command? is true. This method is # called when a new method is added to the class. # - # source://thor//lib/thor/base.rb#683 + # source://thor//lib/thor/base.rb#782 def create_command(meth); end # SIGNATURE: Creates a new command if valid_command? is true. This method is # called when a new method is added to the class. # - # source://thor//lib/thor/base.rb#683 + # source://thor//lib/thor/base.rb#782 def create_task(meth); end # SIGNATURE: The hook invoked by start. # # @raise [NotImplementedError] # - # source://thor//lib/thor/base.rb#693 + # source://thor//lib/thor/base.rb#792 def dispatch(command, given_args, given_opts, config); end # Finds a command with the given name. If the command belongs to the current # class, just return it, otherwise dup it and add the fresh copy to the # current command hash. # - # source://thor//lib/thor/base.rb#609 + # source://thor//lib/thor/base.rb#708 def find_and_refresh_command(name); end # Finds a command with the given name. If the command belongs to the current # class, just return it, otherwise dup it and add the fresh copy to the # current command hash. # - # source://thor//lib/thor/base.rb#609 + # source://thor//lib/thor/base.rb#708 def find_and_refresh_task(name); end # Retrieves a value from superclass. If it reaches the baseclass, # returns default. # - # source://thor//lib/thor/base.rb#650 + # source://thor//lib/thor/base.rb#749 def from_superclass(method, default = T.unsafe(nil)); end # Every time someone inherits from a Thor class, register the klass # and file into baseclass. # - # source://thor//lib/thor/base.rb#622 + # source://thor//lib/thor/base.rb#721 def inherited(klass); end # SIGNATURE: Defines behavior when the initialize method is added to the # class. # - # source://thor//lib/thor/base.rb#689 + # source://thor//lib/thor/base.rb#788 def initialize_added; end # Raises an error if the word given is a Thor reserved word. # # @return [Boolean] # - # source://thor//lib/thor/base.rb#578 + # source://thor//lib/thor/base.rb#677 def is_thor_reserved_word?(word, type); end # Fire this callback whenever a method is added. Added methods are # tracked as commands by invoking the create_command method. # - # source://thor//lib/thor/base.rb#630 + # source://thor//lib/thor/base.rb#729 def method_added(meth); end # Receives a set of options and print them. # - # source://thor//lib/thor/base.rb#557 + # source://thor//lib/thor/base.rb#656 def print_options(shell, options, group_name = T.unsafe(nil)); end + + # Register a relation of options for target(method_option/class_option) + # by args and block. + # + # source://thor//lib/thor/base.rb#798 + def register_options_relation_for(target, relation, *args, &block); end end # source://thor//lib/thor/command.rb#2 @@ -2092,68 +2407,74 @@ class Thor::Command < ::Struct # @return [Command] a new instance of Command # # source://thor//lib/thor/command.rb#5 - def initialize(name, description, long_description, usage, options = T.unsafe(nil)); end + def initialize(name, description, long_description, wrap_long_description, usage, options = T.unsafe(nil), options_relation = T.unsafe(nil)); end # Returns the formatted usage by injecting given required arguments # and required options into the given usage. # - # source://thor//lib/thor/command.rb#41 + # source://thor//lib/thor/command.rb#42 def formatted_usage(klass, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end # @return [Boolean] # - # source://thor//lib/thor/command.rb#14 + # source://thor//lib/thor/command.rb#15 def hidden?; end + # source://thor//lib/thor/command.rb#70 + def method_at_least_one_option_names; end + + # source://thor//lib/thor/command.rb#66 + def method_exclusive_option_names; end + # By default, a command invokes a method in the thor class. You can change this # implementation to create custom commands. # - # source://thor//lib/thor/command.rb#20 + # source://thor//lib/thor/command.rb#21 def run(instance, args = T.unsafe(nil)); end protected # @return [Boolean] # - # source://thor//lib/thor/command.rb#105 + # source://thor//lib/thor/command.rb#114 def handle_argument_error?(instance, error, caller); end # @return [Boolean] # - # source://thor//lib/thor/command.rb#112 + # source://thor//lib/thor/command.rb#121 def handle_no_method_error?(instance, error, caller); end # @return [Boolean] # - # source://thor//lib/thor/command.rb#95 + # source://thor//lib/thor/command.rb#104 def local_method?(instance, name); end # @return [Boolean] # - # source://thor//lib/thor/command.rb#78 + # source://thor//lib/thor/command.rb#87 def not_debugging?(instance); end # @return [Boolean] # - # source://thor//lib/thor/command.rb#91 + # source://thor//lib/thor/command.rb#100 def private_method?(instance); end # Given a target, checks if this class name is a public method. # # @return [Boolean] # - # source://thor//lib/thor/command.rb#87 + # source://thor//lib/thor/command.rb#96 def public_method?(instance); end # Add usage with required arguments # - # source://thor//lib/thor/command.rb#68 + # source://thor//lib/thor/command.rb#77 def required_arguments_for(klass, usage); end - # source://thor//lib/thor/command.rb#82 + # source://thor//lib/thor/command.rb#91 def required_options; end - # source://thor//lib/thor/command.rb#100 + # source://thor//lib/thor/command.rb#109 def sans_backtrace(backtrace, caller); end private @@ -2200,35 +2521,38 @@ class Thor::CoreExt::HashWithIndifferentAccess < ::Hash # @return [Boolean] # - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#45 def key?(key); end - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#53 def merge(other); end - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#53 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#57 def merge!(other); end - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#72 def replace(other_hash); end - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#60 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64 def reverse_merge(other); end - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68 def reverse_merge!(other_hash); end + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41 + def slice(*keys); end + # Convert to a Hash with String keys. # - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#73 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#77 def to_hash; end - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#45 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49 def values_at(*indices); end protected - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#79 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#83 def convert_key(key); end # Magic predicates. For instance: @@ -2237,33 +2561,33 @@ class Thor::CoreExt::HashWithIndifferentAccess < ::Hash # options.shebang # => "/usr/lib/local/ruby" # options.test_framework?(:rspec) # => options[:test_framework] == :rspec # - # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#89 + # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#93 def method_missing(method, *args); end end -# source://thor//lib/thor/error.rb#14 +# source://thor//lib/thor/error.rb#3 module Thor::Correctable - # source://thor//lib/thor/error.rb#19 + # source://thor//lib/thor/error.rb#8 def corrections; end - # source://thor//lib/thor/error.rb#15 + # source://thor//lib/thor/error.rb#4 def to_s; end end # A dynamic command that handles method missing scenarios. # -# source://thor//lib/thor/command.rb#128 +# source://thor//lib/thor/command.rb#137 class Thor::DynamicCommand < ::Thor::Command # @return [DynamicCommand] a new instance of DynamicCommand # - # source://thor//lib/thor/command.rb#129 + # source://thor//lib/thor/command.rb#138 def initialize(name, options = T.unsafe(nil)); end - # source://thor//lib/thor/command.rb#133 + # source://thor//lib/thor/command.rb#142 def run(instance, args = T.unsafe(nil)); end end -# source://thor//lib/thor/command.rb#141 +# source://thor//lib/thor/command.rb#150 Thor::DynamicTask = Thor::DynamicCommand # Thor::Error is raised when it's caused by wrong usage of thor classes. Those @@ -2273,9 +2597,12 @@ Thor::DynamicTask = Thor::DynamicCommand # overwrites a thor keyword, SHOULD NOT raise a Thor::Error. This way, we # ensure that developer errors are shown with full backtrace. # -# source://thor//lib/thor/error.rb#31 +# source://thor//lib/thor/error.rb#20 class Thor::Error < ::StandardError; end +# source://thor//lib/thor/error.rb#101 +class Thor::ExclusiveArgumentError < ::Thor::InvocationError; end + # Thor has a special class called Thor::Group. The main difference to Thor class # is that it invokes all commands at once. It also include some methods that allows # invocations to be done at the class method, which are not available to Thor @@ -2449,15 +2776,15 @@ Thor::HELP_MAPPINGS = T.let(T.unsafe(nil), Array) # A command that is hidden in help messages but still invocable. # -# source://thor//lib/thor/command.rb#120 +# source://thor//lib/thor/command.rb#129 class Thor::HiddenCommand < ::Thor::Command # @return [Boolean] # - # source://thor//lib/thor/command.rb#121 + # source://thor//lib/thor/command.rb#130 def hidden?; end end -# source://thor//lib/thor/command.rb#125 +# source://thor//lib/thor/command.rb#134 Thor::HiddenTask = Thor::HiddenCommand # source://thor//lib/thor/invocation.rb#2 @@ -2611,7 +2938,7 @@ end # Raised when a command was found, but not invoked properly. # -# source://thor//lib/thor/error.rb#73 +# source://thor//lib/thor/error.rb#62 class Thor::InvocationError < ::Thor::Error; end # source://thor//lib/thor/line_editor/basic.rb#2 @@ -2724,7 +3051,7 @@ class Thor::LineEditor::Readline::PathCompletion def text; end end -# source://thor//lib/thor/error.rb#109 +# source://thor//lib/thor/error.rb#98 class Thor::MalformattedArgumentError < ::Thor::InvocationError; end # source://thor//lib/thor/nested_context.rb#2 @@ -2751,12 +3078,6 @@ class Thor::NestedContext def push; end end -# source://thor//lib/thor/error.rb#8 -class Thor::NoKwargSpellChecker < ::DidYouMean::SpellChecker - # source://thor//lib/thor/error.rb#9 - def initialize(dictionary); end -end - # source://thor//lib/thor/parser/option.rb#2 class Thor::Option < ::Thor::Argument # @return [Option] a new instance of Option @@ -2772,10 +3093,10 @@ class Thor::Option < ::Thor::Argument # source://thor//lib/thor/parser/option.rb#99 def aliases_for_usage; end - # source://thor//lib/thor/parser/option.rb#109 + # source://thor//lib/thor/parser/option.rb#118 def array?; end - # source://thor//lib/thor/parser/option.rb#109 + # source://thor//lib/thor/parser/option.rb#118 def boolean?; end # Returns the value of attribute group. @@ -2783,7 +3104,7 @@ class Thor::Option < ::Thor::Argument # source://thor//lib/thor/parser/option.rb#3 def group; end - # source://thor//lib/thor/parser/option.rb#109 + # source://thor//lib/thor/parser/option.rb#118 def hash?; end # Returns the value of attribute hide. @@ -2799,7 +3120,7 @@ class Thor::Option < ::Thor::Argument # source://thor//lib/thor/parser/option.rb#3 def lazy_default; end - # source://thor//lib/thor/parser/option.rb#109 + # source://thor//lib/thor/parser/option.rb#118 def numeric?; end # Returns the value of attribute repeatable. @@ -2807,7 +3128,12 @@ class Thor::Option < ::Thor::Argument # source://thor//lib/thor/parser/option.rb#3 def repeatable; end - # source://thor//lib/thor/parser/option.rb#109 + # @return [Boolean] + # + # source://thor//lib/thor/parser/option.rb#107 + def show_default?; end + + # source://thor//lib/thor/parser/option.rb#118 def string?; end # source://thor//lib/thor/parser/option.rb#75 @@ -2818,25 +3144,30 @@ class Thor::Option < ::Thor::Argument protected - # source://thor//lib/thor/parser/option.rb#159 + # source://thor//lib/thor/parser/option.rb#168 def dasherize(str); end # @return [Boolean] # - # source://thor//lib/thor/parser/option.rb#151 + # source://thor//lib/thor/parser/option.rb#160 def dasherized?; end - # source://thor//lib/thor/parser/option.rb#155 + # source://thor//lib/thor/parser/option.rb#164 def undasherize(str); end # @raise [ArgumentError] # - # source://thor//lib/thor/parser/option.rb#117 + # source://thor//lib/thor/parser/option.rb#126 def validate!; end - # source://thor//lib/thor/parser/option.rb#122 + # source://thor//lib/thor/parser/option.rb#131 def validate_default_type!; end + private + + # source://thor//lib/thor/parser/option.rb#174 + def normalize_aliases(aliases); end + class << self # This parse quick options given as method_options. It makes several # assumptions, but you can be more specific using the option method. @@ -2883,31 +3214,37 @@ class Thor::Options < ::Thor::Arguments # @return [Options] a new instance of Options # # source://thor//lib/thor/parser/options.rb#32 - def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil)); end + def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil), relations = T.unsafe(nil)); end + + # source://thor//lib/thor/parser/options.rb#156 + def check_at_least_one!; end + + # source://thor//lib/thor/parser/options.rb#144 + def check_exclusive!; end # @raise [UnknownArgumentError] # - # source://thor//lib/thor/parser/options.rb#141 + # source://thor//lib/thor/parser/options.rb#168 def check_unknown!; end - # source://thor//lib/thor/parser/options.rb#88 + # source://thor//lib/thor/parser/options.rb#89 def parse(args); end - # source://thor//lib/thor/parser/options.rb#64 + # source://thor//lib/thor/parser/options.rb#65 def peek; end - # source://thor//lib/thor/parser/options.rb#60 + # source://thor//lib/thor/parser/options.rb#61 def remaining; end - # source://thor//lib/thor/parser/options.rb#78 + # source://thor//lib/thor/parser/options.rb#79 def shift; end - # source://thor//lib/thor/parser/options.rb#83 + # source://thor//lib/thor/parser/options.rb#84 def unshift(arg, is_value: T.unsafe(nil)); end protected - # source://thor//lib/thor/parser/options.rb#151 + # source://thor//lib/thor/parser/options.rb#189 def assign_result!(option, result); end # Check if the current value in peek is a registered switch. @@ -2917,45 +3254,50 @@ class Thor::Options < ::Thor::Arguments # # @return [Boolean] # - # source://thor//lib/thor/parser/options.rb#165 + # source://thor//lib/thor/parser/options.rb#203 def current_is_switch?; end # @return [Boolean] # - # source://thor//lib/thor/parser/options.rb#177 + # source://thor//lib/thor/parser/options.rb#215 def current_is_switch_formatted?; end # @return [Boolean] # - # source://thor//lib/thor/parser/options.rb#187 + # source://thor//lib/thor/parser/options.rb#225 def current_is_value?; end + # Option names changes to swith name or human name + # + # source://thor//lib/thor/parser/options.rb#179 + def names_to_switch_names(names = T.unsafe(nil)); end + # Check if the given argument is actually a shortcut. # - # source://thor//lib/thor/parser/options.rb#206 + # source://thor//lib/thor/parser/options.rb#244 def normalize_switch(arg); end # Parse boolean values which can be given as --foo=true, --foo or --no-foo. # - # source://thor//lib/thor/parser/options.rb#217 + # source://thor//lib/thor/parser/options.rb#255 def parse_boolean(switch); end # Parse the value at the peek analyzing if it requires an input or not. # - # source://thor//lib/thor/parser/options.rb#235 + # source://thor//lib/thor/parser/options.rb#273 def parse_peek(switch, option); end # @return [Boolean] # - # source://thor//lib/thor/parser/options.rb#210 + # source://thor//lib/thor/parser/options.rb#248 def parsing_options?; end # @return [Boolean] # - # source://thor//lib/thor/parser/options.rb#192 + # source://thor//lib/thor/parser/options.rb#230 def switch?(arg); end - # source://thor//lib/thor/parser/options.rb#196 + # source://thor//lib/thor/parser/options.rb#234 def switch_option(arg); end class << self @@ -3019,7 +3361,7 @@ module Thor::RakeCompat end end -# source://thor//lib/thor/error.rb#106 +# source://thor//lib/thor/error.rb#95 class Thor::RequiredArgumentMissingError < ::Thor::InvocationError; end # source://thor//lib/thor/util.rb#4 @@ -3108,13 +3450,13 @@ module Thor::Shell def _shared_configuration; end end -# source://thor//lib/thor/shell/basic.rb#3 +# source://thor//lib/thor/shell/basic.rb#7 class Thor::Shell::Basic # Initialize base, mute and padding to nil. # # @return [Basic] a new instance of Basic # - # source://thor//lib/thor/shell/basic.rb#11 + # source://thor//lib/thor/shell/basic.rb#13 def initialize; end # Asks something to the user and receives a response. @@ -3147,19 +3489,19 @@ class Thor::Shell::Basic # # ask("Where should the file be saved?", :path => true) # - # source://thor//lib/thor/shell/basic.rb#78 + # source://thor//lib/thor/shell/basic.rb#80 def ask(statement, *args); end # Returns the value of attribute base. # - # source://thor//lib/thor/shell/basic.rb#6 + # source://thor//lib/thor/shell/basic.rb#8 def base; end # Sets the attribute base # # @param value the value to set the attribute base to. # - # source://thor//lib/thor/shell/basic.rb#6 + # source://thor//lib/thor/shell/basic.rb#8 def base=(_arg0); end # Called if something goes wrong during the execution. This is used by Thor @@ -3167,7 +3509,7 @@ class Thor::Shell::Basic # wrong, you can always raise an exception. If you raise a Thor::Error, it # will be rescued and wrapped in the method below. # - # source://thor//lib/thor/shell/basic.rb#342 + # source://thor//lib/thor/shell/basic.rb#251 def error(statement); end # Deals with file collision and returns true if the file should be @@ -3178,24 +3520,24 @@ class Thor::Shell::Basic # destination:: the destination file to solve conflicts # block:: an optional block that returns the value to be used in diff and merge # - # source://thor//lib/thor/shell/basic.rb#285 + # source://thor//lib/thor/shell/basic.rb#207 def file_collision(destination); end # Sets the output padding while executing a block and resets it. # - # source://thor//lib/thor/shell/basic.rb#41 + # source://thor//lib/thor/shell/basic.rb#43 def indent(count = T.unsafe(nil)); end # Mute everything that's inside given block # - # source://thor//lib/thor/shell/basic.rb#20 + # source://thor//lib/thor/shell/basic.rb#22 def mute; end # Check if base is muted # # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#29 + # source://thor//lib/thor/shell/basic.rb#31 def mute?; end # Make a question the to user and returns true if the user replies "n" or @@ -3203,17 +3545,17 @@ class Thor::Shell::Basic # # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#154 + # source://thor//lib/thor/shell/basic.rb#156 def no?(statement, color = T.unsafe(nil)); end # Returns the value of attribute padding. # - # source://thor//lib/thor/shell/basic.rb#7 + # source://thor//lib/thor/shell/basic.rb#9 def padding; end # Sets the output padding, not allowing less than zero values. # - # source://thor//lib/thor/shell/basic.rb#35 + # source://thor//lib/thor/shell/basic.rb#37 def padding=(value); end # Prints values in columns @@ -3221,7 +3563,7 @@ class Thor::Shell::Basic # ==== Parameters # Array[String, String, ...] # - # source://thor//lib/thor/shell/basic.rb#163 + # source://thor//lib/thor/shell/basic.rb#165 def print_in_columns(array); end # Prints a table. @@ -3232,8 +3574,9 @@ class Thor::Shell::Basic # ==== Options # indent:: Indent the first column by indent value. # colwidth:: Force the first column to colwidth spaces wide. + # borders:: Adds ascii borders. # - # source://thor//lib/thor/shell/basic.rb#185 + # source://thor//lib/thor/shell/basic.rb#180 def print_table(array, options = T.unsafe(nil)); end # Prints a long string, word-wrapping the text to the current width of the @@ -3245,7 +3588,7 @@ class Thor::Shell::Basic # ==== Options # indent:: Indent each line of the printed paragraph by indent value. # - # source://thor//lib/thor/shell/basic.rb#247 + # source://thor//lib/thor/shell/basic.rb#194 def print_wrapped(message, options = T.unsafe(nil)); end # Say (print) something to the user. If the sentence ends with a whitespace @@ -3255,7 +3598,7 @@ class Thor::Shell::Basic # ==== Example # say("I know you knew that.") # - # source://thor//lib/thor/shell/basic.rb#96 + # source://thor//lib/thor/shell/basic.rb#98 def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end # Say (print) an error to the user. If the sentence ends with a whitespace @@ -3265,7 +3608,7 @@ class Thor::Shell::Basic # ==== Example # say_error("error: something went wrong") # - # source://thor//lib/thor/shell/basic.rb#113 + # source://thor//lib/thor/shell/basic.rb#115 def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end # Say a status with the given color and appends the message. Since this @@ -3273,110 +3616,89 @@ class Thor::Shell::Basic # in log_status, avoiding the message from being shown. If a Symbol is # given in log_status, it's used as the color. # - # source://thor//lib/thor/shell/basic.rb#128 + # source://thor//lib/thor/shell/basic.rb#130 def say_status(status, message, log_status = T.unsafe(nil)); end # Apply color to the given string with optional bold. Disabled in the # Thor::Shell::Basic class. # - # source://thor//lib/thor/shell/basic.rb#349 + # source://thor//lib/thor/shell/basic.rb#258 def set_color(string, *_arg1); end - # source://thor//lib/thor/shell/basic.rb#326 - def terminal_width; end - # Make a question the to user and returns true if the user replies "y" or # "yes". # # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#147 + # source://thor//lib/thor/shell/basic.rb#149 def yes?(statement, color = T.unsafe(nil)); end protected - # source://thor//lib/thor/shell/basic.rb#486 + # source://thor//lib/thor/shell/basic.rb#362 def answer_match(possibilities, answer, case_insensitive); end - # source://thor//lib/thor/shell/basic.rb#443 - def as_unicode; end - - # source://thor//lib/thor/shell/basic.rb#473 + # source://thor//lib/thor/shell/basic.rb#349 def ask_filtered(statement, color, options); end - # source://thor//lib/thor/shell/basic.rb#456 + # source://thor//lib/thor/shell/basic.rb#332 def ask_simply(statement, color, options); end # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#360 + # source://thor//lib/thor/shell/basic.rb#269 def can_display_colors?; end - # Calculate the dynamic width of the terminal - # - # source://thor//lib/thor/shell/basic.rb#415 - def dynamic_width; end - - # source://thor//lib/thor/shell/basic.rb#419 - def dynamic_width_stty; end - - # source://thor//lib/thor/shell/basic.rb#423 - def dynamic_width_tput; end - - # source://thor//lib/thor/shell/basic.rb#387 - def file_collision_help; end + # source://thor//lib/thor/shell/basic.rb#296 + def file_collision_help(block_given); end - # source://thor//lib/thor/shell/basic.rb#507 + # source://thor//lib/thor/shell/basic.rb#383 def git_merge_tool; end # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#377 + # source://thor//lib/thor/shell/basic.rb#286 def is?(value); end - # source://thor//lib/thor/shell/basic.rb#364 + # source://thor//lib/thor/shell/basic.rb#273 def lookup_color(color); end - # source://thor//lib/thor/shell/basic.rb#494 + # source://thor//lib/thor/shell/basic.rb#370 def merge(destination, content); end - # source://thor//lib/thor/shell/basic.rb#503 + # source://thor//lib/thor/shell/basic.rb#379 def merge_tool; end - # source://thor//lib/thor/shell/basic.rb#355 + # source://thor//lib/thor/shell/basic.rb#264 def prepare_message(message, *color); end # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#410 + # source://thor//lib/thor/shell/basic.rb#324 def quiet?; end - # source://thor//lib/thor/shell/basic.rb#399 + # source://thor//lib/thor/shell/basic.rb#313 def show_diff(destination, content); end - # source://thor//lib/thor/shell/basic.rb#373 + # source://thor//lib/thor/shell/basic.rb#282 def stderr; end - # source://thor//lib/thor/shell/basic.rb#369 + # source://thor//lib/thor/shell/basic.rb#278 def stdout; end - # source://thor//lib/thor/shell/basic.rb#431 - def truncate(string, width); end - # @return [Boolean] # - # source://thor//lib/thor/shell/basic.rb#427 + # source://thor//lib/thor/shell/basic.rb#328 def unix?; end end -# source://thor//lib/thor/shell/basic.rb#4 -Thor::Shell::Basic::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) - # Inherit from Thor::Shell::Basic and add set_color behavior. Check # Thor::Shell::Basic to see all available methods. # -# source://thor//lib/thor/shell/color.rb#8 +# source://thor//lib/thor/shell/color.rb#9 class Thor::Shell::Color < ::Thor::Shell::Basic + include ::LCSDiff + # Set color by using a string or one of the defined constants. If a third # option is set to true, it also adds bold to the string. This is based # on Highline implementation and it automatically appends CLEAR to the end @@ -3409,139 +3731,145 @@ class Thor::Shell::Color < ::Thor::Shell::Basic # :on_cyan # :on_white # - # source://thor//lib/thor/shell/color.rb#79 + # source://thor//lib/thor/shell/color.rb#82 def set_color(string, *colors); end protected # @return [Boolean] # - # source://thor//lib/thor/shell/color.rb#107 + # source://thor//lib/thor/shell/color.rb#110 def are_colors_disabled?; end # @return [Boolean] # - # source://thor//lib/thor/shell/color.rb#103 + # source://thor//lib/thor/shell/color.rb#106 def are_colors_supported?; end # @return [Boolean] # - # source://thor//lib/thor/shell/color.rb#99 + # source://thor//lib/thor/shell/color.rb#102 def can_display_colors?; end - - # Check if Diff::LCS is loaded. If it is, use it to create pretty output - # for diff. - # - # @return [Boolean] - # - # source://thor//lib/thor/shell/color.rb#144 - def diff_lcs_loaded?; end - - # source://thor//lib/thor/shell/color.rb#127 - def output_diff_line(diff); end - - # Overwrite show_diff to show diff with colors if Diff::LCS is - # available. - # - # source://thor//lib/thor/shell/color.rb#114 - def show_diff(destination, content); end end # Set the terminal's foreground ANSI color to black. # -# source://thor//lib/thor/shell/color.rb#15 +# source://thor//lib/thor/shell/color.rb#18 Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to blue. # -# source://thor//lib/thor/shell/color.rb#23 +# source://thor//lib/thor/shell/color.rb#26 Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String) # The start of an ANSI bold sequence. # -# source://thor//lib/thor/shell/color.rb#12 +# source://thor//lib/thor/shell/color.rb#15 Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String) # Embed in a String to clear all previous ANSI sequences. # -# source://thor//lib/thor/shell/color.rb#10 +# source://thor//lib/thor/shell/color.rb#13 Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to cyan. # -# source://thor//lib/thor/shell/color.rb#27 +# source://thor//lib/thor/shell/color.rb#30 Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to green. # -# source://thor//lib/thor/shell/color.rb#19 +# source://thor//lib/thor/shell/color.rb#22 Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to magenta. # -# source://thor//lib/thor/shell/color.rb#25 +# source://thor//lib/thor/shell/color.rb#28 Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to black. # -# source://thor//lib/thor/shell/color.rb#32 +# source://thor//lib/thor/shell/color.rb#35 Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to blue. # -# source://thor//lib/thor/shell/color.rb#40 +# source://thor//lib/thor/shell/color.rb#43 Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to cyan. # -# source://thor//lib/thor/shell/color.rb#44 +# source://thor//lib/thor/shell/color.rb#47 Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to green. # -# source://thor//lib/thor/shell/color.rb#36 +# source://thor//lib/thor/shell/color.rb#39 Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to magenta. # -# source://thor//lib/thor/shell/color.rb#42 +# source://thor//lib/thor/shell/color.rb#45 Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to red. # -# source://thor//lib/thor/shell/color.rb#34 +# source://thor//lib/thor/shell/color.rb#37 Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to white. # -# source://thor//lib/thor/shell/color.rb#46 +# source://thor//lib/thor/shell/color.rb#49 Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String) # Set the terminal's background ANSI color to yellow. # -# source://thor//lib/thor/shell/color.rb#38 +# source://thor//lib/thor/shell/color.rb#41 Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to red. # -# source://thor//lib/thor/shell/color.rb#17 +# source://thor//lib/thor/shell/color.rb#20 Thor::Shell::Color::RED = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to white. # -# source://thor//lib/thor/shell/color.rb#29 +# source://thor//lib/thor/shell/color.rb#32 Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String) # Set the terminal's foreground ANSI color to yellow. # -# source://thor//lib/thor/shell/color.rb#21 +# source://thor//lib/thor/shell/color.rb#24 Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String) +# source://thor//lib/thor/shell/column_printer.rb#5 +class Thor::Shell::ColumnPrinter + # @return [ColumnPrinter] a new instance of ColumnPrinter + # + # source://thor//lib/thor/shell/column_printer.rb#8 + def initialize(stdout, options = T.unsafe(nil)); end + + # Returns the value of attribute options. + # + # source://thor//lib/thor/shell/column_printer.rb#6 + def options; end + + # source://thor//lib/thor/shell/column_printer.rb#14 + def print(array); end + + # Returns the value of attribute stdout. + # + # source://thor//lib/thor/shell/column_printer.rb#6 + def stdout; end +end + # Inherit from Thor::Shell::Basic and add set_color behavior. Check # Thor::Shell::Basic to see all available methods. # -# source://thor//lib/thor/shell/html.rb#8 +# source://thor//lib/thor/shell/html.rb#9 class Thor::Shell::HTML < ::Thor::Shell::Basic + include ::LCSDiff + # Ask something to the user and receives a response. # # ==== Example @@ -3551,7 +3879,7 @@ class Thor::Shell::HTML < ::Thor::Shell::Basic # # @raise [NotImplementedError] # - # source://thor//lib/thor/shell/html.rb#70 + # source://thor//lib/thor/shell/html.rb#73 def ask(statement, color = T.unsafe(nil)); end # Set color by using a string or one of the defined constants. If a third @@ -3559,122 +3887,174 @@ class Thor::Shell::HTML < ::Thor::Shell::Basic # on Highline implementation and it automatically appends CLEAR to the end # of the returned String. # - # source://thor//lib/thor/shell/html.rb#51 + # source://thor//lib/thor/shell/html.rb#54 def set_color(string, *colors); end protected # @return [Boolean] # - # source://thor//lib/thor/shell/html.rb#76 + # source://thor//lib/thor/shell/html.rb#79 def can_display_colors?; end - - # Check if Diff::LCS is loaded. If it is, use it to create pretty output - # for diff. - # - # @return [Boolean] - # - # source://thor//lib/thor/shell/html.rb#113 - def diff_lcs_loaded?; end - - # source://thor//lib/thor/shell/html.rb#96 - def output_diff_line(diff); end - - # Overwrite show_diff to show diff with colors if Diff::LCS is - # available. - # - # source://thor//lib/thor/shell/html.rb#83 - def show_diff(destination, content); end end # Set the terminal's foreground HTML color to black. # -# source://thor//lib/thor/shell/html.rb#13 +# source://thor//lib/thor/shell/html.rb#16 Thor::Shell::HTML::BLACK = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to blue. # -# source://thor//lib/thor/shell/html.rb#21 +# source://thor//lib/thor/shell/html.rb#24 Thor::Shell::HTML::BLUE = T.let(T.unsafe(nil), String) # The start of an HTML bold sequence. # -# source://thor//lib/thor/shell/html.rb#10 +# source://thor//lib/thor/shell/html.rb#13 Thor::Shell::HTML::BOLD = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to cyan. # -# source://thor//lib/thor/shell/html.rb#25 +# source://thor//lib/thor/shell/html.rb#28 Thor::Shell::HTML::CYAN = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to green. # -# source://thor//lib/thor/shell/html.rb#17 +# source://thor//lib/thor/shell/html.rb#20 Thor::Shell::HTML::GREEN = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to magenta. # -# source://thor//lib/thor/shell/html.rb#23 +# source://thor//lib/thor/shell/html.rb#26 Thor::Shell::HTML::MAGENTA = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to black. # -# source://thor//lib/thor/shell/html.rb#30 +# source://thor//lib/thor/shell/html.rb#33 Thor::Shell::HTML::ON_BLACK = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to blue. # -# source://thor//lib/thor/shell/html.rb#38 +# source://thor//lib/thor/shell/html.rb#41 Thor::Shell::HTML::ON_BLUE = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to cyan. # -# source://thor//lib/thor/shell/html.rb#42 +# source://thor//lib/thor/shell/html.rb#45 Thor::Shell::HTML::ON_CYAN = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to green. # -# source://thor//lib/thor/shell/html.rb#34 +# source://thor//lib/thor/shell/html.rb#37 Thor::Shell::HTML::ON_GREEN = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to magenta. # -# source://thor//lib/thor/shell/html.rb#40 +# source://thor//lib/thor/shell/html.rb#43 Thor::Shell::HTML::ON_MAGENTA = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to red. # -# source://thor//lib/thor/shell/html.rb#32 +# source://thor//lib/thor/shell/html.rb#35 Thor::Shell::HTML::ON_RED = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to white. # -# source://thor//lib/thor/shell/html.rb#44 +# source://thor//lib/thor/shell/html.rb#47 Thor::Shell::HTML::ON_WHITE = T.let(T.unsafe(nil), String) # Set the terminal's background HTML color to yellow. # -# source://thor//lib/thor/shell/html.rb#36 +# source://thor//lib/thor/shell/html.rb#39 Thor::Shell::HTML::ON_YELLOW = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to red. # -# source://thor//lib/thor/shell/html.rb#15 +# source://thor//lib/thor/shell/html.rb#18 Thor::Shell::HTML::RED = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to white. # -# source://thor//lib/thor/shell/html.rb#27 +# source://thor//lib/thor/shell/html.rb#30 Thor::Shell::HTML::WHITE = T.let(T.unsafe(nil), String) # Set the terminal's foreground HTML color to yellow. # -# source://thor//lib/thor/shell/html.rb#19 +# source://thor//lib/thor/shell/html.rb#22 Thor::Shell::HTML::YELLOW = T.let(T.unsafe(nil), String) # source://thor//lib/thor/shell.rb#24 Thor::Shell::SHELL_DELEGATED_METHODS = T.let(T.unsafe(nil), Array) +# source://thor//lib/thor/shell/table_printer.rb#6 +class Thor::Shell::TablePrinter < ::Thor::Shell::ColumnPrinter + # @return [TablePrinter] a new instance of TablePrinter + # + # source://thor//lib/thor/shell/table_printer.rb#9 + def initialize(stdout, options = T.unsafe(nil)); end + + # source://thor//lib/thor/shell/table_printer.rb#18 + def print(array); end + + private + + # source://thor//lib/thor/shell/table_printer.rb#120 + def as_unicode; end + + # source://thor//lib/thor/shell/table_printer.rb#72 + def format_cell(column, row_size, index); end + + # source://thor//lib/thor/shell/table_printer.rb#115 + def indentation; end + + # source://thor//lib/thor/shell/table_printer.rb#47 + def prepare(array); end + + # source://thor//lib/thor/shell/table_printer.rb#96 + def print_border_separator; end + + # source://thor//lib/thor/shell/table_printer.rb#103 + def truncate(string); end +end + +# source://thor//lib/thor/shell/table_printer.rb#7 +Thor::Shell::TablePrinter::BORDER_SEPARATOR = T.let(T.unsafe(nil), Symbol) + +# source://thor//lib/thor/shell/terminal.rb#3 +module Thor::Shell::Terminal + class << self + # source://thor//lib/thor/shell/terminal.rb#9 + def terminal_width; end + + # @return [Boolean] + # + # source://thor//lib/thor/shell/terminal.rb#20 + def unix?; end + + private + + # Calculate the dynamic width of the terminal + # + # source://thor//lib/thor/shell/terminal.rb#27 + def dynamic_width; end + + # source://thor//lib/thor/shell/terminal.rb#31 + def dynamic_width_stty; end + + # source://thor//lib/thor/shell/terminal.rb#35 + def dynamic_width_tput; end + end +end + +# source://thor//lib/thor/shell/terminal.rb#4 +Thor::Shell::Terminal::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer) + +# source://thor//lib/thor/shell/wrapped_printer.rb#6 +class Thor::Shell::WrappedPrinter < ::Thor::Shell::ColumnPrinter + # source://thor//lib/thor/shell/wrapped_printer.rb#7 + def print(message); end +end + # source://thor//lib/thor/base.rb#23 Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String) @@ -3683,89 +4063,89 @@ Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String) # source://thor//lib/thor/base.rb#20 Thor::THOR_RESERVED_WORDS = T.let(T.unsafe(nil), Array) -# source://thor//lib/thor/command.rb#117 +# source://thor//lib/thor/command.rb#126 Thor::Task = Thor::Command # Raised when a command was not found. # -# source://thor//lib/thor/error.rb#35 +# source://thor//lib/thor/error.rb#24 class Thor::UndefinedCommandError < ::Thor::Error include ::Thor::Correctable # @return [UndefinedCommandError] a new instance of UndefinedCommandError # - # source://thor//lib/thor/error.rb#54 + # source://thor//lib/thor/error.rb#43 def initialize(command, all_commands, namespace); end # Returns the value of attribute all_commands. # - # source://thor//lib/thor/error.rb#52 + # source://thor//lib/thor/error.rb#41 def all_commands; end # Returns the value of attribute command. # - # source://thor//lib/thor/error.rb#52 + # source://thor//lib/thor/error.rb#41 def command; end end -# source://thor//lib/thor/error.rb#36 +# source://thor//lib/thor/error.rb#25 class Thor::UndefinedCommandError::SpellChecker # @return [SpellChecker] a new instance of SpellChecker # - # source://thor//lib/thor/error.rb#39 + # source://thor//lib/thor/error.rb#28 def initialize(error); end - # source://thor//lib/thor/error.rb#43 + # source://thor//lib/thor/error.rb#32 def corrections; end # Returns the value of attribute error. # - # source://thor//lib/thor/error.rb#37 + # source://thor//lib/thor/error.rb#26 def error; end - # source://thor//lib/thor/error.rb#47 + # source://thor//lib/thor/error.rb#36 def spell_checker; end end -# source://thor//lib/thor/error.rb#66 +# source://thor//lib/thor/error.rb#55 Thor::UndefinedTaskError = Thor::UndefinedCommandError -# source://thor//lib/thor/error.rb#76 +# source://thor//lib/thor/error.rb#65 class Thor::UnknownArgumentError < ::Thor::Error include ::Thor::Correctable # @return [UnknownArgumentError] a new instance of UnknownArgumentError # - # source://thor//lib/thor/error.rb#96 + # source://thor//lib/thor/error.rb#85 def initialize(switches, unknown); end # Returns the value of attribute switches. # - # source://thor//lib/thor/error.rb#94 + # source://thor//lib/thor/error.rb#83 def switches; end # Returns the value of attribute unknown. # - # source://thor//lib/thor/error.rb#94 + # source://thor//lib/thor/error.rb#83 def unknown; end end -# source://thor//lib/thor/error.rb#77 +# source://thor//lib/thor/error.rb#66 class Thor::UnknownArgumentError::SpellChecker # @return [SpellChecker] a new instance of SpellChecker # - # source://thor//lib/thor/error.rb#80 + # source://thor//lib/thor/error.rb#69 def initialize(error); end - # source://thor//lib/thor/error.rb#84 + # source://thor//lib/thor/error.rb#73 def corrections; end # Returns the value of attribute error. # - # source://thor//lib/thor/error.rb#78 + # source://thor//lib/thor/error.rb#67 def error; end - # source://thor//lib/thor/error.rb#89 + # source://thor//lib/thor/error.rb#78 def spell_checker; end end @@ -3806,7 +4186,7 @@ module Thor::Util # ==== Returns # String # - # source://thor//lib/thor/util.rb#263 + # source://thor//lib/thor/util.rb#264 def escape_globs(path); end # Returns a string that has had any HTML characters escaped. @@ -3821,7 +4201,7 @@ module Thor::Util # ==== Returns # String # - # source://thor//lib/thor/util.rb#279 + # source://thor//lib/thor/util.rb#280 def escape_html(string); end # Receives a namespace and search for it in the Thor::Base subclasses. @@ -3884,13 +4264,13 @@ module Thor::Util # Where to look for Thor files. # - # source://thor//lib/thor/util.rb#212 + # source://thor//lib/thor/util.rb#213 def globs_for(path); end # Receives a path and load the thor file in the path. The file is evaluated # inside the sandbox to avoid namespacing conflicts. # - # source://thor//lib/thor/util.rb#152 + # source://thor//lib/thor/util.rb#153 def load_thorfile(path, content = T.unsafe(nil), debug = T.unsafe(nil)); end # Receives a constant and converts it to a Thor namespace. Since Thor @@ -3925,7 +4305,7 @@ module Thor::Util # Return the path to the ruby interpreter taking into account multiple # installations and windows extensions. # - # source://thor//lib/thor/util.rb#220 + # source://thor//lib/thor/util.rb#221 def ruby_command; end # Receives a string and convert it to snake case. SnakeCase returns snake_case. @@ -3946,7 +4326,7 @@ module Thor::Util # Returns the root where thor files are located, depending on the OS. # - # source://thor//lib/thor/util.rb#191 + # source://thor//lib/thor/util.rb#192 def thor_root; end # Returns the files in the thor root. On Windows thor_root will be something @@ -3956,10 +4336,10 @@ module Thor::Util # # If we don't #gsub the \ character, Dir.glob will fail. # - # source://thor//lib/thor/util.rb#202 + # source://thor//lib/thor/util.rb#203 def thor_root_glob; end - # source://thor//lib/thor/util.rb#167 + # source://thor//lib/thor/util.rb#168 def user_home; end end end