From 8f088e7e3d9c446476c4a8035eaae41cd0515bc6 Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 11 Oct 2024 09:23:49 -0400 Subject: [PATCH 1/3] Upgrade Ruby LSP requirement --- Gemfile.lock | 10 +++++----- ruby-lsp-rails.gemspec | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 4c1800b2..8d8de2e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: ruby-lsp-rails (0.3.18) - ruby-lsp (>= 0.19.0, < 0.20.0) + ruby-lsp (>= 0.20.0, < 0.21.0) GEM remote: https://rubygems.org/ @@ -148,7 +148,7 @@ GEM parser (3.3.1.0) ast (~> 2.4.1) racc - prism (1.1.0) + prism (1.2.0) psych (5.1.2) stringio public_suffix (5.0.5) @@ -197,7 +197,7 @@ GEM rbi (0.2.0) prism (~> 1.0) sorbet-runtime (>= 0.5.9204) - rbs (3.6.0) + rbs (3.6.1) logger rdoc (6.6.3.1) psych (>= 4.0.0) @@ -227,9 +227,9 @@ GEM rubocop (~> 1.51) rubocop-sorbet (0.8.3) rubocop (>= 0.90.0) - ruby-lsp (0.19.0) + ruby-lsp (0.20.0) language_server-protocol (~> 3.17.0) - prism (>= 1.1, < 2.0) + prism (>= 1.2, < 2.0) rbs (>= 3, < 4) sorbet-runtime (>= 0.5.10782) ruby-progressbar (1.13.0) diff --git a/ruby-lsp-rails.gemspec b/ruby-lsp-rails.gemspec index e315a690..e848128f 100644 --- a/ruby-lsp-rails.gemspec +++ b/ruby-lsp-rails.gemspec @@ -24,5 +24,5 @@ Gem::Specification.new do |spec| Dir["lib/**/*", "LICENSE.txt", "Rakefile", "README.md"] end - spec.add_dependency("ruby-lsp", ">= 0.19.0", "< 0.20.0") + spec.add_dependency("ruby-lsp", ">= 0.20.0", "< 0.21.0") end From 9a216748712c277f14d0753de4e1c7020709773e Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 11 Oct 2024 09:23:56 -0400 Subject: [PATCH 2/3] Update gem RBIs --- .../gems/{prism@1.0.0.rbi => prism@1.2.0.rbi} | 10506 +++++++++++----- .../rbi/gems/{rbs@3.6.0.rbi => rbs@3.6.1.rbi} | 0 ...uby-lsp@0.19.0.rbi => ruby-lsp@0.20.0.rbi} | 970 +- 3 files changed, 7636 insertions(+), 3840 deletions(-) rename sorbet/rbi/gems/{prism@1.0.0.rbi => prism@1.2.0.rbi} (76%) rename sorbet/rbi/gems/{rbs@3.6.0.rbi => rbs@3.6.1.rbi} (100%) rename sorbet/rbi/gems/{ruby-lsp@0.19.0.rbi => ruby-lsp@0.20.0.rbi} (92%) diff --git a/sorbet/rbi/gems/prism@1.0.0.rbi b/sorbet/rbi/gems/prism@1.2.0.rbi similarity index 76% rename from sorbet/rbi/gems/prism@1.0.0.rbi rename to sorbet/rbi/gems/prism@1.2.0.rbi index 65cf65a9..24560b1d 100644 --- a/sorbet/rbi/gems/prism@1.0.0.rbi +++ b/sorbet/rbi/gems/prism@1.2.0.rbi @@ -137,28 +137,44 @@ end # Specialized version of Prism::Source for source code that includes ASCII # characters only. This class is used to apply performance optimizations that -# cannot be applied to sources that include multibyte characters. Sources that -# include multibyte characters are represented by the Prism::Source class. +# cannot be applied to sources that include multibyte characters. # -# source://prism/lib/prism/parse_result.rb#135 +# In the extremely rare case that a source includes multi-byte characters but +# is marked as binary because of a magic encoding comment and it cannot be +# eagerly converted to UTF-8, this class will be used as well. This is because +# at that point we will treat everything as single-byte characters. +# +# source://prism/lib/prism/parse_result.rb#236 class Prism::ASCIISource < ::Prism::Source # Return the column number in characters for the given byte offset. # - # source://prism/lib/prism/parse_result.rb#142 + # source://prism/lib/prism/parse_result.rb#243 sig { params(byte_offset: Integer).returns(Integer) } def character_column(byte_offset); end # Return the character offset for the given byte offset. # - # source://prism/lib/prism/parse_result.rb#137 + # source://prism/lib/prism/parse_result.rb#238 sig { params(byte_offset: Integer).returns(Integer) } def character_offset(byte_offset); end + # Returns a cache that is the identity function in order to maintain the + # same interface. We can do this because code units are always equivalent to + # byte offsets for ASCII-only sources. + # + # source://prism/lib/prism/parse_result.rb#260 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + # Specialized version of `code_units_column` that does not depend on # `code_units_offset`, which is a more expensive operation. This is - # essentialy the same as `Prism::Source#column`. + # essentially the same as `Prism::Source#column`. # - # source://prism/lib/prism/parse_result.rb#159 + # source://prism/lib/prism/parse_result.rb#267 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -169,7 +185,7 @@ class Prism::ASCIISource < ::Prism::Source # concept of code units that differs from the number of characters in other # encodings, it is not captured here. # - # source://prism/lib/prism/parse_result.rb#152 + # source://prism/lib/prism/parse_result.rb#253 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_offset(byte_offset, encoding); end end @@ -186,6 +202,17 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode # # source://prism/lib/prism/node.rb#229 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -197,37 +224,53 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#240 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#245 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#255 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#250 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, ?old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, ?keyword_loc: Location) -> AliasGlobalVariableNode # # source://prism/lib/prism/node.rb#260 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasGlobalVariableNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#245 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode, old_name: GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | SymbolNode | MissingNode, keyword_loc: Location } # # source://prism/lib/prism/node.rb#268 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -242,6 +285,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#295 + sig { returns(String) } def keyword; end # The location of the `alias` keyword. @@ -250,6 +294,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # ^^^^^ # # source://prism/lib/prism/node.rb#288 + sig { returns(Prism::Location) } def keyword_loc; end # Represents the new name of the global variable that can be used after aliasing. @@ -258,6 +303,7 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # ^^^^ # # source://prism/lib/prism/node.rb#276 + sig { returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) } def new_name; end # Represents the old name of the global variable that can be used before aliasing. @@ -266,6 +312,9 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # ^^^^ # # source://prism/lib/prism/node.rb#282 + sig do + returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode)) + end def old_name; end # Return a symbol representation of this node type. See `Node#type`. @@ -294,48 +343,75 @@ class Prism::AliasMethodNode < ::Prism::Node # @return [AliasMethodNode] a new instance of AliasMethodNode # # source://prism/lib/prism/node.rb#330 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#408 + # source://prism/lib/prism/node.rb#426 def ===(other); end # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#341 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#346 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#356 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#351 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?new_name: SymbolNode | InterpolatedSymbolNode, ?old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, ?keyword_loc: Location) -> AliasMethodNode # # source://prism/lib/prism/node.rb#361 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location + ).returns(Prism::AliasMethodNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#346 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, new_name: SymbolNode | InterpolatedSymbolNode, old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode, keyword_loc: Location } # # source://prism/lib/prism/node.rb#369 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -343,40 +419,64 @@ class Prism::AliasMethodNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#392 + # source://prism/lib/prism/node.rb#410 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#387 + # source://prism/lib/prism/node.rb#405 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#380 + # source://prism/lib/prism/node.rb#398 + sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader new_name: SymbolNode | InterpolatedSymbolNode + # Represents the new name of the method that will be aliased. + # + # alias foo bar + # ^^^ + # + # alias :foo :bar + # ^^^^ + # + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ # - # source://prism/lib/prism/node.rb#374 + # source://prism/lib/prism/node.rb#383 + sig { returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)) } def new_name; end - # attr_reader old_name: SymbolNode | InterpolatedSymbolNode | GlobalVariableReadNode | MissingNode + # Represents the old name of the method that will be aliased. + # + # alias foo bar + # ^^^ + # + # alias :foo :bar + # ^^^^ # - # source://prism/lib/prism/node.rb#377 + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ + # + # source://prism/lib/prism/node.rb#395 + sig do + returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode)) + end def old_name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#397 + # source://prism/lib/prism/node.rb#415 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#402 + # source://prism/lib/prism/node.rb#420 def type; end end end @@ -386,55 +486,82 @@ end # foo => bar | baz # ^^^^^^^^^ # -# source://prism/lib/prism/node.rb#420 +# source://prism/lib/prism/node.rb#438 class Prism::AlternationPatternNode < ::Prism::Node # Initialize a new AlternationPatternNode node. # # @return [AlternationPatternNode] a new instance of AlternationPatternNode # - # source://prism/lib/prism/node.rb#422 + # source://prism/lib/prism/node.rb#440 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, left, right, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#500 + # source://prism/lib/prism/node.rb#527 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#433 + # source://prism/lib/prism/node.rb#451 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#438 + # source://prism/lib/prism/node.rb#456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#448 + # source://prism/lib/prism/node.rb#466 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#443 + # source://prism/lib/prism/node.rb#461 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AlternationPatternNode # - # source://prism/lib/prism/node.rb#453 + # source://prism/lib/prism/node.rb#471 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AlternationPatternNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#438 + # source://prism/lib/prism/node.rb#456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism/lib/prism/node.rb#461 + # source://prism/lib/prism/node.rb#479 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -442,40 +569,53 @@ class Prism::AlternationPatternNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#484 + # source://prism/lib/prism/node.rb#511 sig { override.returns(String) } def inspect; end - # attr_reader left: Prism::node + # Represents the left side of the expression. # - # source://prism/lib/prism/node.rb#466 + # foo => bar | baz + # ^^^ + # + # source://prism/lib/prism/node.rb#487 + sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#479 + # source://prism/lib/prism/node.rb#506 + sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # Represents the alternation operator location. # - # source://prism/lib/prism/node.rb#472 + # foo => bar | baz + # ^ + # + # source://prism/lib/prism/node.rb#499 + sig { returns(Prism::Location) } def operator_loc; end - # attr_reader right: Prism::node + # Represents the right side of the expression. # - # source://prism/lib/prism/node.rb#469 + # foo => bar | baz + # ^^^ + # + # source://prism/lib/prism/node.rb#493 + sig { returns(Prism::Node) } def right; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#489 + # source://prism/lib/prism/node.rb#516 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#494 + # source://prism/lib/prism/node.rb#521 def type; end end end @@ -485,55 +625,82 @@ end # left and right # ^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#512 +# source://prism/lib/prism/node.rb#539 class Prism::AndNode < ::Prism::Node # Initialize a new AndNode node. # # @return [AndNode] a new instance of AndNode # - # source://prism/lib/prism/node.rb#514 + # source://prism/lib/prism/node.rb#541 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, left, right, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#607 + # source://prism/lib/prism/node.rb#634 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#525 + # source://prism/lib/prism/node.rb#552 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#530 + # source://prism/lib/prism/node.rb#557 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#540 + # source://prism/lib/prism/node.rb#567 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#535 + # source://prism/lib/prism/node.rb#562 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AndNode # - # source://prism/lib/prism/node.rb#545 + # source://prism/lib/prism/node.rb#572 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AndNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#530 + # source://prism/lib/prism/node.rb#557 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism/lib/prism/node.rb#553 + # source://prism/lib/prism/node.rb#580 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -541,7 +708,7 @@ class Prism::AndNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#591 + # source://prism/lib/prism/node.rb#618 sig { override.returns(String) } def inspect; end @@ -553,12 +720,14 @@ class Prism::AndNode < ::Prism::Node # 1 && 2 # ^ # - # source://prism/lib/prism/node.rb#564 + # source://prism/lib/prism/node.rb#591 + sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#586 + # source://prism/lib/prism/node.rb#613 + sig { returns(String) } def operator; end # The location of the `and` keyword or the `&&` operator. @@ -566,10 +735,11 @@ class Prism::AndNode < ::Prism::Node # left and right # ^^^ # - # source://prism/lib/prism/node.rb#579 + # source://prism/lib/prism/node.rb#606 + sig { returns(Prism::Location) } def operator_loc; end - # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # Represents the right side of the expression. # # left && right # ^^^^^ @@ -577,19 +747,20 @@ class Prism::AndNode < ::Prism::Node # 1 and 2 # ^ # - # source://prism/lib/prism/node.rb#573 + # source://prism/lib/prism/node.rb#600 + sig { returns(Prism::Node) } def right; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#596 + # source://prism/lib/prism/node.rb#623 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#601 + # source://prism/lib/prism/node.rb#628 def type; end end end @@ -599,13 +770,13 @@ end # return foo, bar, baz # ^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#619 +# source://prism/lib/prism/node.rb#646 class Prism::ArgumentsNode < ::Prism::Node # Initialize a new ArgumentsNode node. # # @return [ArgumentsNode] a new instance of ArgumentsNode # - # source://prism/lib/prism/node.rb#621 + # source://prism/lib/prism/node.rb#648 sig do params( source: Prism::Source, @@ -620,44 +791,52 @@ class Prism::ArgumentsNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#697 + # source://prism/lib/prism/node.rb#734 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#630 + # source://prism/lib/prism/node.rb#657 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: Array[Prism::node] # - # source://prism/lib/prism/node.rb#678 + # source://prism/lib/prism/node.rb#715 sig { returns(T::Array[Prism::Node]) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#635 + # source://prism/lib/prism/node.rb#662 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#645 + # source://prism/lib/prism/node.rb#672 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#640 + # source://prism/lib/prism/node.rb#667 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end + # def contains_forwarding?: () -> bool + # + # @return [Boolean] + # + # source://prism/lib/prism/node.rb#690 + sig { returns(T::Boolean) } + def contains_forwarding?; end + # def contains_keyword_splat?: () -> bool # # @return [Boolean] # - # source://prism/lib/prism/node.rb#668 + # source://prism/lib/prism/node.rb#700 sig { returns(T::Boolean) } def contains_keyword_splat?; end @@ -665,21 +844,29 @@ class Prism::ArgumentsNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#663 + # source://prism/lib/prism/node.rb#695 sig { returns(T::Boolean) } def contains_keywords?; end + # def contains_multiple_splats?: () -> bool + # + # @return [Boolean] + # + # source://prism/lib/prism/node.rb#710 + sig { returns(T::Boolean) } + def contains_multiple_splats?; end + # def contains_splat?: () -> bool # # @return [Boolean] # - # source://prism/lib/prism/node.rb#673 + # source://prism/lib/prism/node.rb#705 sig { returns(T::Boolean) } def contains_splat?; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: Array[Prism::node]) -> ArgumentsNode # - # source://prism/lib/prism/node.rb#650 + # source://prism/lib/prism/node.rb#677 sig do params( node_id: Integer, @@ -693,13 +880,13 @@ class Prism::ArgumentsNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#635 + # source://prism/lib/prism/node.rb#662 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: Array[Prism::node] } # - # source://prism/lib/prism/node.rb#658 + # source://prism/lib/prism/node.rb#685 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -708,42 +895,52 @@ class Prism::ArgumentsNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#681 + # source://prism/lib/prism/node.rb#718 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#686 + # source://prism/lib/prism/node.rb#723 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#691 + # source://prism/lib/prism/node.rb#728 def type; end end end # Flags for arguments nodes. # -# source://prism/lib/prism/node.rb#16647 +# source://prism/lib/prism/node.rb#16684 module Prism::ArgumentsNodeFlags; end -# if arguments contain keywords +# if the arguments contain forwarding +# +# source://prism/lib/prism/node.rb#16686 +Prism::ArgumentsNodeFlags::CONTAINS_FORWARDING = T.let(T.unsafe(nil), Integer) + +# if the arguments contain keywords # -# source://prism/lib/prism/node.rb#16649 +# source://prism/lib/prism/node.rb#16689 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) -# if arguments contain keyword splat +# if the arguments contain a keyword splat # -# source://prism/lib/prism/node.rb#16652 +# source://prism/lib/prism/node.rb#16692 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) -# if arguments contain splat +# if the arguments contain multiple splats # -# source://prism/lib/prism/node.rb#16655 +# source://prism/lib/prism/node.rb#16698 +Prism::ArgumentsNodeFlags::CONTAINS_MULTIPLE_SPLATS = T.let(T.unsafe(nil), Integer) + +# if the arguments contain a splat +# +# source://prism/lib/prism/node.rb#16695 Prism::ArgumentsNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array literal. This can be a regular array using brackets or a special array using % like %w or %i. @@ -751,13 +948,13 @@ Prism::ArgumentsNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # [1, 2, 3] # ^^^^^^^^^ # -# source://prism/lib/prism/node.rb#709 +# source://prism/lib/prism/node.rb#746 class Prism::ArrayNode < ::Prism::Node # Initialize a new ArrayNode node. # # @return [ArrayNode] a new instance of ArrayNode # - # source://prism/lib/prism/node.rb#711 + # source://prism/lib/prism/node.rb#748 sig do params( source: Prism::Source, @@ -774,24 +971,24 @@ class Prism::ArrayNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#825 + # source://prism/lib/prism/node.rb#862 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#722 + # source://prism/lib/prism/node.rb#759 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#727 + # source://prism/lib/prism/node.rb#764 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism/lib/prism/node.rb#804 + # source://prism/lib/prism/node.rb#841 sig { returns(T.nilable(String)) } def closing; end @@ -802,19 +999,19 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # ")" # foo = 1, 2, 3 # nil # - # source://prism/lib/prism/node.rb#786 + # source://prism/lib/prism/node.rb#823 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#737 + # source://prism/lib/prism/node.rb#774 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#732 + # source://prism/lib/prism/node.rb#769 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -822,13 +1019,13 @@ class Prism::ArrayNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#755 + # source://prism/lib/prism/node.rb#792 sig { returns(T::Boolean) } def contains_splat?; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayNode # - # source://prism/lib/prism/node.rb#742 + # source://prism/lib/prism/node.rb#779 sig do params( node_id: Integer, @@ -844,19 +1041,19 @@ class Prism::ArrayNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#727 + # source://prism/lib/prism/node.rb#764 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } # - # source://prism/lib/prism/node.rb#750 + # source://prism/lib/prism/node.rb#787 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Represent the list of zero or more [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression) within the array. # - # source://prism/lib/prism/node.rb#760 + # source://prism/lib/prism/node.rb#797 sig { returns(T::Array[Prism::Node]) } def elements; end @@ -865,13 +1062,13 @@ class Prism::ArrayNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#809 + # source://prism/lib/prism/node.rb#846 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism/lib/prism/node.rb#799 + # source://prism/lib/prism/node.rb#836 sig { returns(T.nilable(String)) } def opening; end @@ -882,32 +1079,32 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # "%I(" # foo = 1, 2, 3 # nil # - # source://prism/lib/prism/node.rb#768 + # source://prism/lib/prism/node.rb#805 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#814 + # source://prism/lib/prism/node.rb#851 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#819 + # source://prism/lib/prism/node.rb#856 def type; end end end # Flags for array nodes. # -# source://prism/lib/prism/node.rb#16659 +# source://prism/lib/prism/node.rb#16702 module Prism::ArrayNodeFlags; end # if array contains splat nodes # -# source://prism/lib/prism/node.rb#16661 +# source://prism/lib/prism/node.rb#16704 Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array pattern in pattern matching. @@ -927,70 +1124,106 @@ Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # foo in Bar[1, 2, 3] # ^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#851 +# source://prism/lib/prism/node.rb#888 class Prism::ArrayPatternNode < ::Prism::Node # Initialize a new ArrayPatternNode node. # # @return [ArrayPatternNode] a new instance of ArrayPatternNode # - # source://prism/lib/prism/node.rb#853 + # source://prism/lib/prism/node.rb#890 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, constant, requireds, rest, posts, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#969 + # source://prism/lib/prism/node.rb#1006 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#867 + # source://prism/lib/prism/node.rb#904 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#872 + # source://prism/lib/prism/node.rb#909 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism/lib/prism/node.rb#948 + # source://prism/lib/prism/node.rb#985 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism/lib/prism/node.rb#930 + # source://prism/lib/prism/node.rb#967 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#887 + # source://prism/lib/prism/node.rb#924 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#877 + # source://prism/lib/prism/node.rb#914 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Prism::node? + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil # - # source://prism/lib/prism/node.rb#905 + # source://prism/lib/prism/node.rb#942 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } def constant; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: Prism::node?, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode # - # source://prism/lib/prism/node.rb#892 + # source://prism/lib/prism/node.rb#929 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayPatternNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#872 + # source://prism/lib/prism/node.rb#909 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: Prism::node?, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } # - # source://prism/lib/prism/node.rb#900 + # source://prism/lib/prism/node.rb#937 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -998,45 +1231,50 @@ class Prism::ArrayPatternNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#953 + # source://prism/lib/prism/node.rb#990 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism/lib/prism/node.rb#943 + # source://prism/lib/prism/node.rb#980 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism/lib/prism/node.rb#917 + # source://prism/lib/prism/node.rb#954 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader posts: Array[Prism::node] # - # source://prism/lib/prism/node.rb#914 + # source://prism/lib/prism/node.rb#951 + sig { returns(T::Array[Prism::Node]) } def posts; end # attr_reader requireds: Array[Prism::node] # - # source://prism/lib/prism/node.rb#908 + # source://prism/lib/prism/node.rb#945 + sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader rest: Prism::node? # - # source://prism/lib/prism/node.rb#911 + # source://prism/lib/prism/node.rb#948 + sig { returns(T.nilable(Prism::Node)) } def rest; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#958 + # source://prism/lib/prism/node.rb#995 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#963 + # source://prism/lib/prism/node.rb#1000 def type; end end end @@ -1046,55 +1284,82 @@ end # { a => b } # ^^^^^^ # -# source://prism/lib/prism/node.rb#986 +# source://prism/lib/prism/node.rb#1023 class Prism::AssocNode < ::Prism::Node # Initialize a new AssocNode node. # # @return [AssocNode] a new instance of AssocNode # - # source://prism/lib/prism/node.rb#988 + # source://prism/lib/prism/node.rb#1025 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, key, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#1090 + # source://prism/lib/prism/node.rb#1127 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#999 + # source://prism/lib/prism/node.rb#1036 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1004 + # source://prism/lib/prism/node.rb#1041 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#1014 + # source://prism/lib/prism/node.rb#1051 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#1009 + # source://prism/lib/prism/node.rb#1046 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?) -> AssocNode # - # source://prism/lib/prism/node.rb#1019 + # source://prism/lib/prism/node.rb#1056 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).returns(Prism::AssocNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1004 + # source://prism/lib/prism/node.rb#1041 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, key: Prism::node, value: Prism::node, operator_loc: Location? } # - # source://prism/lib/prism/node.rb#1027 + # source://prism/lib/prism/node.rb#1064 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1102,7 +1367,7 @@ class Prism::AssocNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#1074 + # source://prism/lib/prism/node.rb#1111 sig { override.returns(String) } def inspect; end @@ -1117,12 +1382,14 @@ class Prism::AssocNode < ::Prism::Node # { def a; end => 1 } # ^^^^^^^^^^ # - # source://prism/lib/prism/node.rb#1041 + # source://prism/lib/prism/node.rb#1078 + sig { returns(Prism::Node) } def key; end # def operator: () -> String? # - # source://prism/lib/prism/node.rb#1069 + # source://prism/lib/prism/node.rb#1106 + sig { returns(T.nilable(String)) } def operator; end # The location of the `=>` operator, if present. @@ -1130,12 +1397,13 @@ class Prism::AssocNode < ::Prism::Node # { foo => bar } # ^^ # - # source://prism/lib/prism/node.rb#1056 + # source://prism/lib/prism/node.rb#1093 + sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#1079 + # source://prism/lib/prism/node.rb#1116 sig { override.returns(Symbol) } def type; end @@ -1147,13 +1415,14 @@ class Prism::AssocNode < ::Prism::Node # { x: 1 } # ^ # - # source://prism/lib/prism/node.rb#1050 + # source://prism/lib/prism/node.rb#1087 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#1084 + # source://prism/lib/prism/node.rb#1121 def type; end end end @@ -1163,55 +1432,80 @@ end # { **foo } # ^^^^^ # -# source://prism/lib/prism/node.rb#1102 +# source://prism/lib/prism/node.rb#1139 class Prism::AssocSplatNode < ::Prism::Node # Initialize a new AssocSplatNode node. # # @return [AssocSplatNode] a new instance of AssocSplatNode # - # source://prism/lib/prism/node.rb#1104 + # source://prism/lib/prism/node.rb#1141 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#1186 + # source://prism/lib/prism/node.rb#1223 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#1114 + # source://prism/lib/prism/node.rb#1151 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1119 + # source://prism/lib/prism/node.rb#1156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#1131 + # source://prism/lib/prism/node.rb#1168 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#1124 + # source://prism/lib/prism/node.rb#1161 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node?, ?operator_loc: Location) -> AssocSplatNode # - # source://prism/lib/prism/node.rb#1136 + # source://prism/lib/prism/node.rb#1173 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::AssocSplatNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1119 + # source://prism/lib/prism/node.rb#1156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node?, operator_loc: Location } # - # source://prism/lib/prism/node.rb#1144 + # source://prism/lib/prism/node.rb#1181 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1219,13 +1513,14 @@ class Prism::AssocSplatNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#1170 + # source://prism/lib/prism/node.rb#1207 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#1165 + # source://prism/lib/prism/node.rb#1202 + sig { returns(String) } def operator; end # The location of the `**` operator. @@ -1233,12 +1528,13 @@ class Prism::AssocSplatNode < ::Prism::Node # { **x } # ^^ # - # source://prism/lib/prism/node.rb#1158 + # source://prism/lib/prism/node.rb#1195 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#1175 + # source://prism/lib/prism/node.rb#1212 sig { override.returns(Symbol) } def type; end @@ -1247,13 +1543,14 @@ class Prism::AssocSplatNode < ::Prism::Node # { **foo } # ^^^ # - # source://prism/lib/prism/node.rb#1152 + # source://prism/lib/prism/node.rb#1189 + sig { returns(T.nilable(Prism::Node)) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#1180 + # source://prism/lib/prism/node.rb#1217 def type; end end end @@ -1268,55 +1565,70 @@ Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # $' # ^^ # -# source://prism/lib/prism/node.rb#1197 +# source://prism/lib/prism/node.rb#1234 class Prism::BackReferenceReadNode < ::Prism::Node # Initialize a new BackReferenceReadNode node. # # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode # - # source://prism/lib/prism/node.rb#1199 + # source://prism/lib/prism/node.rb#1236 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#1264 + # source://prism/lib/prism/node.rb#1301 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#1208 + # source://prism/lib/prism/node.rb#1245 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1213 + # source://prism/lib/prism/node.rb#1250 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#1223 + # source://prism/lib/prism/node.rb#1260 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#1218 + # source://prism/lib/prism/node.rb#1255 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BackReferenceReadNode # - # source://prism/lib/prism/node.rb#1228 + # source://prism/lib/prism/node.rb#1265 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BackReferenceReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1213 + # source://prism/lib/prism/node.rb#1250 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism/lib/prism/node.rb#1236 + # source://prism/lib/prism/node.rb#1273 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1324,7 +1636,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#1248 + # source://prism/lib/prism/node.rb#1285 sig { override.returns(String) } def inspect; end @@ -1334,19 +1646,20 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # $+ # name `:$+` # - # source://prism/lib/prism/node.rb#1245 + # source://prism/lib/prism/node.rb#1282 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#1253 + # source://prism/lib/prism/node.rb#1290 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#1258 + # source://prism/lib/prism/node.rb#1295 def type; end end end @@ -1385,85 +1698,124 @@ end # end # ^^^^^ # -# source://prism/lib/prism/node.rb#1276 +# source://prism/lib/prism/node.rb#1313 class Prism::BeginNode < ::Prism::Node # Initialize a new BeginNode node. # # @return [BeginNode] a new instance of BeginNode # - # source://prism/lib/prism/node.rb#1278 + # source://prism/lib/prism/node.rb#1315 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#1394 + # source://prism/lib/prism/node.rb#1431 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#1292 + # source://prism/lib/prism/node.rb#1329 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_keyword: () -> String? # - # source://prism/lib/prism/node.rb#1368 + # source://prism/lib/prism/node.rb#1405 + sig { returns(T.nilable(String)) } def begin_keyword; end # attr_reader begin_keyword_loc: Location? # - # source://prism/lib/prism/node.rb#1330 + # source://prism/lib/prism/node.rb#1367 + sig { returns(T.nilable(Prism::Location)) } def begin_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1297 + # source://prism/lib/prism/node.rb#1334 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#1312 + # source://prism/lib/prism/node.rb#1349 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#1302 + # source://prism/lib/prism/node.rb#1339 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?) -> BeginNode # - # source://prism/lib/prism/node.rb#1317 + # source://prism/lib/prism/node.rb#1354 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::BeginNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1297 + # source://prism/lib/prism/node.rb#1334 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location? } # - # source://prism/lib/prism/node.rb#1325 + # source://prism/lib/prism/node.rb#1362 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader else_clause: ElseNode? # - # source://prism/lib/prism/node.rb#1349 + # source://prism/lib/prism/node.rb#1386 + sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism/lib/prism/node.rb#1373 + # source://prism/lib/prism/node.rb#1410 + sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism/lib/prism/node.rb#1355 + # source://prism/lib/prism/node.rb#1392 + sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # attr_reader ensure_clause: EnsureNode? # - # source://prism/lib/prism/node.rb#1352 + # source://prism/lib/prism/node.rb#1389 + sig { returns(T.nilable(Prism::EnsureNode)) } def ensure_clause; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1471,7 +1823,7 @@ class Prism::BeginNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#1378 + # source://prism/lib/prism/node.rb#1415 sig { override.returns(String) } def inspect; end @@ -1480,24 +1832,26 @@ class Prism::BeginNode < ::Prism::Node # attr_reader rescue_clause: RescueNode? # - # source://prism/lib/prism/node.rb#1346 + # source://prism/lib/prism/node.rb#1383 + sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end # attr_reader statements: StatementsNode? # - # source://prism/lib/prism/node.rb#1343 + # source://prism/lib/prism/node.rb#1380 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#1383 + # source://prism/lib/prism/node.rb#1420 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#1388 + # source://prism/lib/prism/node.rb#1425 def type; end end end @@ -1507,60 +1861,86 @@ end # bar(&args) # ^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#1409 +# source://prism/lib/prism/node.rb#1446 class Prism::BlockArgumentNode < ::Prism::Node # Initialize a new BlockArgumentNode node. # # @return [BlockArgumentNode] a new instance of BlockArgumentNode # - # source://prism/lib/prism/node.rb#1411 + # source://prism/lib/prism/node.rb#1448 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, expression, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#1487 + # source://prism/lib/prism/node.rb#1524 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#1421 + # source://prism/lib/prism/node.rb#1458 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1426 + # source://prism/lib/prism/node.rb#1463 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#1438 + # source://prism/lib/prism/node.rb#1475 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#1431 + # source://prism/lib/prism/node.rb#1468 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node?, ?operator_loc: Location) -> BlockArgumentNode # - # source://prism/lib/prism/node.rb#1443 + # source://prism/lib/prism/node.rb#1480 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::BlockArgumentNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1426 + # source://prism/lib/prism/node.rb#1463 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node?, operator_loc: Location } # - # source://prism/lib/prism/node.rb#1451 + # source://prism/lib/prism/node.rb#1488 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node? # - # source://prism/lib/prism/node.rb#1456 + # source://prism/lib/prism/node.rb#1493 + sig { returns(T.nilable(Prism::Node)) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1568,30 +1948,32 @@ class Prism::BlockArgumentNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#1471 + # source://prism/lib/prism/node.rb#1508 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#1466 + # source://prism/lib/prism/node.rb#1503 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#1459 + # source://prism/lib/prism/node.rb#1496 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#1476 + # source://prism/lib/prism/node.rb#1513 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#1481 + # source://prism/lib/prism/node.rb#1518 def type; end end end @@ -1601,49 +1983,49 @@ end # a { |; b| } # ^ # -# source://prism/lib/prism/node.rb#1498 +# source://prism/lib/prism/node.rb#1535 class Prism::BlockLocalVariableNode < ::Prism::Node # Initialize a new BlockLocalVariableNode node. # # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode # - # source://prism/lib/prism/node.rb#1500 + # source://prism/lib/prism/node.rb#1537 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#1566 + # source://prism/lib/prism/node.rb#1603 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#1509 + # source://prism/lib/prism/node.rb#1546 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1514 + # source://prism/lib/prism/node.rb#1551 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#1524 + # source://prism/lib/prism/node.rb#1561 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#1519 + # source://prism/lib/prism/node.rb#1556 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BlockLocalVariableNode # - # source://prism/lib/prism/node.rb#1529 + # source://prism/lib/prism/node.rb#1566 sig do params( node_id: Integer, @@ -1657,13 +2039,13 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1514 + # source://prism/lib/prism/node.rb#1551 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism/lib/prism/node.rb#1537 + # source://prism/lib/prism/node.rb#1574 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1672,13 +2054,13 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#1550 + # source://prism/lib/prism/node.rb#1587 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#1547 + # source://prism/lib/prism/node.rb#1584 sig { returns(Symbol) } def name; end @@ -1686,20 +2068,20 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#1542 + # source://prism/lib/prism/node.rb#1579 sig { returns(T::Boolean) } def repeated_parameter?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#1555 + # source://prism/lib/prism/node.rb#1592 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#1560 + # source://prism/lib/prism/node.rb#1597 def type; end end end @@ -1709,70 +2091,104 @@ end # [1, 2, 3].each { |i| puts x } # ^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#1577 +# source://prism/lib/prism/node.rb#1614 class Prism::BlockNode < ::Prism::Node # Initialize a new BlockNode node. # # @return [BlockNode] a new instance of BlockNode # - # source://prism/lib/prism/node.rb#1579 + # source://prism/lib/prism/node.rb#1616 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, locals, parameters, body, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#1677 + # source://prism/lib/prism/node.rb#1714 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#1592 + # source://prism/lib/prism/node.rb#1629 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism/lib/prism/node.rb#1634 + # source://prism/lib/prism/node.rb#1671 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1597 + # source://prism/lib/prism/node.rb#1634 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#1656 + # source://prism/lib/prism/node.rb#1693 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#1644 + # source://prism/lib/prism/node.rb#1681 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#1610 + # source://prism/lib/prism/node.rb#1647 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#1602 + # source://prism/lib/prism/node.rb#1639 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil, ?opening_loc: Location, ?closing_loc: Location) -> BlockNode # - # source://prism/lib/prism/node.rb#1615 + # source://prism/lib/prism/node.rb#1652 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::BlockNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1597 + # source://prism/lib/prism/node.rb#1634 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil, opening_loc: Location, closing_loc: Location } # - # source://prism/lib/prism/node.rb#1623 + # source://prism/lib/prism/node.rb#1660 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1780,40 +2196,44 @@ class Prism::BlockNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#1661 + # source://prism/lib/prism/node.rb#1698 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism/lib/prism/node.rb#1628 + # source://prism/lib/prism/node.rb#1665 + sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#1651 + # source://prism/lib/prism/node.rb#1688 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#1637 + # source://prism/lib/prism/node.rb#1674 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil # - # source://prism/lib/prism/node.rb#1631 + # source://prism/lib/prism/node.rb#1668 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#1666 + # source://prism/lib/prism/node.rb#1703 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#1671 + # source://prism/lib/prism/node.rb#1708 def type; end end end @@ -1824,13 +2244,13 @@ end # ^^ # end # -# source://prism/lib/prism/node.rb#1693 +# source://prism/lib/prism/node.rb#1730 class Prism::BlockParameterNode < ::Prism::Node # Initialize a new BlockParameterNode node. # # @return [BlockParameterNode] a new instance of BlockParameterNode # - # source://prism/lib/prism/node.rb#1695 + # source://prism/lib/prism/node.rb#1732 sig do params( source: Prism::Source, @@ -1847,36 +2267,36 @@ class Prism::BlockParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#1788 + # source://prism/lib/prism/node.rb#1825 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#1706 + # source://prism/lib/prism/node.rb#1743 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1711 + # source://prism/lib/prism/node.rb#1748 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#1721 + # source://prism/lib/prism/node.rb#1758 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#1716 + # source://prism/lib/prism/node.rb#1753 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> BlockParameterNode # - # source://prism/lib/prism/node.rb#1726 + # source://prism/lib/prism/node.rb#1763 sig do params( node_id: Integer, @@ -1892,13 +2312,13 @@ class Prism::BlockParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1711 + # source://prism/lib/prism/node.rb#1748 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism/lib/prism/node.rb#1734 + # source://prism/lib/prism/node.rb#1771 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1907,31 +2327,31 @@ class Prism::BlockParameterNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#1772 + # source://prism/lib/prism/node.rb#1809 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism/lib/prism/node.rb#1744 + # source://prism/lib/prism/node.rb#1781 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism/lib/prism/node.rb#1747 + # source://prism/lib/prism/node.rb#1784 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#1767 + # source://prism/lib/prism/node.rb#1804 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#1760 + # source://prism/lib/prism/node.rb#1797 sig { returns(Prism::Location) } def operator_loc; end @@ -1939,20 +2359,20 @@ class Prism::BlockParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#1739 + # source://prism/lib/prism/node.rb#1776 sig { returns(T::Boolean) } def repeated_parameter?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#1777 + # source://prism/lib/prism/node.rb#1814 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#1782 + # source://prism/lib/prism/node.rb#1819 def type; end end end @@ -1966,65 +2386,96 @@ end # ^^^^^^^^^^^^^^^^^ # end # -# source://prism/lib/prism/node.rb#1805 +# source://prism/lib/prism/node.rb#1842 class Prism::BlockParametersNode < ::Prism::Node # Initialize a new BlockParametersNode node. # # @return [BlockParametersNode] a new instance of BlockParametersNode # - # source://prism/lib/prism/node.rb#1807 + # source://prism/lib/prism/node.rb#1844 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, parameters, locals, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#1913 + # source://prism/lib/prism/node.rb#1950 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#1819 + # source://prism/lib/prism/node.rb#1856 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1824 + # source://prism/lib/prism/node.rb#1861 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism/lib/prism/node.rb#1892 + # source://prism/lib/prism/node.rb#1929 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism/lib/prism/node.rb#1874 + # source://prism/lib/prism/node.rb#1911 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#1837 + # source://prism/lib/prism/node.rb#1874 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#1829 + # source://prism/lib/prism/node.rb#1866 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?) -> BlockParametersNode # - # source://prism/lib/prism/node.rb#1842 + # source://prism/lib/prism/node.rb#1879 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::BlockParametersNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1824 + # source://prism/lib/prism/node.rb#1861 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location? } # - # source://prism/lib/prism/node.rb#1850 + # source://prism/lib/prism/node.rb#1887 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -2032,40 +2483,44 @@ class Prism::BlockParametersNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#1897 + # source://prism/lib/prism/node.rb#1934 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[BlockLocalVariableNode] # - # source://prism/lib/prism/node.rb#1858 + # source://prism/lib/prism/node.rb#1895 + sig { returns(T::Array[Prism::BlockLocalVariableNode]) } def locals; end # def opening: () -> String? # - # source://prism/lib/prism/node.rb#1887 + # source://prism/lib/prism/node.rb#1924 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism/lib/prism/node.rb#1861 + # source://prism/lib/prism/node.rb#1898 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parameters: ParametersNode? # - # source://prism/lib/prism/node.rb#1855 + # source://prism/lib/prism/node.rb#1892 + sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#1902 + # source://prism/lib/prism/node.rb#1939 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#1907 + # source://prism/lib/prism/node.rb#1944 def type; end end end @@ -2075,24 +2530,35 @@ end # break foo # ^^^^^^^^^ # -# source://prism/lib/prism/node.rb#1927 +# source://prism/lib/prism/node.rb#1964 class Prism::BreakNode < ::Prism::Node # Initialize a new BreakNode node. # # @return [BreakNode] a new instance of BreakNode # - # source://prism/lib/prism/node.rb#1929 + # source://prism/lib/prism/node.rb#1966 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, arguments, keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#2011 + # source://prism/lib/prism/node.rb#2048 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#1939 + # source://prism/lib/prism/node.rb#1976 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # The arguments to the break statement, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). @@ -2100,38 +2566,53 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^ # - # source://prism/lib/prism/node.rb#1977 + # source://prism/lib/prism/node.rb#2014 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1944 + # source://prism/lib/prism/node.rb#1981 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#1956 + # source://prism/lib/prism/node.rb#1993 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#1949 + # source://prism/lib/prism/node.rb#1986 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> BreakNode # - # source://prism/lib/prism/node.rb#1961 + # source://prism/lib/prism/node.rb#1998 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::BreakNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#1944 + # source://prism/lib/prism/node.rb#1981 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # - # source://prism/lib/prism/node.rb#1969 + # source://prism/lib/prism/node.rb#2006 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -2139,13 +2620,14 @@ class Prism::BreakNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#1995 + # source://prism/lib/prism/node.rb#2032 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#1990 + # source://prism/lib/prism/node.rb#2027 + sig { returns(String) } def keyword; end # The location of the `break` keyword. @@ -2153,19 +2635,20 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^^^ # - # source://prism/lib/prism/node.rb#1983 + # source://prism/lib/prism/node.rb#2020 + sig { returns(Prism::Location) } def keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#2000 + # source://prism/lib/prism/node.rb#2037 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#2005 + # source://prism/lib/prism/node.rb#2042 def type; end end end @@ -2175,13 +2658,13 @@ end # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#2022 +# source://prism/lib/prism/node.rb#2059 class Prism::CallAndWriteNode < ::Prism::Node # Initialize a new CallAndWriteNode node. # # @return [CallAndWriteNode] a new instance of CallAndWriteNode # - # source://prism/lib/prism/node.rb#2024 + # source://prism/lib/prism/node.rb#2061 sig do params( source: Prism::Source, @@ -2202,12 +2685,12 @@ class Prism::CallAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#2171 + # source://prism/lib/prism/node.rb#2208 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#2039 + # source://prism/lib/prism/node.rb#2076 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2215,43 +2698,43 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2085 + # source://prism/lib/prism/node.rb#2122 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism/lib/prism/node.rb#2140 + # source://prism/lib/prism/node.rb#2177 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism/lib/prism/node.rb#2098 + # source://prism/lib/prism/node.rb#2135 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2044 + # source://prism/lib/prism/node.rb#2081 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#2057 + # source://prism/lib/prism/node.rb#2094 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#2049 + # source://prism/lib/prism/node.rb#2086 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallAndWriteNode # - # source://prism/lib/prism/node.rb#2062 + # source://prism/lib/prism/node.rb#2099 sig do params( node_id: Integer, @@ -2271,13 +2754,13 @@ class Prism::CallAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2044 + # source://prism/lib/prism/node.rb#2081 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#2070 + # source://prism/lib/prism/node.rb#2107 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2288,49 +2771,49 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2090 + # source://prism/lib/prism/node.rb#2127 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#2155 + # source://prism/lib/prism/node.rb#2192 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism/lib/prism/node.rb#2145 + # source://prism/lib/prism/node.rb#2182 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism/lib/prism/node.rb#2111 + # source://prism/lib/prism/node.rb#2148 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#2150 + # source://prism/lib/prism/node.rb#2187 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#2130 + # source://prism/lib/prism/node.rb#2167 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism/lib/prism/node.rb#2124 + # source://prism/lib/prism/node.rb#2161 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism/lib/prism/node.rb#2095 + # source://prism/lib/prism/node.rb#2132 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2338,19 +2821,19 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2075 + # source://prism/lib/prism/node.rb#2112 sig { returns(T::Boolean) } def safe_navigation?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#2160 + # source://prism/lib/prism/node.rb#2197 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#2137 + # source://prism/lib/prism/node.rb#2174 sig { returns(Prism::Node) } def value; end @@ -2358,20 +2841,20 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2080 + # source://prism/lib/prism/node.rb#2117 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism/lib/prism/node.rb#2127 + # source://prism/lib/prism/node.rb#2164 sig { returns(Symbol) } def write_name; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#2165 + # source://prism/lib/prism/node.rb#2202 def type; end end end @@ -2396,13 +2879,13 @@ end # foo&.bar # ^^^^^^^^ # -# source://prism/lib/prism/node.rb#2203 +# source://prism/lib/prism/node.rb#2240 class Prism::CallNode < ::Prism::Node # Initialize a new CallNode node. # # @return [CallNode] a new instance of CallNode # - # source://prism/lib/prism/node.rb#2205 + # source://prism/lib/prism/node.rb#2242 sig do params( source: Prism::Source, @@ -2416,7 +2899,7 @@ class Prism::CallNode < ::Prism::Node opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node) + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).void end def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block); end @@ -2424,18 +2907,18 @@ class Prism::CallNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#2387 + # source://prism/lib/prism/node.rb#2424 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#2221 + # source://prism/lib/prism/node.rb#2258 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism/lib/prism/node.rb#2332 + # source://prism/lib/prism/node.rb#2369 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -2443,61 +2926,61 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2268 + # source://prism/lib/prism/node.rb#2305 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Prism::node? + # attr_reader block: BlockNode | BlockArgumentNode | nil # - # source://prism/lib/prism/node.rb#2348 - sig { returns(T.nilable(Prism::Node)) } + # source://prism/lib/prism/node.rb#2385 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end # def call_operator: () -> String? # - # source://prism/lib/prism/node.rb#2351 + # source://prism/lib/prism/node.rb#2388 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism/lib/prism/node.rb#2290 + # source://prism/lib/prism/node.rb#2327 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2226 + # source://prism/lib/prism/node.rb#2263 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism/lib/prism/node.rb#2366 + # source://prism/lib/prism/node.rb#2403 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism/lib/prism/node.rb#2335 + # source://prism/lib/prism/node.rb#2372 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#2240 + # source://prism/lib/prism/node.rb#2277 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#2231 + # source://prism/lib/prism/node.rb#2268 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: Prism::node?) -> CallNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> CallNode # - # source://prism/lib/prism/node.rb#2245 + # source://prism/lib/prism/node.rb#2282 sig do params( node_id: Integer, @@ -2510,7 +2993,7 @@ class Prism::CallNode < ::Prism::Node opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node) + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).returns(Prism::CallNode) end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end @@ -2518,13 +3001,13 @@ class Prism::CallNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2226 + # source://prism/lib/prism/node.rb#2263 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Prism::node? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: BlockNode | BlockArgumentNode | nil } # - # source://prism/lib/prism/node.rb#2253 + # source://prism/lib/prism/node.rb#2290 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2549,43 +3032,43 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2273 + # source://prism/lib/prism/node.rb#2310 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#2371 + # source://prism/lib/prism/node.rb#2408 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism/lib/prism/node.rb#2356 + # source://prism/lib/prism/node.rb#2393 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism/lib/prism/node.rb#2306 + # source://prism/lib/prism/node.rb#2343 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#2303 + # source://prism/lib/prism/node.rb#2340 sig { returns(Symbol) } def name; end # def opening: () -> String? # - # source://prism/lib/prism/node.rb#2361 + # source://prism/lib/prism/node.rb#2398 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism/lib/prism/node.rb#2319 + # source://prism/lib/prism/node.rb#2356 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -2600,7 +3083,7 @@ class Prism::CallNode < ::Prism::Node # foo + bar # ^^^ # - # source://prism/lib/prism/node.rb#2287 + # source://prism/lib/prism/node.rb#2324 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2608,13 +3091,13 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2258 + # source://prism/lib/prism/node.rb#2295 sig { returns(T::Boolean) } def safe_navigation?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#2376 + # source://prism/lib/prism/node.rb#2413 sig { override.returns(Symbol) } def type; end @@ -2622,41 +3105,41 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2263 + # source://prism/lib/prism/node.rb#2300 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#2381 + # source://prism/lib/prism/node.rb#2418 def type; end end end # Flags for call nodes. # -# source://prism/lib/prism/node.rb#16665 +# source://prism/lib/prism/node.rb#16708 module Prism::CallNodeFlags; end # a call that is an attribute write, so the value being written should be returned # -# source://prism/lib/prism/node.rb#16673 +# source://prism/lib/prism/node.rb#16716 Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) # a call that ignores method visibility # -# source://prism/lib/prism/node.rb#16676 +# source://prism/lib/prism/node.rb#16719 Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) # &. operator # -# source://prism/lib/prism/node.rb#16667 +# source://prism/lib/prism/node.rb#16710 Prism::CallNodeFlags::SAFE_NAVIGATION = T.let(T.unsafe(nil), Integer) # a call that could have been a local variable # -# source://prism/lib/prism/node.rb#16670 +# source://prism/lib/prism/node.rb#16713 Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # Represents the use of an assignment operator on a call. @@ -2664,13 +3147,13 @@ Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # foo.bar += baz # ^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#2405 +# source://prism/lib/prism/node.rb#2442 class Prism::CallOperatorWriteNode < ::Prism::Node # Initialize a new CallOperatorWriteNode node. # # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode # - # source://prism/lib/prism/node.rb#2407 + # source://prism/lib/prism/node.rb#2444 sig do params( source: Prism::Source, @@ -2692,12 +3175,12 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#2553 + # source://prism/lib/prism/node.rb#2590 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#2423 + # source://prism/lib/prism/node.rb#2460 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2705,55 +3188,55 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2469 + # source://prism/lib/prism/node.rb#2506 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader binary_operator: Symbol # - # source://prism/lib/prism/node.rb#2514 + # source://prism/lib/prism/node.rb#2551 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism/lib/prism/node.rb#2517 + # source://prism/lib/prism/node.rb#2554 sig { returns(Prism::Location) } def binary_operator_loc; end # def call_operator: () -> String? # - # source://prism/lib/prism/node.rb#2527 + # source://prism/lib/prism/node.rb#2564 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism/lib/prism/node.rb#2482 + # source://prism/lib/prism/node.rb#2519 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2428 + # source://prism/lib/prism/node.rb#2465 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#2441 + # source://prism/lib/prism/node.rb#2478 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#2433 + # source://prism/lib/prism/node.rb#2470 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> CallOperatorWriteNode # - # source://prism/lib/prism/node.rb#2446 + # source://prism/lib/prism/node.rb#2483 sig do params( node_id: Integer, @@ -2774,13 +3257,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2428 + # source://prism/lib/prism/node.rb#2465 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#2454 + # source://prism/lib/prism/node.rb#2491 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2791,25 +3274,25 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2474 + # source://prism/lib/prism/node.rb#2511 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#2537 + # source://prism/lib/prism/node.rb#2574 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism/lib/prism/node.rb#2532 + # source://prism/lib/prism/node.rb#2569 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism/lib/prism/node.rb#2495 + # source://prism/lib/prism/node.rb#2532 sig { returns(T.nilable(Prism::Location)) } def message_loc; end @@ -2827,13 +3310,13 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # attr_reader read_name: Symbol # - # source://prism/lib/prism/node.rb#2508 + # source://prism/lib/prism/node.rb#2545 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism/lib/prism/node.rb#2479 + # source://prism/lib/prism/node.rb#2516 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2841,19 +3324,19 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2459 + # source://prism/lib/prism/node.rb#2496 sig { returns(T::Boolean) } def safe_navigation?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#2542 + # source://prism/lib/prism/node.rb#2579 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#2524 + # source://prism/lib/prism/node.rb#2561 sig { returns(Prism::Node) } def value; end @@ -2861,20 +3344,20 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2464 + # source://prism/lib/prism/node.rb#2501 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism/lib/prism/node.rb#2511 + # source://prism/lib/prism/node.rb#2548 sig { returns(Symbol) } def write_name; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#2547 + # source://prism/lib/prism/node.rb#2584 def type; end end end @@ -2884,13 +3367,13 @@ end # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#2571 +# source://prism/lib/prism/node.rb#2608 class Prism::CallOrWriteNode < ::Prism::Node # Initialize a new CallOrWriteNode node. # # @return [CallOrWriteNode] a new instance of CallOrWriteNode # - # source://prism/lib/prism/node.rb#2573 + # source://prism/lib/prism/node.rb#2610 sig do params( source: Prism::Source, @@ -2911,12 +3394,12 @@ class Prism::CallOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#2720 + # source://prism/lib/prism/node.rb#2757 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#2588 + # source://prism/lib/prism/node.rb#2625 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2924,43 +3407,43 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2634 + # source://prism/lib/prism/node.rb#2671 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism/lib/prism/node.rb#2689 + # source://prism/lib/prism/node.rb#2726 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism/lib/prism/node.rb#2647 + # source://prism/lib/prism/node.rb#2684 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2593 + # source://prism/lib/prism/node.rb#2630 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#2606 + # source://prism/lib/prism/node.rb#2643 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#2598 + # source://prism/lib/prism/node.rb#2635 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node) -> CallOrWriteNode # - # source://prism/lib/prism/node.rb#2611 + # source://prism/lib/prism/node.rb#2648 sig do params( node_id: Integer, @@ -2980,13 +3463,13 @@ class Prism::CallOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2593 + # source://prism/lib/prism/node.rb#2630 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#2619 + # source://prism/lib/prism/node.rb#2656 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2997,49 +3480,49 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2639 + # source://prism/lib/prism/node.rb#2676 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#2704 + # source://prism/lib/prism/node.rb#2741 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism/lib/prism/node.rb#2694 + # source://prism/lib/prism/node.rb#2731 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism/lib/prism/node.rb#2660 + # source://prism/lib/prism/node.rb#2697 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#2699 + # source://prism/lib/prism/node.rb#2736 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#2679 + # source://prism/lib/prism/node.rb#2716 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism/lib/prism/node.rb#2673 + # source://prism/lib/prism/node.rb#2710 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism/lib/prism/node.rb#2644 + # source://prism/lib/prism/node.rb#2681 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3047,19 +3530,19 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2624 + # source://prism/lib/prism/node.rb#2661 sig { returns(T::Boolean) } def safe_navigation?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#2709 + # source://prism/lib/prism/node.rb#2746 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#2686 + # source://prism/lib/prism/node.rb#2723 sig { returns(Prism::Node) } def value; end @@ -3067,20 +3550,20 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2629 + # source://prism/lib/prism/node.rb#2666 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism/lib/prism/node.rb#2676 + # source://prism/lib/prism/node.rb#2713 sig { returns(Symbol) } def write_name; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#2714 + # source://prism/lib/prism/node.rb#2751 def type; end end end @@ -3098,13 +3581,13 @@ end # for foo.bar in baz do end # ^^^^^^^ # -# source://prism/lib/prism/node.rb#2745 +# source://prism/lib/prism/node.rb#2782 class Prism::CallTargetNode < ::Prism::Node # Initialize a new CallTargetNode node. # # @return [CallTargetNode] a new instance of CallTargetNode # - # source://prism/lib/prism/node.rb#2747 + # source://prism/lib/prism/node.rb#2784 sig do params( source: Prism::Source, @@ -3122,12 +3605,12 @@ class Prism::CallTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#2858 + # source://prism/lib/prism/node.rb#2895 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#2759 + # source://prism/lib/prism/node.rb#2796 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3135,43 +3618,43 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2802 + # source://prism/lib/prism/node.rb#2839 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String # - # source://prism/lib/prism/node.rb#2832 + # source://prism/lib/prism/node.rb#2869 sig { returns(String) } def call_operator; end # attr_reader call_operator_loc: Location # - # source://prism/lib/prism/node.rb#2815 + # source://prism/lib/prism/node.rb#2852 sig { returns(Prism::Location) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2764 + # source://prism/lib/prism/node.rb#2801 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#2774 + # source://prism/lib/prism/node.rb#2811 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#2769 + # source://prism/lib/prism/node.rb#2806 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location) -> CallTargetNode # - # source://prism/lib/prism/node.rb#2779 + # source://prism/lib/prism/node.rb#2816 sig do params( node_id: Integer, @@ -3188,13 +3671,13 @@ class Prism::CallTargetNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2764 + # source://prism/lib/prism/node.rb#2801 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location } # - # source://prism/lib/prism/node.rb#2787 + # source://prism/lib/prism/node.rb#2824 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3205,37 +3688,37 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2807 + # source://prism/lib/prism/node.rb#2844 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#2842 + # source://prism/lib/prism/node.rb#2879 sig { override.returns(String) } def inspect; end # def message: () -> String # - # source://prism/lib/prism/node.rb#2837 + # source://prism/lib/prism/node.rb#2874 sig { returns(String) } def message; end # attr_reader message_loc: Location # - # source://prism/lib/prism/node.rb#2825 + # source://prism/lib/prism/node.rb#2862 sig { returns(Prism::Location) } def message_loc; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#2822 + # source://prism/lib/prism/node.rb#2859 sig { returns(Symbol) } def name; end # attr_reader receiver: Prism::node # - # source://prism/lib/prism/node.rb#2812 + # source://prism/lib/prism/node.rb#2849 sig { returns(Prism::Node) } def receiver; end @@ -3243,13 +3726,13 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2792 + # source://prism/lib/prism/node.rb#2829 sig { returns(T::Boolean) } def safe_navigation?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#2847 + # source://prism/lib/prism/node.rb#2884 sig { override.returns(Symbol) } def type; end @@ -3257,14 +3740,14 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#2797 + # source://prism/lib/prism/node.rb#2834 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#2852 + # source://prism/lib/prism/node.rb#2889 def type; end end end @@ -3274,55 +3757,82 @@ end # foo => [bar => baz] # ^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#2872 +# source://prism/lib/prism/node.rb#2909 class Prism::CapturePatternNode < ::Prism::Node # Initialize a new CapturePatternNode node. # # @return [CapturePatternNode] a new instance of CapturePatternNode # - # source://prism/lib/prism/node.rb#2874 + # source://prism/lib/prism/node.rb#2911 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, value, target, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#2952 + # source://prism/lib/prism/node.rb#2989 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#2885 + # source://prism/lib/prism/node.rb#2922 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2890 + # source://prism/lib/prism/node.rb#2927 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#2900 + # source://prism/lib/prism/node.rb#2937 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#2895 + # source://prism/lib/prism/node.rb#2932 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: Prism::node, ?operator_loc: Location) -> CapturePatternNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: LocalVariableTargetNode, ?operator_loc: Location) -> CapturePatternNode # - # source://prism/lib/prism/node.rb#2905 + # source://prism/lib/prism/node.rb#2942 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).returns(Prism::CapturePatternNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2890 + # source://prism/lib/prism/node.rb#2927 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: Prism::node, operator_loc: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: LocalVariableTargetNode, operator_loc: Location } # - # source://prism/lib/prism/node.rb#2913 + # source://prism/lib/prism/node.rb#2950 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -3330,40 +3840,44 @@ class Prism::CapturePatternNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#2936 + # source://prism/lib/prism/node.rb#2973 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#2931 + # source://prism/lib/prism/node.rb#2968 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#2924 + # source://prism/lib/prism/node.rb#2961 + sig { returns(Prism::Location) } def operator_loc; end - # attr_reader target: Prism::node + # attr_reader target: LocalVariableTargetNode # - # source://prism/lib/prism/node.rb#2921 + # source://prism/lib/prism/node.rb#2958 + sig { returns(Prism::LocalVariableTargetNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#2941 + # source://prism/lib/prism/node.rb#2978 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#2918 + # source://prism/lib/prism/node.rb#2955 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#2946 + # source://prism/lib/prism/node.rb#2983 def type; end end end @@ -3375,54 +3889,74 @@ end # end # ^^^^^^^^^ # -# source://prism/lib/prism/node.rb#2966 +# source://prism/lib/prism/node.rb#3003 class Prism::CaseMatchNode < ::Prism::Node # Initialize a new CaseMatchNode node. # # @return [CaseMatchNode] a new instance of CaseMatchNode # - # source://prism/lib/prism/node.rb#2968 + # source://prism/lib/prism/node.rb#3005 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#3067 + # source://prism/lib/prism/node.rb#3104 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#2981 + # source://prism/lib/prism/node.rb#3018 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism/lib/prism/node.rb#3041 + # source://prism/lib/prism/node.rb#3078 + sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism/lib/prism/node.rb#3027 + # source://prism/lib/prism/node.rb#3064 + sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2986 + # source://prism/lib/prism/node.rb#3023 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#3000 + # source://prism/lib/prism/node.rb#3037 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#2991 + # source://prism/lib/prism/node.rb#3028 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader conditions: Array[Prism::node] + # attr_reader conditions: Array[InNode] # - # source://prism/lib/prism/node.rb#3021 + # source://prism/lib/prism/node.rb#3058 + sig { returns(T::Array[Prism::InNode]) } def conditions; end # Returns the else clause of the case match node. This method is deprecated @@ -3431,35 +3965,52 @@ class Prism::CaseMatchNode < ::Prism::Node # source://prism/lib/prism/node_ext.rb#467 def consequent; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[Prism::node], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseMatchNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[InNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseMatchNode # - # source://prism/lib/prism/node.rb#3005 + # source://prism/lib/prism/node.rb#3042 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseMatchNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#2986 + # source://prism/lib/prism/node.rb#3023 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[Prism::node], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[InNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } # - # source://prism/lib/prism/node.rb#3013 + # source://prism/lib/prism/node.rb#3050 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader else_clause: ElseNode? # - # source://prism/lib/prism/node.rb#3024 + # source://prism/lib/prism/node.rb#3061 + sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String # - # source://prism/lib/prism/node.rb#3046 + # source://prism/lib/prism/node.rb#3083 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism/lib/prism/node.rb#3034 + # source://prism/lib/prism/node.rb#3071 + sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -3467,25 +4018,26 @@ class Prism::CaseMatchNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#3051 + # source://prism/lib/prism/node.rb#3088 sig { override.returns(String) } def inspect; end # attr_reader predicate: Prism::node? # - # source://prism/lib/prism/node.rb#3018 + # source://prism/lib/prism/node.rb#3055 + sig { returns(T.nilable(Prism::Node)) } def predicate; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#3056 + # source://prism/lib/prism/node.rb#3093 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#3061 + # source://prism/lib/prism/node.rb#3098 def type; end end end @@ -3497,54 +4049,74 @@ end # end # ^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#3084 +# source://prism/lib/prism/node.rb#3121 class Prism::CaseNode < ::Prism::Node # Initialize a new CaseNode node. # # @return [CaseNode] a new instance of CaseNode # - # source://prism/lib/prism/node.rb#3086 + # source://prism/lib/prism/node.rb#3123 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#3185 + # source://prism/lib/prism/node.rb#3222 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#3099 + # source://prism/lib/prism/node.rb#3136 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism/lib/prism/node.rb#3159 + # source://prism/lib/prism/node.rb#3196 + sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism/lib/prism/node.rb#3145 + # source://prism/lib/prism/node.rb#3182 + sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3104 + # source://prism/lib/prism/node.rb#3141 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#3118 + # source://prism/lib/prism/node.rb#3155 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#3109 + # source://prism/lib/prism/node.rb#3146 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader conditions: Array[Prism::node] + # attr_reader conditions: Array[WhenNode] # - # source://prism/lib/prism/node.rb#3139 + # source://prism/lib/prism/node.rb#3176 + sig { returns(T::Array[Prism::WhenNode]) } def conditions; end # Returns the else clause of the case node. This method is deprecated in @@ -3553,35 +4125,52 @@ class Prism::CaseNode < ::Prism::Node # source://prism/lib/prism/node_ext.rb#476 def consequent; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[Prism::node], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[WhenNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseNode # - # source://prism/lib/prism/node.rb#3123 + # source://prism/lib/prism/node.rb#3160 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3104 + # source://prism/lib/prism/node.rb#3141 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[Prism::node], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[WhenNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } # - # source://prism/lib/prism/node.rb#3131 + # source://prism/lib/prism/node.rb#3168 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader else_clause: ElseNode? # - # source://prism/lib/prism/node.rb#3142 + # source://prism/lib/prism/node.rb#3179 + sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String # - # source://prism/lib/prism/node.rb#3164 + # source://prism/lib/prism/node.rb#3201 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism/lib/prism/node.rb#3152 + # source://prism/lib/prism/node.rb#3189 + sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -3589,25 +4178,26 @@ class Prism::CaseNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#3169 + # source://prism/lib/prism/node.rb#3206 sig { override.returns(String) } def inspect; end # attr_reader predicate: Prism::node? # - # source://prism/lib/prism/node.rb#3136 + # source://prism/lib/prism/node.rb#3173 + sig { returns(T.nilable(Prism::Node)) } def predicate; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#3174 + # source://prism/lib/prism/node.rb#3211 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#3179 + # source://prism/lib/prism/node.rb#3216 def type; end end end @@ -3617,85 +4207,128 @@ end # class Foo end # ^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#3200 +# source://prism/lib/prism/node.rb#3237 class Prism::ClassNode < ::Prism::Node # Initialize a new ClassNode node. # # @return [ClassNode] a new instance of ClassNode # - # source://prism/lib/prism/node.rb#3202 + # source://prism/lib/prism/node.rb#3239 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).void + end def initialize(source, node_id, location, flags, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#3328 + # source://prism/lib/prism/node.rb#3365 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#3218 + # source://prism/lib/prism/node.rb#3255 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism/lib/prism/node.rb#3284 + # source://prism/lib/prism/node.rb#3321 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3223 + # source://prism/lib/prism/node.rb#3260 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism/lib/prism/node.rb#3297 + # source://prism/lib/prism/node.rb#3334 + sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism/lib/prism/node.rb#3258 + # source://prism/lib/prism/node.rb#3295 + sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#3237 + # source://prism/lib/prism/node.rb#3274 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#3228 + # source://prism/lib/prism/node.rb#3265 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant_path: Prism::node + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode # - # source://prism/lib/prism/node.rb#3265 + # source://prism/lib/prism/node.rb#3302 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode)) } def constant_path; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: Prism::node, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol) -> ClassNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | CallNode, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ClassNode # - # source://prism/lib/prism/node.rb#3242 + # source://prism/lib/prism/node.rb#3279 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ClassNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3223 + # source://prism/lib/prism/node.rb#3260 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, constant_path: Prism::node, inheritance_operator_loc: Location?, superclass: Prism::node?, body: Prism::node?, end_keyword_loc: Location, name: Symbol } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | CallNode, inheritance_operator_loc: Location?, superclass: Prism::node?, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } # - # source://prism/lib/prism/node.rb#3250 + # source://prism/lib/prism/node.rb#3287 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism/lib/prism/node.rb#3307 + # source://prism/lib/prism/node.rb#3344 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism/lib/prism/node.rb#3287 + # source://prism/lib/prism/node.rb#3324 + sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -3703,45 +4336,50 @@ class Prism::ClassNode < ::Prism::Node # def inheritance_operator: () -> String? # - # source://prism/lib/prism/node.rb#3302 + # source://prism/lib/prism/node.rb#3339 + sig { returns(T.nilable(String)) } def inheritance_operator; end # attr_reader inheritance_operator_loc: Location? # - # source://prism/lib/prism/node.rb#3268 + # source://prism/lib/prism/node.rb#3305 + sig { returns(T.nilable(Prism::Location)) } def inheritance_operator_loc; end # def inspect -> String # - # source://prism/lib/prism/node.rb#3312 + # source://prism/lib/prism/node.rb#3349 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism/lib/prism/node.rb#3255 + # source://prism/lib/prism/node.rb#3292 + sig { returns(T::Array[Symbol]) } def locals; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#3294 + # source://prism/lib/prism/node.rb#3331 + sig { returns(Symbol) } def name; end # attr_reader superclass: Prism::node? # - # source://prism/lib/prism/node.rb#3281 + # source://prism/lib/prism/node.rb#3318 + sig { returns(T.nilable(Prism::Node)) } def superclass; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#3317 + # source://prism/lib/prism/node.rb#3354 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#3322 + # source://prism/lib/prism/node.rb#3359 def type; end end end @@ -3751,55 +4389,84 @@ end # @@target &&= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#3346 +# source://prism/lib/prism/node.rb#3383 class Prism::ClassVariableAndWriteNode < ::Prism::Node # Initialize a new ClassVariableAndWriteNode node. # # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode # - # source://prism/lib/prism/node.rb#3348 + # source://prism/lib/prism/node.rb#3385 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#3434 + # source://prism/lib/prism/node.rb#3471 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#3360 + # source://prism/lib/prism/node.rb#3397 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3365 + # source://prism/lib/prism/node.rb#3402 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#3375 + # source://prism/lib/prism/node.rb#3412 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#3370 + # source://prism/lib/prism/node.rb#3407 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableAndWriteNode # - # source://prism/lib/prism/node.rb#3380 + # source://prism/lib/prism/node.rb#3417 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableAndWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3365 + # source://prism/lib/prism/node.rb#3402 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#3388 + # source://prism/lib/prism/node.rb#3425 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#164 @@ -3810,45 +4477,50 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#3418 + # source://prism/lib/prism/node.rb#3455 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#3393 + # source://prism/lib/prism/node.rb#3430 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#3396 + # source://prism/lib/prism/node.rb#3433 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#3413 + # source://prism/lib/prism/node.rb#3450 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#3403 + # source://prism/lib/prism/node.rb#3440 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#3423 + # source://prism/lib/prism/node.rb#3460 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#3410 + # source://prism/lib/prism/node.rb#3447 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#3428 + # source://prism/lib/prism/node.rb#3465 def type; end end end @@ -3858,65 +4530,98 @@ end # @@target += value # ^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#3447 +# source://prism/lib/prism/node.rb#3484 class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # Initialize a new ClassVariableOperatorWriteNode node. # # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode # - # source://prism/lib/prism/node.rb#3449 + # source://prism/lib/prism/node.rb#3486 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#3534 + # source://prism/lib/prism/node.rb#3571 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#3462 + # source://prism/lib/prism/node.rb#3499 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism/lib/prism/node.rb#3515 + # source://prism/lib/prism/node.rb#3552 + sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism/lib/prism/node.rb#3505 + # source://prism/lib/prism/node.rb#3542 + sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3467 + # source://prism/lib/prism/node.rb#3504 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#3477 + # source://prism/lib/prism/node.rb#3514 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#3472 + # source://prism/lib/prism/node.rb#3509 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ClassVariableOperatorWriteNode # - # source://prism/lib/prism/node.rb#3482 + # source://prism/lib/prism/node.rb#3519 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ClassVariableOperatorWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3467 + # source://prism/lib/prism/node.rb#3504 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism/lib/prism/node.rb#3490 + # source://prism/lib/prism/node.rb#3527 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#176 @@ -3927,18 +4632,20 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#3518 + # source://prism/lib/prism/node.rb#3555 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#3495 + # source://prism/lib/prism/node.rb#3532 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#3498 + # source://prism/lib/prism/node.rb#3535 + sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is @@ -3955,19 +4662,20 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#3523 + # source://prism/lib/prism/node.rb#3560 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#3512 + # source://prism/lib/prism/node.rb#3549 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#3528 + # source://prism/lib/prism/node.rb#3565 def type; end end end @@ -3977,55 +4685,84 @@ end # @@target ||= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#3548 +# source://prism/lib/prism/node.rb#3585 class Prism::ClassVariableOrWriteNode < ::Prism::Node # Initialize a new ClassVariableOrWriteNode node. # # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode # - # source://prism/lib/prism/node.rb#3550 + # source://prism/lib/prism/node.rb#3587 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#3636 + # source://prism/lib/prism/node.rb#3673 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#3562 + # source://prism/lib/prism/node.rb#3599 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3567 + # source://prism/lib/prism/node.rb#3604 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#3577 + # source://prism/lib/prism/node.rb#3614 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#3572 + # source://prism/lib/prism/node.rb#3609 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableOrWriteNode # - # source://prism/lib/prism/node.rb#3582 + # source://prism/lib/prism/node.rb#3619 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableOrWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3567 + # source://prism/lib/prism/node.rb#3604 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#3590 + # source://prism/lib/prism/node.rb#3627 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#170 @@ -4036,45 +4773,50 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#3620 + # source://prism/lib/prism/node.rb#3657 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#3595 + # source://prism/lib/prism/node.rb#3632 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#3598 + # source://prism/lib/prism/node.rb#3635 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#3615 + # source://prism/lib/prism/node.rb#3652 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#3605 + # source://prism/lib/prism/node.rb#3642 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#3625 + # source://prism/lib/prism/node.rb#3662 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#3612 + # source://prism/lib/prism/node.rb#3649 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#3630 + # source://prism/lib/prism/node.rb#3667 def type; end end end @@ -4084,55 +4826,70 @@ end # @@foo # ^^^^^ # -# source://prism/lib/prism/node.rb#3649 +# source://prism/lib/prism/node.rb#3686 class Prism::ClassVariableReadNode < ::Prism::Node # Initialize a new ClassVariableReadNode node. # # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode # - # source://prism/lib/prism/node.rb#3651 + # source://prism/lib/prism/node.rb#3688 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#3716 + # source://prism/lib/prism/node.rb#3753 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#3660 + # source://prism/lib/prism/node.rb#3697 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3665 + # source://prism/lib/prism/node.rb#3702 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#3675 + # source://prism/lib/prism/node.rb#3712 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#3670 + # source://prism/lib/prism/node.rb#3707 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableReadNode # - # source://prism/lib/prism/node.rb#3680 + # source://prism/lib/prism/node.rb#3717 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3665 + # source://prism/lib/prism/node.rb#3702 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism/lib/prism/node.rb#3688 + # source://prism/lib/prism/node.rb#3725 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4140,7 +4897,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#3700 + # source://prism/lib/prism/node.rb#3737 sig { override.returns(String) } def inspect; end @@ -4150,19 +4907,20 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # @@_test # name `:@@_test` # - # source://prism/lib/prism/node.rb#3697 + # source://prism/lib/prism/node.rb#3734 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#3705 + # source://prism/lib/prism/node.rb#3742 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#3710 + # source://prism/lib/prism/node.rb#3747 def type; end end end @@ -4172,55 +4930,70 @@ end # @@foo, @@bar = baz # ^^^^^ ^^^^^ # -# source://prism/lib/prism/node.rb#3726 +# source://prism/lib/prism/node.rb#3763 class Prism::ClassVariableTargetNode < ::Prism::Node # Initialize a new ClassVariableTargetNode node. # # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode # - # source://prism/lib/prism/node.rb#3728 + # source://prism/lib/prism/node.rb#3765 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#3789 + # source://prism/lib/prism/node.rb#3826 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#3737 + # source://prism/lib/prism/node.rb#3774 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3742 + # source://prism/lib/prism/node.rb#3779 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#3752 + # source://prism/lib/prism/node.rb#3789 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#3747 + # source://prism/lib/prism/node.rb#3784 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableTargetNode # - # source://prism/lib/prism/node.rb#3757 + # source://prism/lib/prism/node.rb#3794 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3742 + # source://prism/lib/prism/node.rb#3779 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism/lib/prism/node.rb#3765 + # source://prism/lib/prism/node.rb#3802 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4228,25 +5001,26 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#3773 + # source://prism/lib/prism/node.rb#3810 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#3770 + # source://prism/lib/prism/node.rb#3807 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#3778 + # source://prism/lib/prism/node.rb#3815 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#3783 + # source://prism/lib/prism/node.rb#3820 def type; end end end @@ -4256,55 +5030,84 @@ end # @@foo = 1 # ^^^^^^^^^ # -# source://prism/lib/prism/node.rb#3799 +# source://prism/lib/prism/node.rb#3836 class Prism::ClassVariableWriteNode < ::Prism::Node # Initialize a new ClassVariableWriteNode node. # # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode # - # source://prism/lib/prism/node.rb#3801 + # source://prism/lib/prism/node.rb#3838 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#3903 + # source://prism/lib/prism/node.rb#3940 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#3813 + # source://prism/lib/prism/node.rb#3850 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3818 + # source://prism/lib/prism/node.rb#3855 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#3828 + # source://prism/lib/prism/node.rb#3865 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#3823 + # source://prism/lib/prism/node.rb#3860 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ClassVariableWriteNode # - # source://prism/lib/prism/node.rb#3833 + # source://prism/lib/prism/node.rb#3870 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3818 + # source://prism/lib/prism/node.rb#3855 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism/lib/prism/node.rb#3841 + # source://prism/lib/prism/node.rb#3878 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4312,7 +5115,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#3887 + # source://prism/lib/prism/node.rb#3924 sig { override.returns(String) } def inspect; end @@ -4322,7 +5125,8 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # @@_test = :test # name `@@_test` # - # source://prism/lib/prism/node.rb#3850 + # source://prism/lib/prism/node.rb#3887 + sig { returns(Symbol) } def name; end # The location of the variable name. @@ -4330,12 +5134,14 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^^^^^ # - # source://prism/lib/prism/node.rb#3856 + # source://prism/lib/prism/node.rb#3893 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#3882 + # source://prism/lib/prism/node.rb#3919 + sig { returns(String) } def operator; end # The location of the `=` operator. @@ -4343,12 +5149,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^ # - # source://prism/lib/prism/node.rb#3875 + # source://prism/lib/prism/node.rb#3912 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#3892 + # source://prism/lib/prism/node.rb#3929 sig { override.returns(Symbol) } def type; end @@ -4360,21 +5167,75 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@_xyz = 123 # ^^^ # - # source://prism/lib/prism/node.rb#3869 + # source://prism/lib/prism/node.rb#3906 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#3897 + # source://prism/lib/prism/node.rb#3934 def type; end end end +# A cache that can be used to quickly compute code unit offsets from byte +# offsets. It purposefully provides only a single #[] method to access the +# cache in order to minimize surface area. +# +# Note that there are some known issues here that may or may not be addressed +# in the future: +# +# * The first is that there are issues when the cache computes values that are +# not on character boundaries. This can result in subsequent computations +# being off by one or more code units. +# * The second is that this cache is currently unbounded. In theory we could +# introduce some kind of LRU cache to limit the number of entries, but this +# has not yet been implemented. +# +# source://prism/lib/prism/parse_result.rb#172 +class Prism::CodeUnitsCache + # Initialize a new cache with the given source and encoding. + # + # @return [CodeUnitsCache] a new instance of CodeUnitsCache + # + # source://prism/lib/prism/parse_result.rb#198 + sig { params(source: String, encoding: Encoding).void } + def initialize(source, encoding); end + + # Retrieve the code units offset from the given byte offset. + # + # source://prism/lib/prism/parse_result.rb#212 + sig { params(byte_offset: Integer).returns(Integer) } + def [](byte_offset); end +end + +# source://prism/lib/prism/parse_result.rb#184 +class Prism::CodeUnitsCache::LengthCounter + # @return [LengthCounter] a new instance of LengthCounter + # + # source://prism/lib/prism/parse_result.rb#185 + def initialize(source, encoding); end + + # source://prism/lib/prism/parse_result.rb#190 + def count(byte_offset, byte_length); end +end + +# source://prism/lib/prism/parse_result.rb#173 +class Prism::CodeUnitsCache::UTF16Counter + # @return [UTF16Counter] a new instance of UTF16Counter + # + # source://prism/lib/prism/parse_result.rb#174 + def initialize(source, encoding); end + + # source://prism/lib/prism/parse_result.rb#179 + def count(byte_offset, byte_length); end +end + # This represents a comment that was encountered during parsing. It is the # base class for all comment types. # -# source://prism/lib/prism/parse_result.rb#375 +# source://prism/lib/prism/parse_result.rb#507 class Prism::Comment abstract! @@ -4382,25 +5243,25 @@ class Prism::Comment # # @return [Comment] a new instance of Comment # - # source://prism/lib/prism/parse_result.rb#380 + # source://prism/lib/prism/parse_result.rb#512 sig { params(location: Prism::Location).void } def initialize(location); end # Implement the hash pattern matching interface for Comment. # - # source://prism/lib/prism/parse_result.rb#385 + # source://prism/lib/prism/parse_result.rb#517 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The location of this comment in the source. # - # source://prism/lib/prism/parse_result.rb#377 + # source://prism/lib/prism/parse_result.rb#509 sig { returns(Prism::Location) } def location; end # Returns the content of the comment by slicing it from the source code. # - # source://prism/lib/prism/parse_result.rb#390 + # source://prism/lib/prism/parse_result.rb#522 sig { returns(String) } def slice; end @@ -5357,55 +6218,84 @@ end # Target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#3916 +# source://prism/lib/prism/node.rb#3953 class Prism::ConstantAndWriteNode < ::Prism::Node # Initialize a new ConstantAndWriteNode node. # # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode # - # source://prism/lib/prism/node.rb#3918 + # source://prism/lib/prism/node.rb#3955 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#4004 + # source://prism/lib/prism/node.rb#4041 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#3930 + # source://prism/lib/prism/node.rb#3967 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3935 + # source://prism/lib/prism/node.rb#3972 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#3945 + # source://prism/lib/prism/node.rb#3982 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#3940 + # source://prism/lib/prism/node.rb#3977 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantAndWriteNode # - # source://prism/lib/prism/node.rb#3950 + # source://prism/lib/prism/node.rb#3987 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantAndWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#3935 + # source://prism/lib/prism/node.rb#3972 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#3958 + # source://prism/lib/prism/node.rb#3995 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#182 @@ -5416,45 +6306,50 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#3988 + # source://prism/lib/prism/node.rb#4025 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#3963 + # source://prism/lib/prism/node.rb#4000 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#3966 + # source://prism/lib/prism/node.rb#4003 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#3983 + # source://prism/lib/prism/node.rb#4020 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#3973 + # source://prism/lib/prism/node.rb#4010 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#3993 + # source://prism/lib/prism/node.rb#4030 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#3980 + # source://prism/lib/prism/node.rb#4017 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#3998 + # source://prism/lib/prism/node.rb#4035 def type; end end end @@ -5464,65 +6359,98 @@ end # Target += value # ^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#4017 +# source://prism/lib/prism/node.rb#4054 class Prism::ConstantOperatorWriteNode < ::Prism::Node # Initialize a new ConstantOperatorWriteNode node. # # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode # - # source://prism/lib/prism/node.rb#4019 + # source://prism/lib/prism/node.rb#4056 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#4104 + # source://prism/lib/prism/node.rb#4141 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#4032 + # source://prism/lib/prism/node.rb#4069 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism/lib/prism/node.rb#4085 + # source://prism/lib/prism/node.rb#4122 + sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism/lib/prism/node.rb#4075 + # source://prism/lib/prism/node.rb#4112 + sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4037 + # source://prism/lib/prism/node.rb#4074 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#4047 + # source://prism/lib/prism/node.rb#4084 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#4042 + # source://prism/lib/prism/node.rb#4079 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantOperatorWriteNode # - # source://prism/lib/prism/node.rb#4052 + # source://prism/lib/prism/node.rb#4089 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantOperatorWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4037 + # source://prism/lib/prism/node.rb#4074 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism/lib/prism/node.rb#4060 + # source://prism/lib/prism/node.rb#4097 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#194 @@ -5533,18 +6461,20 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#4088 + # source://prism/lib/prism/node.rb#4125 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#4065 + # source://prism/lib/prism/node.rb#4102 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#4068 + # source://prism/lib/prism/node.rb#4105 + sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is @@ -5561,19 +6491,20 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#4093 + # source://prism/lib/prism/node.rb#4130 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#4082 + # source://prism/lib/prism/node.rb#4119 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#4098 + # source://prism/lib/prism/node.rb#4135 def type; end end end @@ -5583,55 +6514,84 @@ end # Target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#4118 +# source://prism/lib/prism/node.rb#4155 class Prism::ConstantOrWriteNode < ::Prism::Node # Initialize a new ConstantOrWriteNode node. # # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode # - # source://prism/lib/prism/node.rb#4120 + # source://prism/lib/prism/node.rb#4157 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#4206 + # source://prism/lib/prism/node.rb#4243 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#4132 + # source://prism/lib/prism/node.rb#4169 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4137 + # source://prism/lib/prism/node.rb#4174 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#4147 + # source://prism/lib/prism/node.rb#4184 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#4142 + # source://prism/lib/prism/node.rb#4179 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantOrWriteNode # - # source://prism/lib/prism/node.rb#4152 + # source://prism/lib/prism/node.rb#4189 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantOrWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4137 + # source://prism/lib/prism/node.rb#4174 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#4160 + # source://prism/lib/prism/node.rb#4197 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#188 @@ -5642,45 +6602,50 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#4190 + # source://prism/lib/prism/node.rb#4227 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#4165 + # source://prism/lib/prism/node.rb#4202 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#4168 + # source://prism/lib/prism/node.rb#4205 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#4185 + # source://prism/lib/prism/node.rb#4222 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#4175 + # source://prism/lib/prism/node.rb#4212 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#4195 + # source://prism/lib/prism/node.rb#4232 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#4182 + # source://prism/lib/prism/node.rb#4219 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#4200 + # source://prism/lib/prism/node.rb#4237 def type; end end end @@ -5690,55 +6655,82 @@ end # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#4219 +# source://prism/lib/prism/node.rb#4256 class Prism::ConstantPathAndWriteNode < ::Prism::Node # Initialize a new ConstantPathAndWriteNode node. # # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode # - # source://prism/lib/prism/node.rb#4221 + # source://prism/lib/prism/node.rb#4258 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, target, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#4299 + # source://prism/lib/prism/node.rb#4336 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#4232 + # source://prism/lib/prism/node.rb#4269 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4237 + # source://prism/lib/prism/node.rb#4274 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#4247 + # source://prism/lib/prism/node.rb#4284 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#4242 + # source://prism/lib/prism/node.rb#4279 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathAndWriteNode # - # source://prism/lib/prism/node.rb#4252 + # source://prism/lib/prism/node.rb#4289 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathAndWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4237 + # source://prism/lib/prism/node.rb#4274 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#4260 + # source://prism/lib/prism/node.rb#4297 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5746,40 +6738,44 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#4283 + # source://prism/lib/prism/node.rb#4320 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#4278 + # source://prism/lib/prism/node.rb#4315 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#4268 + # source://prism/lib/prism/node.rb#4305 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism/lib/prism/node.rb#4265 + # source://prism/lib/prism/node.rb#4302 + sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#4288 + # source://prism/lib/prism/node.rb#4325 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#4275 + # source://prism/lib/prism/node.rb#4312 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#4293 + # source://prism/lib/prism/node.rb#4330 def type; end end end @@ -5789,24 +6785,37 @@ end # Foo::Bar # ^^^^^^^^ # -# source://prism/lib/prism/node.rb#4311 +# source://prism/lib/prism/node.rb#4348 class Prism::ConstantPathNode < ::Prism::Node # Initialize a new ConstantPathNode node. # # @return [ConstantPathNode] a new instance of ConstantPathNode # - # source://prism/lib/prism/node.rb#4313 + # source://prism/lib/prism/node.rb#4350 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#4422 + # source://prism/lib/prism/node.rb#4459 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#4325 + # source://prism/lib/prism/node.rb#4362 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # Previously, we had a child node on this class that contained either a @@ -5818,38 +6827,55 @@ class Prism::ConstantPathNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4330 + # source://prism/lib/prism/node.rb#4367 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#4342 + # source://prism/lib/prism/node.rb#4379 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#4335 + # source://prism/lib/prism/node.rb#4372 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathNode # - # source://prism/lib/prism/node.rb#4347 + # source://prism/lib/prism/node.rb#4384 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4330 + # source://prism/lib/prism/node.rb#4367 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } # - # source://prism/lib/prism/node.rb#4355 + # source://prism/lib/prism/node.rb#4392 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def delimiter: () -> String # - # source://prism/lib/prism/node.rb#4401 + # source://prism/lib/prism/node.rb#4438 + sig { returns(String) } def delimiter; end # The location of the `::` delimiter. @@ -5860,7 +6886,8 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^ # - # source://prism/lib/prism/node.rb#4381 + # source://prism/lib/prism/node.rb#4418 + sig { returns(Prism::Location) } def delimiter_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5881,13 +6908,14 @@ class Prism::ConstantPathNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#4406 + # source://prism/lib/prism/node.rb#4443 sig { override.returns(String) } def inspect; end # The name of the constant being accessed. This could be `nil` in the event of a syntax error. # - # source://prism/lib/prism/node.rb#4372 + # source://prism/lib/prism/node.rb#4409 + sig { returns(T.nilable(Symbol)) } def name; end # The location of the name of the constant. @@ -5898,7 +6926,8 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^^ # - # source://prism/lib/prism/node.rb#4394 + # source://prism/lib/prism/node.rb#4431 + sig { returns(Prism::Location) } def name_loc; end # The left-hand node of the path, if present. It can be `nil` or any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). It will be `nil` when the constant lookup is at the root of the module tree. @@ -5912,19 +6941,20 @@ class Prism::ConstantPathNode < ::Prism::Node # a.b::C # ^^^ # - # source://prism/lib/prism/node.rb#4369 + # source://prism/lib/prism/node.rb#4406 + sig { returns(T.nilable(Prism::Node)) } def parent; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#4411 + # source://prism/lib/prism/node.rb#4448 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#4416 + # source://prism/lib/prism/node.rb#4453 def type; end end end @@ -5951,65 +6981,96 @@ class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError # Parent::Child += value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#4435 +# source://prism/lib/prism/node.rb#4472 class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # Initialize a new ConstantPathOperatorWriteNode node. # # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode # - # source://prism/lib/prism/node.rb#4437 + # source://prism/lib/prism/node.rb#4474 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end def initialize(source, node_id, location, flags, target, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#4514 + # source://prism/lib/prism/node.rb#4551 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#4449 + # source://prism/lib/prism/node.rb#4486 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism/lib/prism/node.rb#4495 + # source://prism/lib/prism/node.rb#4532 + sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism/lib/prism/node.rb#4485 + # source://prism/lib/prism/node.rb#4522 + sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4454 + # source://prism/lib/prism/node.rb#4491 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#4464 + # source://prism/lib/prism/node.rb#4501 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#4459 + # source://prism/lib/prism/node.rb#4496 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantPathOperatorWriteNode # - # source://prism/lib/prism/node.rb#4469 + # source://prism/lib/prism/node.rb#4506 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantPathOperatorWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4454 + # source://prism/lib/prism/node.rb#4491 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism/lib/prism/node.rb#4477 + # source://prism/lib/prism/node.rb#4514 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6017,7 +7078,7 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#4498 + # source://prism/lib/prism/node.rb#4535 sig { override.returns(String) } def inspect; end @@ -6035,24 +7096,26 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # attr_reader target: ConstantPathNode # - # source://prism/lib/prism/node.rb#4482 + # source://prism/lib/prism/node.rb#4519 + sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#4503 + # source://prism/lib/prism/node.rb#4540 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#4492 + # source://prism/lib/prism/node.rb#4529 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#4508 + # source://prism/lib/prism/node.rb#4545 def type; end end end @@ -6062,55 +7125,82 @@ end # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#4527 +# source://prism/lib/prism/node.rb#4564 class Prism::ConstantPathOrWriteNode < ::Prism::Node # Initialize a new ConstantPathOrWriteNode node. # # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode # - # source://prism/lib/prism/node.rb#4529 + # source://prism/lib/prism/node.rb#4566 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, target, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#4607 + # source://prism/lib/prism/node.rb#4644 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#4540 + # source://prism/lib/prism/node.rb#4577 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4545 + # source://prism/lib/prism/node.rb#4582 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#4555 + # source://prism/lib/prism/node.rb#4592 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#4550 + # source://prism/lib/prism/node.rb#4587 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathOrWriteNode # - # source://prism/lib/prism/node.rb#4560 + # source://prism/lib/prism/node.rb#4597 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathOrWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4545 + # source://prism/lib/prism/node.rb#4582 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#4568 + # source://prism/lib/prism/node.rb#4605 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6118,40 +7208,44 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#4591 + # source://prism/lib/prism/node.rb#4628 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#4586 + # source://prism/lib/prism/node.rb#4623 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#4576 + # source://prism/lib/prism/node.rb#4613 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism/lib/prism/node.rb#4573 + # source://prism/lib/prism/node.rb#4610 + sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#4596 + # source://prism/lib/prism/node.rb#4633 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#4583 + # source://prism/lib/prism/node.rb#4620 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#4601 + # source://prism/lib/prism/node.rb#4638 def type; end end end @@ -6161,24 +7255,37 @@ end # Foo::Foo, Bar::Bar = baz # ^^^^^^^^ ^^^^^^^^ # -# source://prism/lib/prism/node.rb#4619 +# source://prism/lib/prism/node.rb#4656 class Prism::ConstantPathTargetNode < ::Prism::Node # Initialize a new ConstantPathTargetNode node. # # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode # - # source://prism/lib/prism/node.rb#4621 + # source://prism/lib/prism/node.rb#4658 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#4709 + # source://prism/lib/prism/node.rb#4746 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#4633 + # source://prism/lib/prism/node.rb#4670 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # Previously, we had a child node on this class that contained either a @@ -6190,43 +7297,61 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4638 + # source://prism/lib/prism/node.rb#4675 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#4650 + # source://prism/lib/prism/node.rb#4687 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#4643 + # source://prism/lib/prism/node.rb#4680 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathTargetNode # - # source://prism/lib/prism/node.rb#4655 + # source://prism/lib/prism/node.rb#4692 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4638 + # source://prism/lib/prism/node.rb#4675 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } # - # source://prism/lib/prism/node.rb#4663 + # source://prism/lib/prism/node.rb#4700 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def delimiter: () -> String # - # source://prism/lib/prism/node.rb#4688 + # source://prism/lib/prism/node.rb#4725 + sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://prism/lib/prism/node.rb#4674 + # source://prism/lib/prism/node.rb#4711 + sig { returns(Prism::Location) } def delimiter_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6247,35 +7372,38 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#4693 + # source://prism/lib/prism/node.rb#4730 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism/lib/prism/node.rb#4671 + # source://prism/lib/prism/node.rb#4708 + sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#4681 + # source://prism/lib/prism/node.rb#4718 + sig { returns(Prism::Location) } def name_loc; end # attr_reader parent: Prism::node? # - # source://prism/lib/prism/node.rb#4668 + # source://prism/lib/prism/node.rb#4705 + sig { returns(T.nilable(Prism::Node)) } def parent; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#4698 + # source://prism/lib/prism/node.rb#4735 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#4703 + # source://prism/lib/prism/node.rb#4740 def type; end end end @@ -6291,55 +7419,82 @@ end # ::Foo::Bar = 1 # ^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#4728 +# source://prism/lib/prism/node.rb#4765 class Prism::ConstantPathWriteNode < ::Prism::Node # Initialize a new ConstantPathWriteNode node. # # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode # - # source://prism/lib/prism/node.rb#4730 + # source://prism/lib/prism/node.rb#4767 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, target, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#4820 + # source://prism/lib/prism/node.rb#4857 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#4741 + # source://prism/lib/prism/node.rb#4778 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4746 + # source://prism/lib/prism/node.rb#4783 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#4756 + # source://prism/lib/prism/node.rb#4793 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#4751 + # source://prism/lib/prism/node.rb#4788 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathWriteNode # - # source://prism/lib/prism/node.rb#4761 + # source://prism/lib/prism/node.rb#4798 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4746 + # source://prism/lib/prism/node.rb#4783 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#4769 + # source://prism/lib/prism/node.rb#4806 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6347,13 +7502,14 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#4804 + # source://prism/lib/prism/node.rb#4841 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#4799 + # source://prism/lib/prism/node.rb#4836 + sig { returns(String) } def operator; end # The location of the `=` operator. @@ -6361,7 +7517,8 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::ABC = 123 # ^ # - # source://prism/lib/prism/node.rb#4786 + # source://prism/lib/prism/node.rb#4823 + sig { returns(Prism::Location) } def operator_loc; end # A node representing the constant path being written to. @@ -6372,12 +7529,13 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::Foo = :abc # ^^^^^ # - # source://prism/lib/prism/node.rb#4780 + # source://prism/lib/prism/node.rb#4817 + sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#4809 + # source://prism/lib/prism/node.rb#4846 sig { override.returns(Symbol) } def type; end @@ -6386,13 +7544,14 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # FOO::BAR = :abc # ^^^^ # - # source://prism/lib/prism/node.rb#4796 + # source://prism/lib/prism/node.rb#4833 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#4814 + # source://prism/lib/prism/node.rb#4851 def type; end end end @@ -6402,55 +7561,70 @@ end # Foo # ^^^ # -# source://prism/lib/prism/node.rb#4832 +# source://prism/lib/prism/node.rb#4869 class Prism::ConstantReadNode < ::Prism::Node # Initialize a new ConstantReadNode node. # # @return [ConstantReadNode] a new instance of ConstantReadNode # - # source://prism/lib/prism/node.rb#4834 + # source://prism/lib/prism/node.rb#4871 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#4899 + # source://prism/lib/prism/node.rb#4936 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#4843 + # source://prism/lib/prism/node.rb#4880 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4848 + # source://prism/lib/prism/node.rb#4885 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#4858 + # source://prism/lib/prism/node.rb#4895 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#4853 + # source://prism/lib/prism/node.rb#4890 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantReadNode # - # source://prism/lib/prism/node.rb#4863 + # source://prism/lib/prism/node.rb#4900 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4848 + # source://prism/lib/prism/node.rb#4885 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism/lib/prism/node.rb#4871 + # source://prism/lib/prism/node.rb#4908 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6471,7 +7645,7 @@ class Prism::ConstantReadNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#4883 + # source://prism/lib/prism/node.rb#4920 sig { override.returns(String) } def inspect; end @@ -6481,19 +7655,20 @@ class Prism::ConstantReadNode < ::Prism::Node # # SOME_CONSTANT # name `:SOME_CONSTANT` # - # source://prism/lib/prism/node.rb#4880 + # source://prism/lib/prism/node.rb#4917 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#4888 + # source://prism/lib/prism/node.rb#4925 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#4893 + # source://prism/lib/prism/node.rb#4930 def type; end end end @@ -6503,55 +7678,70 @@ end # Foo, Bar = baz # ^^^ ^^^ # -# source://prism/lib/prism/node.rb#4909 +# source://prism/lib/prism/node.rb#4946 class Prism::ConstantTargetNode < ::Prism::Node # Initialize a new ConstantTargetNode node. # # @return [ConstantTargetNode] a new instance of ConstantTargetNode # - # source://prism/lib/prism/node.rb#4911 + # source://prism/lib/prism/node.rb#4948 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#4972 + # source://prism/lib/prism/node.rb#5009 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#4920 + # source://prism/lib/prism/node.rb#4957 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4925 + # source://prism/lib/prism/node.rb#4962 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#4935 + # source://prism/lib/prism/node.rb#4972 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#4930 + # source://prism/lib/prism/node.rb#4967 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantTargetNode # - # source://prism/lib/prism/node.rb#4940 + # source://prism/lib/prism/node.rb#4977 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#4925 + # source://prism/lib/prism/node.rb#4962 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism/lib/prism/node.rb#4948 + # source://prism/lib/prism/node.rb#4985 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6572,25 +7762,26 @@ class Prism::ConstantTargetNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#4956 + # source://prism/lib/prism/node.rb#4993 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#4953 + # source://prism/lib/prism/node.rb#4990 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#4961 + # source://prism/lib/prism/node.rb#4998 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#4966 + # source://prism/lib/prism/node.rb#5003 def type; end end end @@ -6600,55 +7791,84 @@ end # Foo = 1 # ^^^^^^^ # -# source://prism/lib/prism/node.rb#4982 +# source://prism/lib/prism/node.rb#5019 class Prism::ConstantWriteNode < ::Prism::Node # Initialize a new ConstantWriteNode node. # # @return [ConstantWriteNode] a new instance of ConstantWriteNode # - # source://prism/lib/prism/node.rb#4984 + # source://prism/lib/prism/node.rb#5021 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#5086 + # source://prism/lib/prism/node.rb#5123 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#4996 + # source://prism/lib/prism/node.rb#5033 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5001 + # source://prism/lib/prism/node.rb#5038 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#5011 + # source://prism/lib/prism/node.rb#5048 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#5006 + # source://prism/lib/prism/node.rb#5043 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ConstantWriteNode # - # source://prism/lib/prism/node.rb#5016 + # source://prism/lib/prism/node.rb#5053 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ConstantWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5001 + # source://prism/lib/prism/node.rb#5038 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism/lib/prism/node.rb#5024 + # source://prism/lib/prism/node.rb#5061 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6669,7 +7889,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#5070 + # source://prism/lib/prism/node.rb#5107 sig { override.returns(String) } def inspect; end @@ -6679,7 +7899,8 @@ class Prism::ConstantWriteNode < ::Prism::Node # # XYZ = 1 # name `:XYZ` # - # source://prism/lib/prism/node.rb#5033 + # source://prism/lib/prism/node.rb#5070 + sig { returns(Symbol) } def name; end # The location of the constant name. @@ -6687,12 +7908,14 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = 1 # ^^^ # - # source://prism/lib/prism/node.rb#5039 + # source://prism/lib/prism/node.rb#5076 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#5065 + # source://prism/lib/prism/node.rb#5102 + sig { returns(String) } def operator; end # The location of the `=` operator. @@ -6700,12 +7923,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = :bar # ^ # - # source://prism/lib/prism/node.rb#5058 + # source://prism/lib/prism/node.rb#5095 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#5075 + # source://prism/lib/prism/node.rb#5112 sig { override.returns(Symbol) } def type; end @@ -6717,13 +7941,14 @@ class Prism::ConstantWriteNode < ::Prism::Node # MyClass = Class.new # ^^^^^^^^^ # - # source://prism/lib/prism/node.rb#5052 + # source://prism/lib/prism/node.rb#5089 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#5080 + # source://prism/lib/prism/node.rb#5117 def type; end end end @@ -6886,7 +8111,7 @@ module Prism::DSL # Retrieve the value of one of the ArrayNodeFlags flags. # - # source://prism/lib/prism/dsl.rb#842 + # source://prism/lib/prism/dsl.rb#844 sig { params(name: Symbol).returns(Integer) } def array_node_flag(name); end @@ -6899,7 +8124,7 @@ module Prism::DSL node_id: Integer, location: Prism::Location, flags: Integer, - constant: T.nilable(Prism::Node), + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), requireds: T::Array[Prism::Node], rest: T.nilable(Prism::Node), posts: T::Array[Prism::Node], @@ -7104,14 +8329,14 @@ module Prism::DSL opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node) + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).returns(Prism::CallNode) end def call_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end # Retrieve the value of one of the CallNodeFlags flags. # - # source://prism/lib/prism/dsl.rb#850 + # source://prism/lib/prism/dsl.rb#852 sig { params(name: Symbol).returns(Integer) } def call_node_flag(name); end @@ -7183,7 +8408,7 @@ module Prism::DSL location: Prism::Location, flags: Integer, value: Prism::Node, - target: Prism::Node, + target: Prism::LocalVariableTargetNode, operator_loc: Prism::Location ).returns(Prism::CapturePatternNode) end @@ -7199,7 +8424,7 @@ module Prism::DSL location: Prism::Location, flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], + conditions: T::Array[Prism::InNode], else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, end_keyword_loc: Prism::Location @@ -7217,7 +8442,7 @@ module Prism::DSL location: Prism::Location, flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], + conditions: T::Array[Prism::WhenNode], else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, end_keyword_loc: Prism::Location @@ -7236,10 +8461,10 @@ module Prism::DSL flags: Integer, locals: T::Array[Symbol], class_keyword_loc: Prism::Location, - constant_path: Prism::Node, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), inheritance_operator_loc: T.nilable(Prism::Location), superclass: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, name: Symbol ).returns(Prism::ClassNode) @@ -7552,7 +8777,7 @@ module Prism::DSL name_loc: Prism::Location, receiver: T.nilable(Prism::Node), parameters: T.nilable(Prism::ParametersNode), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), locals: T::Array[Symbol], def_keyword_loc: Prism::Location, operator_loc: T.nilable(Prism::Location), @@ -7623,14 +8848,14 @@ module Prism::DSL location: Prism::Location, flags: Integer, operator_loc: Prism::Location, - variable: Prism::Node + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) ).returns(Prism::EmbeddedVariableNode) end def embedded_variable_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end # Retrieve the value of one of the EncodingFlags flags. # - # source://prism/lib/prism/dsl.rb#861 + # source://prism/lib/prism/dsl.rb#863 sig { params(name: Symbol).returns(Integer) } def encoding_flag(name); end @@ -7672,10 +8897,10 @@ module Prism::DSL node_id: Integer, location: Prism::Location, flags: Integer, - constant: T.nilable(Prism::Node), - left: Prism::Node, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, requireds: T::Array[Prism::Node], - right: Prism::Node, + right: T.any(Prism::SplatNode, Prism::MissingNode), opening_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location) ).returns(Prism::FindPatternNode) @@ -7721,7 +8946,7 @@ module Prism::DSL node_id: Integer, location: Prism::Location, flags: Integer, - index: Prism::Node, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), collection: Prism::Node, statements: T.nilable(Prism::StatementsNode), for_keyword_loc: Prism::Location, @@ -7894,7 +9119,7 @@ module Prism::DSL node_id: Integer, location: Prism::Location, flags: Integer, - constant: T.nilable(Prism::Node), + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), elements: T::Array[Prism::AssocNode], rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), opening_loc: T.nilable(Prism::Location), @@ -7945,7 +9170,7 @@ module Prism::DSL node_id: Integer, location: Prism::Location, flags: Integer, - value: Prism::Node + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) ).returns(Prism::ImplicitNode) end def implicit_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end @@ -7994,7 +9219,7 @@ module Prism::DSL opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, value: Prism::Node ).returns(Prism::IndexAndWriteNode) @@ -8015,7 +9240,7 @@ module Prism::DSL opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), binary_operator: Symbol, binary_operator_loc: Prism::Location, value: Prism::Node @@ -8037,7 +9262,7 @@ module Prism::DSL opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, value: Prism::Node ).returns(Prism::IndexOrWriteNode) @@ -8057,7 +9282,7 @@ module Prism::DSL opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node) + block: T.nilable(Prism::BlockArgumentNode) ).returns(Prism::IndexTargetNode) end def index_target_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end @@ -8161,7 +9386,7 @@ module Prism::DSL # Retrieve the value of one of the IntegerBaseFlags flags. # - # source://prism/lib/prism/dsl.rb#870 + # source://prism/lib/prism/dsl.rb#872 sig { params(name: Symbol).returns(Integer) } def integer_base_flag(name); end @@ -8229,7 +9454,7 @@ module Prism::DSL # Retrieve the value of one of the InterpolatedStringNodeFlags flags. # - # source://prism/lib/prism/dsl.rb#881 + # source://prism/lib/prism/dsl.rb#883 sig { params(name: Symbol).returns(Integer) } def interpolated_string_node_flag(name); end @@ -8307,7 +9532,7 @@ module Prism::DSL # Retrieve the value of one of the KeywordHashNodeFlags flags. # - # source://prism/lib/prism/dsl.rb#890 + # source://prism/lib/prism/dsl.rb#892 sig { params(name: Symbol).returns(Integer) } def keyword_hash_node_flag(name); end @@ -8340,8 +9565,8 @@ module Prism::DSL operator_loc: Prism::Location, opening_loc: Prism::Location, closing_loc: Prism::Location, - parameters: T.nilable(Prism::Node), - body: T.nilable(Prism::Node) + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) ).returns(Prism::LambdaNode) end def lambda_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end @@ -8457,7 +9682,7 @@ module Prism::DSL # Retrieve the value of one of the LoopFlags flags. # - # source://prism/lib/prism/dsl.rb#898 + # source://prism/lib/prism/dsl.rb#900 sig { params(name: Symbol).returns(Integer) } def loop_flag(name); end @@ -8549,8 +9774,8 @@ module Prism::DSL flags: Integer, locals: T::Array[Symbol], module_keyword_loc: Prism::Location, - constant_path: Prism::Node, - body: T.nilable(Prism::Node), + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, name: Symbol ).returns(Prism::ModuleNode) @@ -8568,7 +9793,7 @@ module Prism::DSL flags: Integer, lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), - rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode)], + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location) ).returns(Prism::MultiTargetNode) @@ -8584,9 +9809,9 @@ module Prism::DSL node_id: Integer, location: Prism::Location, flags: Integer, - lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), - rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), operator_loc: Prism::Location, @@ -8717,7 +9942,7 @@ module Prism::DSL # Retrieve the value of one of the ParameterFlags flags. # - # source://prism/lib/prism/dsl.rb#906 + # source://prism/lib/prism/dsl.rb#908 sig { params(name: Symbol).returns(Integer) } def parameter_flag(name); end @@ -8783,7 +10008,7 @@ module Prism::DSL node_id: Integer, location: Prism::Location, flags: Integer, - variable: Prism::Node, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), operator_loc: Prism::Location ).returns(Prism::PinnedVariableNode) end @@ -8840,7 +10065,7 @@ module Prism::DSL # Retrieve the value of one of the RangeFlags flags. # - # source://prism/lib/prism/dsl.rb#914 + # source://prism/lib/prism/dsl.rb#916 sig { params(name: Symbol).returns(Integer) } def range_flag(name); end @@ -8890,7 +10115,7 @@ module Prism::DSL # Retrieve the value of one of the RegularExpressionFlags flags. # - # source://prism/lib/prism/dsl.rb#922 + # source://prism/lib/prism/dsl.rb#924 sig { params(name: Symbol).returns(Integer) } def regular_expression_flag(name); end @@ -8968,7 +10193,7 @@ module Prism::DSL keyword_loc: Prism::Location, exceptions: T::Array[Prism::Node], operator_loc: T.nilable(Prism::Location), - reference: T.nilable(Prism::Node), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), statements: T.nilable(Prism::StatementsNode), subsequent: T.nilable(Prism::RescueNode) ).returns(Prism::RescueNode) @@ -9048,7 +10273,7 @@ module Prism::DSL # Retrieve the value of one of the ShareableConstantNodeFlags flags. # - # source://prism/lib/prism/dsl.rb#940 + # source://prism/lib/prism/dsl.rb#942 sig { params(name: Symbol).returns(Integer) } def shareable_constant_node_flag(name); end @@ -9065,7 +10290,7 @@ module Prism::DSL class_keyword_loc: Prism::Location, operator_loc: Prism::Location, expression: Prism::Node, - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location ).returns(Prism::SingletonClassNode) end @@ -9148,7 +10373,7 @@ module Prism::DSL # Retrieve the value of one of the StringFlags flags. # - # source://prism/lib/prism/dsl.rb#950 + # source://prism/lib/prism/dsl.rb#952 sig { params(name: Symbol).returns(Integer) } def string_flag(name); end @@ -9182,14 +10407,14 @@ module Prism::DSL lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), rparen_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node) + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).returns(Prism::SuperNode) end def super_node(source: T.unsafe(nil), node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end # Retrieve the value of one of the SymbolFlags flags. # - # source://prism/lib/prism/dsl.rb#961 + # source://prism/lib/prism/dsl.rb#963 sig { params(name: Symbol).returns(Integer) } def symbol_flag(name); end @@ -9347,21 +10572,21 @@ module Prism::DSL # The default location object that gets attached to nodes if no location is # specified, which uses the given source. # - # source://prism/lib/prism/dsl.rb#980 + # source://prism/lib/prism/dsl.rb#982 sig { returns(Prism::Location) } def default_location; end # The default node that gets attached to nodes if no node is specified for a # required node field. # - # source://prism/lib/prism/dsl.rb#986 + # source://prism/lib/prism/dsl.rb#988 sig { params(source: Prism::Source, location: Prism::Location).returns(Prism::Node) } def default_node(source, location); end # The default source object that gets attached to nodes and locations if no # source is specified. # - # source://prism/lib/prism/dsl.rb#974 + # source://prism/lib/prism/dsl.rb#976 sig { returns(Prism::Source) } def default_source; end end @@ -9372,90 +10597,142 @@ end # end # ^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#5100 +# source://prism/lib/prism/node.rb#5137 class Prism::DefNode < ::Prism::Node # Initialize a new DefNode node. # # @return [DefNode] a new instance of DefNode # - # source://prism/lib/prism/node.rb#5102 + # source://prism/lib/prism/node.rb#5139 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#5299 + # source://prism/lib/prism/node.rb#5336 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#5122 + # source://prism/lib/prism/node.rb#5159 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism/lib/prism/node.rb#5175 + # source://prism/lib/prism/node.rb#5212 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5127 + # source://prism/lib/prism/node.rb#5164 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#5141 + # source://prism/lib/prism/node.rb#5178 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#5132 + # source://prism/lib/prism/node.rb#5169 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: Prism::node?, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?) -> DefNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: StatementsNode | BeginNode | nil, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?) -> DefNode # - # source://prism/lib/prism/node.rb#5146 + # source://prism/lib/prism/node.rb#5183 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::DefNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5127 + # source://prism/lib/prism/node.rb#5164 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: Prism::node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: StatementsNode | BeginNode | nil, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location? } # - # source://prism/lib/prism/node.rb#5154 + # source://prism/lib/prism/node.rb#5191 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def def_keyword: () -> String # - # source://prism/lib/prism/node.rb#5253 + # source://prism/lib/prism/node.rb#5290 + sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # - # source://prism/lib/prism/node.rb#5181 + # source://prism/lib/prism/node.rb#5218 + sig { returns(Prism::Location) } def def_keyword_loc; end # def end_keyword: () -> String? # - # source://prism/lib/prism/node.rb#5278 + # source://prism/lib/prism/node.rb#5315 + sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism/lib/prism/node.rb#5240 + # source://prism/lib/prism/node.rb#5277 + sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # - # source://prism/lib/prism/node.rb#5273 + # source://prism/lib/prism/node.rb#5310 + sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # - # source://prism/lib/prism/node.rb#5227 + # source://prism/lib/prism/node.rb#5264 + sig { returns(T.nilable(Prism::Location)) } def equal_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -9463,75 +10740,86 @@ class Prism::DefNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#5283 + # source://prism/lib/prism/node.rb#5320 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism/lib/prism/node.rb#5178 + # source://prism/lib/prism/node.rb#5215 + sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # - # source://prism/lib/prism/node.rb#5263 + # source://prism/lib/prism/node.rb#5300 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism/lib/prism/node.rb#5201 + # source://prism/lib/prism/node.rb#5238 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#5159 + # source://prism/lib/prism/node.rb#5196 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#5162 + # source://prism/lib/prism/node.rb#5199 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # - # source://prism/lib/prism/node.rb#5258 + # source://prism/lib/prism/node.rb#5295 + sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism/lib/prism/node.rb#5188 + # source://prism/lib/prism/node.rb#5225 + sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # - # source://prism/lib/prism/node.rb#5172 + # source://prism/lib/prism/node.rb#5209 + sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # attr_reader receiver: Prism::node? # - # source://prism/lib/prism/node.rb#5169 + # source://prism/lib/prism/node.rb#5206 + sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # - # source://prism/lib/prism/node.rb#5268 + # source://prism/lib/prism/node.rb#5305 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism/lib/prism/node.rb#5214 + # source://prism/lib/prism/node.rb#5251 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#5288 + # source://prism/lib/prism/node.rb#5325 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#5293 + # source://prism/lib/prism/node.rb#5330 def type; end end end @@ -9541,55 +10829,84 @@ end # defined?(a) # ^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#5321 +# source://prism/lib/prism/node.rb#5358 class Prism::DefinedNode < ::Prism::Node # Initialize a new DefinedNode node. # # @return [DefinedNode] a new instance of DefinedNode # - # source://prism/lib/prism/node.rb#5323 + # source://prism/lib/prism/node.rb#5360 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, lparen_loc, value, rparen_loc, keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#5435 + # source://prism/lib/prism/node.rb#5472 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#5335 + # source://prism/lib/prism/node.rb#5372 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5340 + # source://prism/lib/prism/node.rb#5377 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#5350 + # source://prism/lib/prism/node.rb#5387 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#5345 + # source://prism/lib/prism/node.rb#5382 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location) -> DefinedNode # - # source://prism/lib/prism/node.rb#5355 + # source://prism/lib/prism/node.rb#5392 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).returns(Prism::DefinedNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5340 + # source://prism/lib/prism/node.rb#5377 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location } # - # source://prism/lib/prism/node.rb#5363 + # source://prism/lib/prism/node.rb#5400 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -9597,55 +10914,62 @@ class Prism::DefinedNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#5419 + # source://prism/lib/prism/node.rb#5456 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#5414 + # source://prism/lib/prism/node.rb#5451 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#5397 + # source://prism/lib/prism/node.rb#5434 + sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism/lib/prism/node.rb#5404 + # source://prism/lib/prism/node.rb#5441 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism/lib/prism/node.rb#5368 + # source://prism/lib/prism/node.rb#5405 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism/lib/prism/node.rb#5409 + # source://prism/lib/prism/node.rb#5446 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism/lib/prism/node.rb#5384 + # source://prism/lib/prism/node.rb#5421 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#5424 + # source://prism/lib/prism/node.rb#5461 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#5381 + # source://prism/lib/prism/node.rb#5418 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#5429 + # source://prism/lib/prism/node.rb#5466 def type; end end end @@ -12469,37 +13793,37 @@ class Prism::DotVisitor < ::Prism::Visitor # Inspect a node that has array_node_flags flags to display the flags as a # comma-separated list. # - # source://prism/lib/prism/dot_visitor.rb#4603 + # source://prism/lib/prism/dot_visitor.rb#4605 def array_node_flags_inspect(node); end # Inspect a node that has call_node_flags flags to display the flags as a # comma-separated list. # - # source://prism/lib/prism/dot_visitor.rb#4611 + # source://prism/lib/prism/dot_visitor.rb#4613 def call_node_flags_inspect(node); end # Inspect a node that has encoding_flags flags to display the flags as a # comma-separated list. # - # source://prism/lib/prism/dot_visitor.rb#4622 + # source://prism/lib/prism/dot_visitor.rb#4624 def encoding_flags_inspect(node); end # Inspect a node that has integer_base_flags flags to display the flags as a # comma-separated list. # - # source://prism/lib/prism/dot_visitor.rb#4631 + # source://prism/lib/prism/dot_visitor.rb#4633 def integer_base_flags_inspect(node); end # Inspect a node that has interpolated_string_node_flags flags to display the flags as a # comma-separated list. # - # source://prism/lib/prism/dot_visitor.rb#4642 + # source://prism/lib/prism/dot_visitor.rb#4644 def interpolated_string_node_flags_inspect(node); end # Inspect a node that has keyword_hash_node_flags flags to display the flags as a # comma-separated list. # - # source://prism/lib/prism/dot_visitor.rb#4651 + # source://prism/lib/prism/dot_visitor.rb#4653 def keyword_hash_node_flags_inspect(node); end # Inspect a location to display the start and end line and column numbers. @@ -12510,7 +13834,7 @@ class Prism::DotVisitor < ::Prism::Visitor # Inspect a node that has loop_flags flags to display the flags as a # comma-separated list. # - # source://prism/lib/prism/dot_visitor.rb#4659 + # source://prism/lib/prism/dot_visitor.rb#4661 def loop_flags_inspect(node); end # Generate a unique node ID for a node throughout the digraph. @@ -12521,37 +13845,37 @@ class Prism::DotVisitor < ::Prism::Visitor # Inspect a node that has parameter_flags flags to display the flags as a # comma-separated list. # - # source://prism/lib/prism/dot_visitor.rb#4667 + # source://prism/lib/prism/dot_visitor.rb#4669 def parameter_flags_inspect(node); end # Inspect a node that has range_flags flags to display the flags as a # comma-separated list. # - # source://prism/lib/prism/dot_visitor.rb#4675 + # source://prism/lib/prism/dot_visitor.rb#4677 def range_flags_inspect(node); end # Inspect a node that has regular_expression_flags flags to display the flags as a # comma-separated list. # - # source://prism/lib/prism/dot_visitor.rb#4683 + # source://prism/lib/prism/dot_visitor.rb#4685 def regular_expression_flags_inspect(node); end # Inspect a node that has shareable_constant_node_flags flags to display the flags as a # comma-separated list. # - # source://prism/lib/prism/dot_visitor.rb#4701 + # source://prism/lib/prism/dot_visitor.rb#4703 def shareable_constant_node_flags_inspect(node); end # Inspect a node that has string_flags flags to display the flags as a # comma-separated list. # - # source://prism/lib/prism/dot_visitor.rb#4711 + # source://prism/lib/prism/dot_visitor.rb#4713 def string_flags_inspect(node); end # Inspect a node that has symbol_flags flags to display the flags as a # comma-separated list. # - # source://prism/lib/prism/dot_visitor.rb#4722 + # source://prism/lib/prism/dot_visitor.rb#4724 def symbol_flags_inspect(node); end end @@ -12645,75 +13969,106 @@ end # if a then b else c end # ^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#5448 +# source://prism/lib/prism/node.rb#5485 class Prism::ElseNode < ::Prism::Node # Initialize a new ElseNode node. # # @return [ElseNode] a new instance of ElseNode # - # source://prism/lib/prism/node.rb#5450 + # source://prism/lib/prism/node.rb#5487 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, else_keyword_loc, statements, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#5545 + # source://prism/lib/prism/node.rb#5582 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#5461 + # source://prism/lib/prism/node.rb#5498 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5466 + # source://prism/lib/prism/node.rb#5503 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#5478 + # source://prism/lib/prism/node.rb#5515 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#5471 + # source://prism/lib/prism/node.rb#5508 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?) -> ElseNode # - # source://prism/lib/prism/node.rb#5483 + # source://prism/lib/prism/node.rb#5520 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::ElseNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5466 + # source://prism/lib/prism/node.rb#5503 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location? } # - # source://prism/lib/prism/node.rb#5491 + # source://prism/lib/prism/node.rb#5528 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def else_keyword: () -> String # - # source://prism/lib/prism/node.rb#5519 + # source://prism/lib/prism/node.rb#5556 + sig { returns(String) } def else_keyword; end # attr_reader else_keyword_loc: Location # - # source://prism/lib/prism/node.rb#5496 + # source://prism/lib/prism/node.rb#5533 + sig { returns(Prism::Location) } def else_keyword_loc; end # def end_keyword: () -> String? # - # source://prism/lib/prism/node.rb#5524 + # source://prism/lib/prism/node.rb#5561 + sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism/lib/prism/node.rb#5506 + # source://prism/lib/prism/node.rb#5543 + sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -12721,25 +14076,26 @@ class Prism::ElseNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#5529 + # source://prism/lib/prism/node.rb#5566 sig { override.returns(String) } def inspect; end # attr_reader statements: StatementsNode? # - # source://prism/lib/prism/node.rb#5503 + # source://prism/lib/prism/node.rb#5540 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#5534 + # source://prism/lib/prism/node.rb#5571 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#5539 + # source://prism/lib/prism/node.rb#5576 def type; end end end @@ -12747,11 +14103,11 @@ end # EmbDocComment objects correspond to comments that are surrounded by =begin # and =end. # -# source://prism/lib/prism/parse_result.rb#412 +# source://prism/lib/prism/parse_result.rb#544 class Prism::EmbDocComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism/lib/prism/parse_result.rb#419 + # source://prism/lib/prism/parse_result.rb#551 sig { returns(String) } def inspect; end @@ -12759,7 +14115,7 @@ class Prism::EmbDocComment < ::Prism::Comment # # @return [Boolean] # - # source://prism/lib/prism/parse_result.rb#414 + # source://prism/lib/prism/parse_result.rb#546 sig { override.returns(T::Boolean) } def trailing?; end end @@ -12769,65 +14125,94 @@ end # "foo #{bar}" # ^^^^^^ # -# source://prism/lib/prism/node.rb#5557 +# source://prism/lib/prism/node.rb#5594 class Prism::EmbeddedStatementsNode < ::Prism::Node # Initialize a new EmbeddedStatementsNode node. # # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode # - # source://prism/lib/prism/node.rb#5559 + # source://prism/lib/prism/node.rb#5596 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, opening_loc, statements, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#5648 + # source://prism/lib/prism/node.rb#5685 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#5570 + # source://prism/lib/prism/node.rb#5607 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5575 + # source://prism/lib/prism/node.rb#5612 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#5627 + # source://prism/lib/prism/node.rb#5664 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#5615 + # source://prism/lib/prism/node.rb#5652 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#5587 + # source://prism/lib/prism/node.rb#5624 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#5580 + # source://prism/lib/prism/node.rb#5617 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location) -> EmbeddedStatementsNode # - # source://prism/lib/prism/node.rb#5592 + # source://prism/lib/prism/node.rb#5629 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5575 + # source://prism/lib/prism/node.rb#5612 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, statements: StatementsNode?, closing_loc: Location } # - # source://prism/lib/prism/node.rb#5600 + # source://prism/lib/prism/node.rb#5637 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -12835,35 +14220,38 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#5632 + # source://prism/lib/prism/node.rb#5669 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#5622 + # source://prism/lib/prism/node.rb#5659 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#5605 + # source://prism/lib/prism/node.rb#5642 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism/lib/prism/node.rb#5612 + # source://prism/lib/prism/node.rb#5649 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#5637 + # source://prism/lib/prism/node.rb#5674 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#5642 + # source://prism/lib/prism/node.rb#5679 def type; end end end @@ -12873,55 +14261,80 @@ end # "foo #@bar" # ^^^^^ # -# source://prism/lib/prism/node.rb#5660 +# source://prism/lib/prism/node.rb#5697 class Prism::EmbeddedVariableNode < ::Prism::Node # Initialize a new EmbeddedVariableNode node. # # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode # - # source://prism/lib/prism/node.rb#5662 + # source://prism/lib/prism/node.rb#5699 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).void + end def initialize(source, node_id, location, flags, operator_loc, variable); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#5736 + # source://prism/lib/prism/node.rb#5773 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#5672 + # source://prism/lib/prism/node.rb#5709 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5677 + # source://prism/lib/prism/node.rb#5714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#5687 + # source://prism/lib/prism/node.rb#5724 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#5682 + # source://prism/lib/prism/node.rb#5719 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable: Prism::node) -> EmbeddedVariableNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode) -> EmbeddedVariableNode # - # source://prism/lib/prism/node.rb#5692 + # source://prism/lib/prism/node.rb#5729 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).returns(Prism::EmbeddedVariableNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5677 + # source://prism/lib/prism/node.rb#5714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: Prism::node } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode } # - # source://prism/lib/prism/node.rb#5700 + # source://prism/lib/prism/node.rb#5737 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -12929,52 +14342,57 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#5720 + # source://prism/lib/prism/node.rb#5757 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#5715 + # source://prism/lib/prism/node.rb#5752 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#5705 + # source://prism/lib/prism/node.rb#5742 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#5725 + # source://prism/lib/prism/node.rb#5762 sig { override.returns(Symbol) } def type; end - # attr_reader variable: Prism::node + # attr_reader variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode # - # source://prism/lib/prism/node.rb#5712 + # source://prism/lib/prism/node.rb#5749 + sig do + returns(T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) + end def variable; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#5730 + # source://prism/lib/prism/node.rb#5767 def type; end end end # Flags for nodes that have unescaped content. # -# source://prism/lib/prism/node.rb#16680 +# source://prism/lib/prism/node.rb#16723 module Prism::EncodingFlags; end # internal bytes forced the encoding to binary # -# source://prism/lib/prism/node.rb#16685 +# source://prism/lib/prism/node.rb#16728 Prism::EncodingFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism/lib/prism/node.rb#16682 +# source://prism/lib/prism/node.rb#16725 Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents an `ensure` clause in a `begin` statement. @@ -12986,75 +14404,106 @@ Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # bar # end # -# source://prism/lib/prism/node.rb#5751 +# source://prism/lib/prism/node.rb#5788 class Prism::EnsureNode < ::Prism::Node # Initialize a new EnsureNode node. # # @return [EnsureNode] a new instance of EnsureNode # - # source://prism/lib/prism/node.rb#5753 + # source://prism/lib/prism/node.rb#5790 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, ensure_keyword_loc, statements, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#5842 + # source://prism/lib/prism/node.rb#5879 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#5764 + # source://prism/lib/prism/node.rb#5801 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5769 + # source://prism/lib/prism/node.rb#5806 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#5781 + # source://prism/lib/prism/node.rb#5818 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#5774 + # source://prism/lib/prism/node.rb#5811 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location) -> EnsureNode # - # source://prism/lib/prism/node.rb#5786 + # source://prism/lib/prism/node.rb#5823 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).returns(Prism::EnsureNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5769 + # source://prism/lib/prism/node.rb#5806 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location } # - # source://prism/lib/prism/node.rb#5794 + # source://prism/lib/prism/node.rb#5831 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism/lib/prism/node.rb#5821 + # source://prism/lib/prism/node.rb#5858 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism/lib/prism/node.rb#5809 + # source://prism/lib/prism/node.rb#5846 + sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # - # source://prism/lib/prism/node.rb#5816 + # source://prism/lib/prism/node.rb#5853 + sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # - # source://prism/lib/prism/node.rb#5799 + # source://prism/lib/prism/node.rb#5836 + sig { returns(Prism::Location) } def ensure_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13062,25 +14511,26 @@ class Prism::EnsureNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#5826 + # source://prism/lib/prism/node.rb#5863 sig { override.returns(String) } def inspect; end # attr_reader statements: StatementsNode? # - # source://prism/lib/prism/node.rb#5806 + # source://prism/lib/prism/node.rb#5843 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#5831 + # source://prism/lib/prism/node.rb#5868 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#5836 + # source://prism/lib/prism/node.rb#5873 def type; end end end @@ -13090,55 +14540,63 @@ end # false # ^^^^^ # -# source://prism/lib/prism/node.rb#5854 +# source://prism/lib/prism/node.rb#5891 class Prism::FalseNode < ::Prism::Node # Initialize a new FalseNode node. # # @return [FalseNode] a new instance of FalseNode # - # source://prism/lib/prism/node.rb#5856 + # source://prism/lib/prism/node.rb#5893 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#5913 + # source://prism/lib/prism/node.rb#5950 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#5864 + # source://prism/lib/prism/node.rb#5901 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5869 + # source://prism/lib/prism/node.rb#5906 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#5879 + # source://prism/lib/prism/node.rb#5916 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#5874 + # source://prism/lib/prism/node.rb#5911 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> FalseNode # - # source://prism/lib/prism/node.rb#5884 + # source://prism/lib/prism/node.rb#5921 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::FalseNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5869 + # source://prism/lib/prism/node.rb#5906 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#5892 + # source://prism/lib/prism/node.rb#5929 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13146,20 +14604,20 @@ class Prism::FalseNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#5897 + # source://prism/lib/prism/node.rb#5934 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#5902 + # source://prism/lib/prism/node.rb#5939 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#5907 + # source://prism/lib/prism/node.rb#5944 def type; end end end @@ -13175,70 +14633,106 @@ end # foo in Foo(*bar, baz, *qux) # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#5928 +# source://prism/lib/prism/node.rb#5965 class Prism::FindPatternNode < ::Prism::Node # Initialize a new FindPatternNode node. # # @return [FindPatternNode] a new instance of FindPatternNode # - # source://prism/lib/prism/node.rb#5930 + # source://prism/lib/prism/node.rb#5967 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, constant, left, requireds, right, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#6046 + # source://prism/lib/prism/node.rb#6083 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#5944 + # source://prism/lib/prism/node.rb#5981 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5949 + # source://prism/lib/prism/node.rb#5986 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism/lib/prism/node.rb#6025 + # source://prism/lib/prism/node.rb#6062 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism/lib/prism/node.rb#6007 + # source://prism/lib/prism/node.rb#6044 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#5964 + # source://prism/lib/prism/node.rb#6001 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#5954 + # source://prism/lib/prism/node.rb#5991 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Prism::node? + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil # - # source://prism/lib/prism/node.rb#5982 + # source://prism/lib/prism/node.rb#6019 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } def constant; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: Prism::node?, ?left: Prism::node, ?requireds: Array[Prism::node], ?right: Prism::node, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?left: SplatNode, ?requireds: Array[Prism::node], ?right: SplatNode | MissingNode, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode # - # source://prism/lib/prism/node.rb#5969 + # source://prism/lib/prism/node.rb#6006 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::FindPatternNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#5949 + # source://prism/lib/prism/node.rb#5986 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: Prism::node?, left: Prism::node, requireds: Array[Prism::node], right: Prism::node, opening_loc: Location?, closing_loc: Location? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, left: SplatNode, requireds: Array[Prism::node], right: SplatNode | MissingNode, opening_loc: Location?, closing_loc: Location? } # - # source://prism/lib/prism/node.rb#5977 + # source://prism/lib/prism/node.rb#6014 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13246,45 +14740,50 @@ class Prism::FindPatternNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#6030 + # source://prism/lib/prism/node.rb#6067 sig { override.returns(String) } def inspect; end - # attr_reader left: Prism::node + # attr_reader left: SplatNode # - # source://prism/lib/prism/node.rb#5985 + # source://prism/lib/prism/node.rb#6022 + sig { returns(Prism::SplatNode) } def left; end # def opening: () -> String? # - # source://prism/lib/prism/node.rb#6020 + # source://prism/lib/prism/node.rb#6057 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism/lib/prism/node.rb#5994 + # source://prism/lib/prism/node.rb#6031 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader requireds: Array[Prism::node] # - # source://prism/lib/prism/node.rb#5988 + # source://prism/lib/prism/node.rb#6025 + sig { returns(T::Array[Prism::Node]) } def requireds; end - # attr_reader right: Prism::node + # attr_reader right: SplatNode | MissingNode # - # source://prism/lib/prism/node.rb#5991 + # source://prism/lib/prism/node.rb#6028 + sig { returns(T.any(Prism::SplatNode, Prism::MissingNode)) } def right; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#6035 + # source://prism/lib/prism/node.rb#6072 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#6040 + # source://prism/lib/prism/node.rb#6077 def type; end end end @@ -13294,13 +14793,13 @@ end # baz if foo .. bar # ^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#6062 +# source://prism/lib/prism/node.rb#6099 class Prism::FlipFlopNode < ::Prism::Node # Initialize a new FlipFlopNode node. # # @return [FlipFlopNode] a new instance of FlipFlopNode # - # source://prism/lib/prism/node.rb#6064 + # source://prism/lib/prism/node.rb#6101 sig do params( source: Prism::Source, @@ -13317,36 +14816,36 @@ class Prism::FlipFlopNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#6150 + # source://prism/lib/prism/node.rb#6187 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#6075 + # source://prism/lib/prism/node.rb#6112 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6080 + # source://prism/lib/prism/node.rb#6117 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#6093 + # source://prism/lib/prism/node.rb#6130 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#6085 + # source://prism/lib/prism/node.rb#6122 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> FlipFlopNode # - # source://prism/lib/prism/node.rb#6098 + # source://prism/lib/prism/node.rb#6135 sig do params( node_id: Integer, @@ -13362,13 +14861,13 @@ class Prism::FlipFlopNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6080 + # source://prism/lib/prism/node.rb#6117 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } # - # source://prism/lib/prism/node.rb#6106 + # source://prism/lib/prism/node.rb#6143 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13376,7 +14875,7 @@ class Prism::FlipFlopNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#6111 + # source://prism/lib/prism/node.rb#6148 sig { returns(T::Boolean) } def exclude_end?; end @@ -13385,44 +14884,44 @@ class Prism::FlipFlopNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#6134 + # source://prism/lib/prism/node.rb#6171 sig { override.returns(String) } def inspect; end # attr_reader left: Prism::node? # - # source://prism/lib/prism/node.rb#6116 + # source://prism/lib/prism/node.rb#6153 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#6129 + # source://prism/lib/prism/node.rb#6166 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#6122 + # source://prism/lib/prism/node.rb#6159 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Prism::node? # - # source://prism/lib/prism/node.rb#6119 + # source://prism/lib/prism/node.rb#6156 sig { returns(T.nilable(Prism::Node)) } def right; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#6139 + # source://prism/lib/prism/node.rb#6176 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#6144 + # source://prism/lib/prism/node.rb#6181 def type; end end end @@ -13432,55 +14931,63 @@ end # 1.0 # ^^^ # -# source://prism/lib/prism/node.rb#6163 +# source://prism/lib/prism/node.rb#6200 class Prism::FloatNode < ::Prism::Node # Initialize a new FloatNode node. # # @return [FloatNode] a new instance of FloatNode # - # source://prism/lib/prism/node.rb#6165 + # source://prism/lib/prism/node.rb#6202 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, value: Float).void } def initialize(source, node_id, location, flags, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#6226 + # source://prism/lib/prism/node.rb#6263 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#6174 + # source://prism/lib/prism/node.rb#6211 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6179 + # source://prism/lib/prism/node.rb#6216 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#6189 + # source://prism/lib/prism/node.rb#6226 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#6184 + # source://prism/lib/prism/node.rb#6221 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Float) -> FloatNode # - # source://prism/lib/prism/node.rb#6194 + # source://prism/lib/prism/node.rb#6231 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer, value: Float).returns(Prism::FloatNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6179 + # source://prism/lib/prism/node.rb#6216 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float } # - # source://prism/lib/prism/node.rb#6202 + # source://prism/lib/prism/node.rb#6239 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13488,25 +14995,26 @@ class Prism::FloatNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#6210 + # source://prism/lib/prism/node.rb#6247 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#6215 + # source://prism/lib/prism/node.rb#6252 sig { override.returns(Symbol) } def type; end # The value of the floating point number as a Float. # - # source://prism/lib/prism/node.rb#6207 + # source://prism/lib/prism/node.rb#6244 + sig { returns(Float) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#6220 + # source://prism/lib/prism/node.rb#6257 def type; end end end @@ -13516,29 +15024,46 @@ end # for i in a end # ^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#6236 +# source://prism/lib/prism/node.rb#6273 class Prism::ForNode < ::Prism::Node # Initialize a new ForNode node. # # @return [ForNode] a new instance of ForNode # - # source://prism/lib/prism/node.rb#6238 + # source://prism/lib/prism/node.rb#6275 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#6392 + # source://prism/lib/prism/node.rb#6429 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#6253 + # source://prism/lib/prism/node.rb#6290 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6258 + # source://prism/lib/prism/node.rb#6295 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # The collection to iterate over. @@ -13546,38 +15071,58 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^ # - # source://prism/lib/prism/node.rb#6299 + # source://prism/lib/prism/node.rb#6336 + sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#6272 + # source://prism/lib/prism/node.rb#6309 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#6263 + # source://prism/lib/prism/node.rb#6300 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?index: Prism::node, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location) -> ForNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location) -> ForNode # - # source://prism/lib/prism/node.rb#6277 + # source://prism/lib/prism/node.rb#6314 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).returns(Prism::ForNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6258 + # source://prism/lib/prism/node.rb#6295 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index: Prism::node, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location } # - # source://prism/lib/prism/node.rb#6285 + # source://prism/lib/prism/node.rb#6322 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def do_keyword: () -> String? # - # source://prism/lib/prism/node.rb#6366 + # source://prism/lib/prism/node.rb#6403 + sig { returns(T.nilable(String)) } def do_keyword; end # The location of the `do` keyword, if present. @@ -13585,12 +15130,14 @@ class Prism::ForNode < ::Prism::Node # for i in a do end # ^^ # - # source://prism/lib/prism/node.rb#6333 + # source://prism/lib/prism/node.rb#6370 + sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def end_keyword: () -> String # - # source://prism/lib/prism/node.rb#6371 + # source://prism/lib/prism/node.rb#6408 + sig { returns(String) } def end_keyword; end # The location of the `end` keyword. @@ -13598,7 +15145,8 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^^ # - # source://prism/lib/prism/node.rb#6349 + # source://prism/lib/prism/node.rb#6386 + sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13606,7 +15154,8 @@ class Prism::ForNode < ::Prism::Node # def for_keyword: () -> String # - # source://prism/lib/prism/node.rb#6356 + # source://prism/lib/prism/node.rb#6393 + sig { returns(String) } def for_keyword; end # The location of the `for` keyword. @@ -13614,12 +15163,14 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^^ # - # source://prism/lib/prism/node.rb#6313 + # source://prism/lib/prism/node.rb#6350 + sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # - # source://prism/lib/prism/node.rb#6361 + # source://prism/lib/prism/node.rb#6398 + sig { returns(String) } def in_keyword; end # The location of the `in` keyword. @@ -13627,7 +15178,8 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^ # - # source://prism/lib/prism/node.rb#6323 + # source://prism/lib/prism/node.rb#6360 + sig { returns(Prism::Location) } def in_keyword_loc; end # The index expression for `for` loops. @@ -13635,12 +15187,15 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^ # - # source://prism/lib/prism/node.rb#6293 + # source://prism/lib/prism/node.rb#6330 + sig do + returns(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)) + end def index; end # def inspect -> String # - # source://prism/lib/prism/node.rb#6376 + # source://prism/lib/prism/node.rb#6413 sig { override.returns(String) } def inspect; end @@ -13651,19 +15206,20 @@ class Prism::ForNode < ::Prism::Node # ^^^^^^ # end # - # source://prism/lib/prism/node.rb#6307 + # source://prism/lib/prism/node.rb#6344 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#6381 + # source://prism/lib/prism/node.rb#6418 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#6386 + # source://prism/lib/prism/node.rb#6423 def type; end end end @@ -13675,55 +15231,63 @@ end # ^^^ # end # -# source://prism/lib/prism/node.rb#6410 +# source://prism/lib/prism/node.rb#6447 class Prism::ForwardingArgumentsNode < ::Prism::Node # Initialize a new ForwardingArgumentsNode node. # # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode # - # source://prism/lib/prism/node.rb#6412 + # source://prism/lib/prism/node.rb#6449 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#6469 + # source://prism/lib/prism/node.rb#6506 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#6420 + # source://prism/lib/prism/node.rb#6457 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6425 + # source://prism/lib/prism/node.rb#6462 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#6435 + # source://prism/lib/prism/node.rb#6472 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#6430 + # source://prism/lib/prism/node.rb#6467 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingArgumentsNode # - # source://prism/lib/prism/node.rb#6440 + # source://prism/lib/prism/node.rb#6477 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingArgumentsNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6425 + # source://prism/lib/prism/node.rb#6462 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#6448 + # source://prism/lib/prism/node.rb#6485 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13731,20 +15295,20 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#6453 + # source://prism/lib/prism/node.rb#6490 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#6458 + # source://prism/lib/prism/node.rb#6495 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#6463 + # source://prism/lib/prism/node.rb#6500 def type; end end end @@ -13755,55 +15319,63 @@ end # ^^^ # end # -# source://prism/lib/prism/node.rb#6479 +# source://prism/lib/prism/node.rb#6516 class Prism::ForwardingParameterNode < ::Prism::Node # Initialize a new ForwardingParameterNode node. # # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode # - # source://prism/lib/prism/node.rb#6481 + # source://prism/lib/prism/node.rb#6518 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#6538 + # source://prism/lib/prism/node.rb#6575 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#6489 + # source://prism/lib/prism/node.rb#6526 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6494 + # source://prism/lib/prism/node.rb#6531 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#6504 + # source://prism/lib/prism/node.rb#6541 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#6499 + # source://prism/lib/prism/node.rb#6536 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingParameterNode # - # source://prism/lib/prism/node.rb#6509 + # source://prism/lib/prism/node.rb#6546 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingParameterNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6494 + # source://prism/lib/prism/node.rb#6531 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#6517 + # source://prism/lib/prism/node.rb#6554 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13811,20 +15383,20 @@ class Prism::ForwardingParameterNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#6522 + # source://prism/lib/prism/node.rb#6559 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#6527 + # source://prism/lib/prism/node.rb#6564 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#6532 + # source://prism/lib/prism/node.rb#6569 def type; end end end @@ -13834,60 +15406,84 @@ end # super # ^^^^^ # -# source://prism/lib/prism/node.rb#6547 +# source://prism/lib/prism/node.rb#6584 class Prism::ForwardingSuperNode < ::Prism::Node # Initialize a new ForwardingSuperNode node. # # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode # - # source://prism/lib/prism/node.rb#6549 + # source://prism/lib/prism/node.rb#6586 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).void + end def initialize(source, node_id, location, flags, block); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#6612 + # source://prism/lib/prism/node.rb#6649 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#6558 + # source://prism/lib/prism/node.rb#6595 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockNode? # - # source://prism/lib/prism/node.rb#6593 + # source://prism/lib/prism/node.rb#6630 + sig { returns(T.nilable(Prism::BlockNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6563 + # source://prism/lib/prism/node.rb#6600 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#6575 + # source://prism/lib/prism/node.rb#6612 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#6568 + # source://prism/lib/prism/node.rb#6605 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?block: BlockNode?) -> ForwardingSuperNode # - # source://prism/lib/prism/node.rb#6580 + # source://prism/lib/prism/node.rb#6617 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).returns(Prism::ForwardingSuperNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6563 + # source://prism/lib/prism/node.rb#6600 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? } # - # source://prism/lib/prism/node.rb#6588 + # source://prism/lib/prism/node.rb#6625 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13895,20 +15491,20 @@ class Prism::ForwardingSuperNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#6596 + # source://prism/lib/prism/node.rb#6633 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#6601 + # source://prism/lib/prism/node.rb#6638 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#6606 + # source://prism/lib/prism/node.rb#6643 def type; end end end @@ -13918,55 +15514,84 @@ end # $target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#6622 +# source://prism/lib/prism/node.rb#6659 class Prism::GlobalVariableAndWriteNode < ::Prism::Node # Initialize a new GlobalVariableAndWriteNode node. # # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode # - # source://prism/lib/prism/node.rb#6624 + # source://prism/lib/prism/node.rb#6661 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#6710 + # source://prism/lib/prism/node.rb#6747 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#6636 + # source://prism/lib/prism/node.rb#6673 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6641 + # source://prism/lib/prism/node.rb#6678 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#6651 + # source://prism/lib/prism/node.rb#6688 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#6646 + # source://prism/lib/prism/node.rb#6683 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableAndWriteNode # - # source://prism/lib/prism/node.rb#6656 + # source://prism/lib/prism/node.rb#6693 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableAndWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6641 + # source://prism/lib/prism/node.rb#6678 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#6664 + # source://prism/lib/prism/node.rb#6701 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#200 @@ -13977,45 +15602,50 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#6694 + # source://prism/lib/prism/node.rb#6731 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#6669 + # source://prism/lib/prism/node.rb#6706 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#6672 + # source://prism/lib/prism/node.rb#6709 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#6689 + # source://prism/lib/prism/node.rb#6726 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#6679 + # source://prism/lib/prism/node.rb#6716 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#6699 + # source://prism/lib/prism/node.rb#6736 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#6686 + # source://prism/lib/prism/node.rb#6723 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#6704 + # source://prism/lib/prism/node.rb#6741 def type; end end end @@ -14025,65 +15655,98 @@ end # $target += value # ^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#6723 +# source://prism/lib/prism/node.rb#6760 class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # Initialize a new GlobalVariableOperatorWriteNode node. # # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode # - # source://prism/lib/prism/node.rb#6725 + # source://prism/lib/prism/node.rb#6762 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#6810 + # source://prism/lib/prism/node.rb#6847 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#6738 + # source://prism/lib/prism/node.rb#6775 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism/lib/prism/node.rb#6791 + # source://prism/lib/prism/node.rb#6828 + sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism/lib/prism/node.rb#6781 + # source://prism/lib/prism/node.rb#6818 + sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6743 + # source://prism/lib/prism/node.rb#6780 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#6753 + # source://prism/lib/prism/node.rb#6790 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#6748 + # source://prism/lib/prism/node.rb#6785 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> GlobalVariableOperatorWriteNode # - # source://prism/lib/prism/node.rb#6758 + # source://prism/lib/prism/node.rb#6795 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::GlobalVariableOperatorWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6743 + # source://prism/lib/prism/node.rb#6780 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism/lib/prism/node.rb#6766 + # source://prism/lib/prism/node.rb#6803 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#212 @@ -14094,18 +15757,20 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#6794 + # source://prism/lib/prism/node.rb#6831 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#6771 + # source://prism/lib/prism/node.rb#6808 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#6774 + # source://prism/lib/prism/node.rb#6811 + sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is @@ -14122,19 +15787,20 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#6799 + # source://prism/lib/prism/node.rb#6836 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#6788 + # source://prism/lib/prism/node.rb#6825 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#6804 + # source://prism/lib/prism/node.rb#6841 def type; end end end @@ -14144,55 +15810,84 @@ end # $target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#6824 +# source://prism/lib/prism/node.rb#6861 class Prism::GlobalVariableOrWriteNode < ::Prism::Node # Initialize a new GlobalVariableOrWriteNode node. # # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode # - # source://prism/lib/prism/node.rb#6826 + # source://prism/lib/prism/node.rb#6863 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#6912 + # source://prism/lib/prism/node.rb#6949 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#6838 + # source://prism/lib/prism/node.rb#6875 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6843 + # source://prism/lib/prism/node.rb#6880 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#6853 + # source://prism/lib/prism/node.rb#6890 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#6848 + # source://prism/lib/prism/node.rb#6885 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableOrWriteNode # - # source://prism/lib/prism/node.rb#6858 + # source://prism/lib/prism/node.rb#6895 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableOrWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6843 + # source://prism/lib/prism/node.rb#6880 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#6866 + # source://prism/lib/prism/node.rb#6903 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#206 @@ -14203,45 +15898,50 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#6896 + # source://prism/lib/prism/node.rb#6933 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#6871 + # source://prism/lib/prism/node.rb#6908 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#6874 + # source://prism/lib/prism/node.rb#6911 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#6891 + # source://prism/lib/prism/node.rb#6928 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#6881 + # source://prism/lib/prism/node.rb#6918 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#6901 + # source://prism/lib/prism/node.rb#6938 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#6888 + # source://prism/lib/prism/node.rb#6925 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#6906 + # source://prism/lib/prism/node.rb#6943 def type; end end end @@ -14251,55 +15951,70 @@ end # $foo # ^^^^ # -# source://prism/lib/prism/node.rb#6925 +# source://prism/lib/prism/node.rb#6962 class Prism::GlobalVariableReadNode < ::Prism::Node # Initialize a new GlobalVariableReadNode node. # # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode # - # source://prism/lib/prism/node.rb#6927 + # source://prism/lib/prism/node.rb#6964 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#6992 + # source://prism/lib/prism/node.rb#7029 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#6936 + # source://prism/lib/prism/node.rb#6973 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6941 + # source://prism/lib/prism/node.rb#6978 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#6951 + # source://prism/lib/prism/node.rb#6988 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#6946 + # source://prism/lib/prism/node.rb#6983 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableReadNode # - # source://prism/lib/prism/node.rb#6956 + # source://prism/lib/prism/node.rb#6993 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#6941 + # source://prism/lib/prism/node.rb#6978 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism/lib/prism/node.rb#6964 + # source://prism/lib/prism/node.rb#7001 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14307,7 +16022,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#6976 + # source://prism/lib/prism/node.rb#7013 sig { override.returns(String) } def inspect; end @@ -14317,19 +16032,20 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # $_Test # name `:$_Test` # - # source://prism/lib/prism/node.rb#6973 + # source://prism/lib/prism/node.rb#7010 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#6981 + # source://prism/lib/prism/node.rb#7018 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#6986 + # source://prism/lib/prism/node.rb#7023 def type; end end end @@ -14339,55 +16055,70 @@ end # $foo, $bar = baz # ^^^^ ^^^^ # -# source://prism/lib/prism/node.rb#7002 +# source://prism/lib/prism/node.rb#7039 class Prism::GlobalVariableTargetNode < ::Prism::Node # Initialize a new GlobalVariableTargetNode node. # # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode # - # source://prism/lib/prism/node.rb#7004 + # source://prism/lib/prism/node.rb#7041 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#7065 + # source://prism/lib/prism/node.rb#7102 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#7013 + # source://prism/lib/prism/node.rb#7050 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7018 + # source://prism/lib/prism/node.rb#7055 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#7028 + # source://prism/lib/prism/node.rb#7065 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#7023 + # source://prism/lib/prism/node.rb#7060 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableTargetNode # - # source://prism/lib/prism/node.rb#7033 + # source://prism/lib/prism/node.rb#7070 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7018 + # source://prism/lib/prism/node.rb#7055 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism/lib/prism/node.rb#7041 + # source://prism/lib/prism/node.rb#7078 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14395,25 +16126,26 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#7049 + # source://prism/lib/prism/node.rb#7086 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#7046 + # source://prism/lib/prism/node.rb#7083 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#7054 + # source://prism/lib/prism/node.rb#7091 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#7059 + # source://prism/lib/prism/node.rb#7096 def type; end end end @@ -14423,55 +16155,84 @@ end # $foo = 1 # ^^^^^^^^ # -# source://prism/lib/prism/node.rb#7075 +# source://prism/lib/prism/node.rb#7112 class Prism::GlobalVariableWriteNode < ::Prism::Node # Initialize a new GlobalVariableWriteNode node. # # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode # - # source://prism/lib/prism/node.rb#7077 + # source://prism/lib/prism/node.rb#7114 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#7179 + # source://prism/lib/prism/node.rb#7216 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#7089 + # source://prism/lib/prism/node.rb#7126 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7094 + # source://prism/lib/prism/node.rb#7131 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#7104 + # source://prism/lib/prism/node.rb#7141 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#7099 + # source://prism/lib/prism/node.rb#7136 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> GlobalVariableWriteNode # - # source://prism/lib/prism/node.rb#7109 + # source://prism/lib/prism/node.rb#7146 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7094 + # source://prism/lib/prism/node.rb#7131 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism/lib/prism/node.rb#7117 + # source://prism/lib/prism/node.rb#7154 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14479,7 +16240,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#7163 + # source://prism/lib/prism/node.rb#7200 sig { override.returns(String) } def inspect; end @@ -14489,7 +16250,8 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # $_Test = 123 # name `:$_Test` # - # source://prism/lib/prism/node.rb#7126 + # source://prism/lib/prism/node.rb#7163 + sig { returns(Symbol) } def name; end # The location of the global variable's name. @@ -14497,12 +16259,14 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^^^^ # - # source://prism/lib/prism/node.rb#7132 + # source://prism/lib/prism/node.rb#7169 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#7158 + # source://prism/lib/prism/node.rb#7195 + sig { returns(String) } def operator; end # The location of the `=` operator. @@ -14510,12 +16274,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^ # - # source://prism/lib/prism/node.rb#7151 + # source://prism/lib/prism/node.rb#7188 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#7168 + # source://prism/lib/prism/node.rb#7205 sig { override.returns(Symbol) } def type; end @@ -14527,13 +16292,14 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $-xyz = 123 # ^^^ # - # source://prism/lib/prism/node.rb#7145 + # source://prism/lib/prism/node.rb#7182 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#7173 + # source://prism/lib/prism/node.rb#7210 def type; end end end @@ -14543,34 +16309,48 @@ end # { a => b } # ^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#7192 +# source://prism/lib/prism/node.rb#7229 class Prism::HashNode < ::Prism::Node # Initialize a new HashNode node. # # @return [HashNode] a new instance of HashNode # - # source://prism/lib/prism/node.rb#7194 + # source://prism/lib/prism/node.rb#7231 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, opening_loc, elements, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#7293 + # source://prism/lib/prism/node.rb#7330 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#7205 + # source://prism/lib/prism/node.rb#7242 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7210 + # source://prism/lib/prism/node.rb#7247 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#7272 + # source://prism/lib/prism/node.rb#7309 + sig { returns(String) } def closing; end # The location of the closing brace. @@ -14578,33 +16358,48 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism/lib/prism/node.rb#7260 + # source://prism/lib/prism/node.rb#7297 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#7220 + # source://prism/lib/prism/node.rb#7257 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#7215 + # source://prism/lib/prism/node.rb#7252 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location) -> HashNode # - # source://prism/lib/prism/node.rb#7225 + # source://prism/lib/prism/node.rb#7262 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).returns(Prism::HashNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7210 + # source://prism/lib/prism/node.rb#7247 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location } # - # source://prism/lib/prism/node.rb#7233 + # source://prism/lib/prism/node.rb#7270 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. @@ -14615,7 +16410,8 @@ class Prism::HashNode < ::Prism::Node # { **foo } # ^^^^^ # - # source://prism/lib/prism/node.rb#7254 + # source://prism/lib/prism/node.rb#7291 + sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14623,13 +16419,14 @@ class Prism::HashNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#7277 + # source://prism/lib/prism/node.rb#7314 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#7267 + # source://prism/lib/prism/node.rb#7304 + sig { returns(String) } def opening; end # The location of the opening brace. @@ -14637,19 +16434,20 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism/lib/prism/node.rb#7241 + # source://prism/lib/prism/node.rb#7278 + sig { returns(Prism::Location) } def opening_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#7282 + # source://prism/lib/prism/node.rb#7319 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#7287 + # source://prism/lib/prism/node.rb#7324 def type; end end end @@ -14662,75 +16460,110 @@ end # foo => { a: 1, b: 2, **c } # ^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#7309 +# source://prism/lib/prism/node.rb#7346 class Prism::HashPatternNode < ::Prism::Node # Initialize a new HashPatternNode node. # # @return [HashPatternNode] a new instance of HashPatternNode # - # source://prism/lib/prism/node.rb#7311 + # source://prism/lib/prism/node.rb#7348 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, constant, elements, rest, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#7422 + # source://prism/lib/prism/node.rb#7459 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#7324 + # source://prism/lib/prism/node.rb#7361 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7329 + # source://prism/lib/prism/node.rb#7366 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism/lib/prism/node.rb#7401 + # source://prism/lib/prism/node.rb#7438 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism/lib/prism/node.rb#7383 + # source://prism/lib/prism/node.rb#7420 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#7343 + # source://prism/lib/prism/node.rb#7380 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#7334 + # source://prism/lib/prism/node.rb#7371 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Prism::node? + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil # - # source://prism/lib/prism/node.rb#7361 + # source://prism/lib/prism/node.rb#7398 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } def constant; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: Prism::node?, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode # - # source://prism/lib/prism/node.rb#7348 + # source://prism/lib/prism/node.rb#7385 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::HashPatternNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7329 + # source://prism/lib/prism/node.rb#7366 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: Prism::node?, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? } # - # source://prism/lib/prism/node.rb#7356 + # source://prism/lib/prism/node.rb#7393 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader elements: Array[AssocNode] # - # source://prism/lib/prism/node.rb#7364 + # source://prism/lib/prism/node.rb#7401 + sig { returns(T::Array[Prism::AssocNode]) } def elements; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14738,35 +16571,38 @@ class Prism::HashPatternNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#7406 + # source://prism/lib/prism/node.rb#7443 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism/lib/prism/node.rb#7396 + # source://prism/lib/prism/node.rb#7433 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism/lib/prism/node.rb#7370 + # source://prism/lib/prism/node.rb#7407 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil # - # source://prism/lib/prism/node.rb#7367 + # source://prism/lib/prism/node.rb#7404 + sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } def rest; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#7411 + # source://prism/lib/prism/node.rb#7448 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#7416 + # source://prism/lib/prism/node.rb#7453 def type; end end end @@ -14792,39 +16628,57 @@ end # foo ? bar : baz # ^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#7443 +# source://prism/lib/prism/node.rb#7480 class Prism::IfNode < ::Prism::Node # Initialize a new IfNode node. # # @return [IfNode] a new instance of IfNode # - # source://prism/lib/prism/node.rb#7445 + # source://prism/lib/prism/node.rb#7482 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, if_keyword_loc, predicate, then_keyword_loc, statements, subsequent, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#7621 + # source://prism/lib/prism/node.rb#7658 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#7459 + # source://prism/lib/prism/node.rb#7496 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7464 + # source://prism/lib/prism/node.rb#7501 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#7478 + # source://prism/lib/prism/node.rb#7515 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#7469 + # source://prism/lib/prism/node.rb#7506 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns the subsequent if/elsif/else clause of the if node. This method is @@ -14835,23 +16689,39 @@ class Prism::IfNode < ::Prism::Node # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?subsequent: ElseNode | IfNode | nil, ?end_keyword_loc: Location?) -> IfNode # - # source://prism/lib/prism/node.rb#7483 + # source://prism/lib/prism/node.rb#7520 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::IfNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7464 + # source://prism/lib/prism/node.rb#7501 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: ElseNode | IfNode | nil, end_keyword_loc: Location? } # - # source://prism/lib/prism/node.rb#7491 + # source://prism/lib/prism/node.rb#7528 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String? # - # source://prism/lib/prism/node.rb#7600 + # source://prism/lib/prism/node.rb#7637 + sig { returns(T.nilable(String)) } def end_keyword; end # The location of the `end` keyword if present, `nil` otherwise. @@ -14861,7 +16731,8 @@ class Prism::IfNode < ::Prism::Node # end # ^^^ # - # source://prism/lib/prism/node.rb#7577 + # source://prism/lib/prism/node.rb#7614 + sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14869,7 +16740,8 @@ class Prism::IfNode < ::Prism::Node # def if_keyword: () -> String? # - # source://prism/lib/prism/node.rb#7590 + # source://prism/lib/prism/node.rb#7627 + sig { returns(T.nilable(String)) } def if_keyword; end # The location of the `if` keyword if present. @@ -14879,12 +16751,13 @@ class Prism::IfNode < ::Prism::Node # # The `if_keyword_loc` field will be `nil` when the `IfNode` represents a ternary expression. # - # source://prism/lib/prism/node.rb#7501 + # source://prism/lib/prism/node.rb#7538 + sig { returns(T.nilable(Prism::Location)) } def if_keyword_loc; end # def inspect -> String # - # source://prism/lib/prism/node.rb#7605 + # source://prism/lib/prism/node.rb#7642 sig { override.returns(String) } def inspect; end @@ -14904,7 +16777,8 @@ class Prism::IfNode < ::Prism::Node # foo ? bar : baz # ^^^ # - # source://prism/lib/prism/node.rb#7525 + # source://prism/lib/prism/node.rb#7562 + sig { returns(Prism::Node) } def predicate; end # Represents the body of statements that will be executed when the predicate is evaluated as truthy. Will be `nil` when no body is provided. @@ -14916,7 +16790,8 @@ class Prism::IfNode < ::Prism::Node # ^^^ # end # - # source://prism/lib/prism/node.rb#7554 + # source://prism/lib/prism/node.rb#7591 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. @@ -14933,12 +16808,14 @@ class Prism::IfNode < ::Prism::Node # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism/lib/prism/node.rb#7569 + # source://prism/lib/prism/node.rb#7606 + sig { returns(T.nilable(T.any(Prism::ElseNode, Prism::IfNode))) } def subsequent; end # def then_keyword: () -> String? # - # source://prism/lib/prism/node.rb#7595 + # source://prism/lib/prism/node.rb#7632 + sig { returns(T.nilable(String)) } def then_keyword; end # The location of the `then` keyword (if present) or the `?` in a ternary expression, `nil` otherwise. @@ -14949,19 +16826,20 @@ class Prism::IfNode < ::Prism::Node # a ? b : c # ^ # - # source://prism/lib/prism/node.rb#7534 + # source://prism/lib/prism/node.rb#7571 + sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#7610 + # source://prism/lib/prism/node.rb#7647 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#7615 + # source://prism/lib/prism/node.rb#7652 def type; end end end @@ -14971,55 +16849,78 @@ end # 1.0i # ^^^^ # -# source://prism/lib/prism/node.rb#7636 +# source://prism/lib/prism/node.rb#7673 class Prism::ImaginaryNode < ::Prism::Node # Initialize a new ImaginaryNode node. # # @return [ImaginaryNode] a new instance of ImaginaryNode # - # source://prism/lib/prism/node.rb#7638 + # source://prism/lib/prism/node.rb#7675 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).void + end def initialize(source, node_id, location, flags, numeric); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#7699 + # source://prism/lib/prism/node.rb#7736 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#7647 + # source://prism/lib/prism/node.rb#7684 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7652 + # source://prism/lib/prism/node.rb#7689 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#7662 + # source://prism/lib/prism/node.rb#7699 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#7657 + # source://prism/lib/prism/node.rb#7694 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numeric: FloatNode | IntegerNode | RationalNode) -> ImaginaryNode # - # source://prism/lib/prism/node.rb#7667 + # source://prism/lib/prism/node.rb#7704 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).returns(Prism::ImaginaryNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7652 + # source://prism/lib/prism/node.rb#7689 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode } # - # source://prism/lib/prism/node.rb#7675 + # source://prism/lib/prism/node.rb#7712 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15027,18 +16928,19 @@ class Prism::ImaginaryNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#7683 + # source://prism/lib/prism/node.rb#7720 sig { override.returns(String) } def inspect; end # attr_reader numeric: FloatNode | IntegerNode | RationalNode # - # source://prism/lib/prism/node.rb#7680 + # source://prism/lib/prism/node.rb#7717 + sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } def numeric; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#7688 + # source://prism/lib/prism/node.rb#7725 sig { override.returns(Symbol) } def type; end @@ -15051,7 +16953,7 @@ class Prism::ImaginaryNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#7693 + # source://prism/lib/prism/node.rb#7730 def type; end end end @@ -15067,55 +16969,78 @@ end # foo in { bar: } # ^^^^ # -# source://prism/lib/prism/node.rb#7715 +# source://prism/lib/prism/node.rb#7752 class Prism::ImplicitNode < ::Prism::Node # Initialize a new ImplicitNode node. # # @return [ImplicitNode] a new instance of ImplicitNode # - # source://prism/lib/prism/node.rb#7717 + # source://prism/lib/prism/node.rb#7754 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).void + end def initialize(source, node_id, location, flags, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#7778 + # source://prism/lib/prism/node.rb#7815 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#7726 + # source://prism/lib/prism/node.rb#7763 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7731 + # source://prism/lib/prism/node.rb#7768 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#7741 + # source://prism/lib/prism/node.rb#7778 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#7736 + # source://prism/lib/prism/node.rb#7773 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node) -> ImplicitNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode) -> ImplicitNode # - # source://prism/lib/prism/node.rb#7746 + # source://prism/lib/prism/node.rb#7783 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).returns(Prism::ImplicitNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7731 + # source://prism/lib/prism/node.rb#7768 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode } # - # source://prism/lib/prism/node.rb#7754 + # source://prism/lib/prism/node.rb#7791 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15123,25 +17048,28 @@ class Prism::ImplicitNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#7762 + # source://prism/lib/prism/node.rb#7799 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#7767 + # source://prism/lib/prism/node.rb#7804 sig { override.returns(Symbol) } def type; end - # attr_reader value: Prism::node + # attr_reader value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode # - # source://prism/lib/prism/node.rb#7759 + # source://prism/lib/prism/node.rb#7796 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode)) + end def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#7772 + # source://prism/lib/prism/node.rb#7809 def type; end end end @@ -15160,55 +17088,63 @@ end # foo, = bar # ^ # -# source://prism/lib/prism/node.rb#7797 +# source://prism/lib/prism/node.rb#7834 class Prism::ImplicitRestNode < ::Prism::Node # Initialize a new ImplicitRestNode node. # # @return [ImplicitRestNode] a new instance of ImplicitRestNode # - # source://prism/lib/prism/node.rb#7799 + # source://prism/lib/prism/node.rb#7836 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#7856 + # source://prism/lib/prism/node.rb#7893 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#7807 + # source://prism/lib/prism/node.rb#7844 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7812 + # source://prism/lib/prism/node.rb#7849 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#7822 + # source://prism/lib/prism/node.rb#7859 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#7817 + # source://prism/lib/prism/node.rb#7854 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ImplicitRestNode # - # source://prism/lib/prism/node.rb#7827 + # source://prism/lib/prism/node.rb#7864 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ImplicitRestNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7812 + # source://prism/lib/prism/node.rb#7849 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#7835 + # source://prism/lib/prism/node.rb#7872 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15216,20 +17152,20 @@ class Prism::ImplicitRestNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#7840 + # source://prism/lib/prism/node.rb#7877 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#7845 + # source://prism/lib/prism/node.rb#7882 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#7850 + # source://prism/lib/prism/node.rb#7887 def type; end end end @@ -15239,55 +17175,84 @@ end # case a; in b then c end # ^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#7865 +# source://prism/lib/prism/node.rb#7902 class Prism::InNode < ::Prism::Node # Initialize a new InNode node. # # @return [InNode] a new instance of InNode # - # source://prism/lib/prism/node.rb#7867 + # source://prism/lib/prism/node.rb#7904 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, pattern, statements, in_loc, then_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#7967 + # source://prism/lib/prism/node.rb#8004 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#7879 + # source://prism/lib/prism/node.rb#7916 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7884 + # source://prism/lib/prism/node.rb#7921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#7897 + # source://prism/lib/prism/node.rb#7934 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#7889 + # source://prism/lib/prism/node.rb#7926 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?) -> InNode # - # source://prism/lib/prism/node.rb#7902 + # source://prism/lib/prism/node.rb#7939 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).returns(Prism::InNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#7884 + # source://prism/lib/prism/node.rb#7921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location? } # - # source://prism/lib/prism/node.rb#7910 + # source://prism/lib/prism/node.rb#7947 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15295,50 +17260,56 @@ class Prism::InNode < ::Prism::Node # def in: () -> String # - # source://prism/lib/prism/node.rb#7941 + # source://prism/lib/prism/node.rb#7978 + sig { returns(String) } def in; end # attr_reader in_loc: Location # - # source://prism/lib/prism/node.rb#7921 + # source://prism/lib/prism/node.rb#7958 + sig { returns(Prism::Location) } def in_loc; end # def inspect -> String # - # source://prism/lib/prism/node.rb#7951 + # source://prism/lib/prism/node.rb#7988 sig { override.returns(String) } def inspect; end # attr_reader pattern: Prism::node # - # source://prism/lib/prism/node.rb#7915 + # source://prism/lib/prism/node.rb#7952 + sig { returns(Prism::Node) } def pattern; end # attr_reader statements: StatementsNode? # - # source://prism/lib/prism/node.rb#7918 + # source://prism/lib/prism/node.rb#7955 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then: () -> String? # - # source://prism/lib/prism/node.rb#7946 + # source://prism/lib/prism/node.rb#7983 + sig { returns(T.nilable(String)) } def then; end # attr_reader then_loc: Location? # - # source://prism/lib/prism/node.rb#7928 + # source://prism/lib/prism/node.rb#7965 + sig { returns(T.nilable(Prism::Location)) } def then_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#7956 + # source://prism/lib/prism/node.rb#7993 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#7961 + # source://prism/lib/prism/node.rb#7998 def type; end end end @@ -15348,13 +17319,13 @@ end # foo.bar[baz] &&= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#7980 +# source://prism/lib/prism/node.rb#8017 class Prism::IndexAndWriteNode < ::Prism::Node # Initialize a new IndexAndWriteNode node. # # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode # - # source://prism/lib/prism/node.rb#7982 + # source://prism/lib/prism/node.rb#8019 sig do params( source: Prism::Source, @@ -15366,7 +17337,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, value: Prism::Node ).void @@ -15376,18 +17347,18 @@ class Prism::IndexAndWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#8138 + # source://prism/lib/prism/node.rb#8175 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#7998 + # source://prism/lib/prism/node.rb#8035 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism/lib/prism/node.rb#8079 + # source://prism/lib/prism/node.rb#8116 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -15395,61 +17366,61 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8046 + # source://prism/lib/prism/node.rb#8083 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Prism::node? + # attr_reader block: BlockArgumentNode? # - # source://prism/lib/prism/node.rb#8089 - sig { returns(T.nilable(Prism::Node)) } + # source://prism/lib/prism/node.rb#8126 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism/lib/prism/node.rb#8102 + # source://prism/lib/prism/node.rb#8139 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism/lib/prism/node.rb#8059 + # source://prism/lib/prism/node.rb#8096 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8003 + # source://prism/lib/prism/node.rb#8040 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#8112 + # source://prism/lib/prism/node.rb#8149 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#8082 + # source://prism/lib/prism/node.rb#8119 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#8018 + # source://prism/lib/prism/node.rb#8055 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#8008 + # source://prism/lib/prism/node.rb#8045 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node) -> IndexAndWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexAndWriteNode # - # source://prism/lib/prism/node.rb#8023 + # source://prism/lib/prism/node.rb#8060 sig do params( node_id: Integer, @@ -15460,7 +17431,7 @@ class Prism::IndexAndWriteNode < ::Prism::Node opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, value: Prism::Node ).returns(Prism::IndexAndWriteNode) @@ -15470,13 +17441,13 @@ class Prism::IndexAndWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8003 + # source://prism/lib/prism/node.rb#8040 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#8031 + # source://prism/lib/prism/node.rb#8068 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15487,43 +17458,43 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8051 + # source://prism/lib/prism/node.rb#8088 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#8122 + # source://prism/lib/prism/node.rb#8159 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#8107 + # source://prism/lib/prism/node.rb#8144 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#8072 + # source://prism/lib/prism/node.rb#8109 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#8117 + # source://prism/lib/prism/node.rb#8154 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#8092 + # source://prism/lib/prism/node.rb#8129 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism/lib/prism/node.rb#8056 + # source://prism/lib/prism/node.rb#8093 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -15531,19 +17502,19 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8036 + # source://prism/lib/prism/node.rb#8073 sig { returns(T::Boolean) } def safe_navigation?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#8127 + # source://prism/lib/prism/node.rb#8164 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#8099 + # source://prism/lib/prism/node.rb#8136 sig { returns(Prism::Node) } def value; end @@ -15551,14 +17522,14 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8041 + # source://prism/lib/prism/node.rb#8078 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#8132 + # source://prism/lib/prism/node.rb#8169 def type; end end end @@ -15568,13 +17539,13 @@ end # foo.bar[baz] += value # ^^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#8156 +# source://prism/lib/prism/node.rb#8193 class Prism::IndexOperatorWriteNode < ::Prism::Node # Initialize a new IndexOperatorWriteNode node. # # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode # - # source://prism/lib/prism/node.rb#8158 + # source://prism/lib/prism/node.rb#8195 sig do params( source: Prism::Source, @@ -15586,7 +17557,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), binary_operator: Symbol, binary_operator_loc: Prism::Location, value: Prism::Node @@ -15597,18 +17568,18 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#8313 + # source://prism/lib/prism/node.rb#8350 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#8175 + # source://prism/lib/prism/node.rb#8212 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism/lib/prism/node.rb#8256 + # source://prism/lib/prism/node.rb#8293 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -15616,73 +17587,73 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8223 + # source://prism/lib/prism/node.rb#8260 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader binary_operator: Symbol # - # source://prism/lib/prism/node.rb#8269 + # source://prism/lib/prism/node.rb#8306 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism/lib/prism/node.rb#8272 + # source://prism/lib/prism/node.rb#8309 sig { returns(Prism::Location) } def binary_operator_loc; end - # attr_reader block: Prism::node? + # attr_reader block: BlockArgumentNode? # - # source://prism/lib/prism/node.rb#8266 - sig { returns(T.nilable(Prism::Node)) } + # source://prism/lib/prism/node.rb#8303 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism/lib/prism/node.rb#8282 + # source://prism/lib/prism/node.rb#8319 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism/lib/prism/node.rb#8236 + # source://prism/lib/prism/node.rb#8273 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8180 + # source://prism/lib/prism/node.rb#8217 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#8292 + # source://prism/lib/prism/node.rb#8329 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#8259 + # source://prism/lib/prism/node.rb#8296 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#8195 + # source://prism/lib/prism/node.rb#8232 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#8185 + # source://prism/lib/prism/node.rb#8222 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> IndexOperatorWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node) -> IndexOperatorWriteNode # - # source://prism/lib/prism/node.rb#8200 + # source://prism/lib/prism/node.rb#8237 sig do params( node_id: Integer, @@ -15693,7 +17664,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), binary_operator: Symbol, binary_operator_loc: Prism::Location, value: Prism::Node @@ -15704,13 +17675,13 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8180 + # source://prism/lib/prism/node.rb#8217 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#8208 + # source://prism/lib/prism/node.rb#8245 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15721,25 +17692,25 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8228 + # source://prism/lib/prism/node.rb#8265 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#8297 + # source://prism/lib/prism/node.rb#8334 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#8287 + # source://prism/lib/prism/node.rb#8324 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#8249 + # source://prism/lib/prism/node.rb#8286 sig { returns(Prism::Location) } def opening_loc; end @@ -15757,7 +17728,7 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # attr_reader receiver: Prism::node? # - # source://prism/lib/prism/node.rb#8233 + # source://prism/lib/prism/node.rb#8270 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -15765,19 +17736,19 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8213 + # source://prism/lib/prism/node.rb#8250 sig { returns(T::Boolean) } def safe_navigation?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#8302 + # source://prism/lib/prism/node.rb#8339 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#8279 + # source://prism/lib/prism/node.rb#8316 sig { returns(Prism::Node) } def value; end @@ -15785,14 +17756,14 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8218 + # source://prism/lib/prism/node.rb#8255 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#8307 + # source://prism/lib/prism/node.rb#8344 def type; end end end @@ -15802,13 +17773,13 @@ end # foo.bar[baz] ||= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#8332 +# source://prism/lib/prism/node.rb#8369 class Prism::IndexOrWriteNode < ::Prism::Node # Initialize a new IndexOrWriteNode node. # # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode # - # source://prism/lib/prism/node.rb#8334 + # source://prism/lib/prism/node.rb#8371 sig do params( source: Prism::Source, @@ -15820,7 +17791,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, value: Prism::Node ).void @@ -15830,18 +17801,18 @@ class Prism::IndexOrWriteNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#8490 + # source://prism/lib/prism/node.rb#8527 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#8350 + # source://prism/lib/prism/node.rb#8387 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism/lib/prism/node.rb#8431 + # source://prism/lib/prism/node.rb#8468 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -15849,61 +17820,61 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8398 + # source://prism/lib/prism/node.rb#8435 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Prism::node? + # attr_reader block: BlockArgumentNode? # - # source://prism/lib/prism/node.rb#8441 - sig { returns(T.nilable(Prism::Node)) } + # source://prism/lib/prism/node.rb#8478 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism/lib/prism/node.rb#8454 + # source://prism/lib/prism/node.rb#8491 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism/lib/prism/node.rb#8411 + # source://prism/lib/prism/node.rb#8448 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8355 + # source://prism/lib/prism/node.rb#8392 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#8464 + # source://prism/lib/prism/node.rb#8501 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#8434 + # source://prism/lib/prism/node.rb#8471 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#8370 + # source://prism/lib/prism/node.rb#8407 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#8360 + # source://prism/lib/prism/node.rb#8397 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node) -> IndexOrWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?, ?operator_loc: Location, ?value: Prism::node) -> IndexOrWriteNode # - # source://prism/lib/prism/node.rb#8375 + # source://prism/lib/prism/node.rb#8412 sig do params( node_id: Integer, @@ -15914,7 +17885,7 @@ class Prism::IndexOrWriteNode < ::Prism::Node opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, value: Prism::Node ).returns(Prism::IndexOrWriteNode) @@ -15924,13 +17895,13 @@ class Prism::IndexOrWriteNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8355 + # source://prism/lib/prism/node.rb#8392 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode?, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#8383 + # source://prism/lib/prism/node.rb#8420 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15941,43 +17912,43 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8403 + # source://prism/lib/prism/node.rb#8440 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#8474 + # source://prism/lib/prism/node.rb#8511 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#8459 + # source://prism/lib/prism/node.rb#8496 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#8424 + # source://prism/lib/prism/node.rb#8461 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#8469 + # source://prism/lib/prism/node.rb#8506 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#8444 + # source://prism/lib/prism/node.rb#8481 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism/lib/prism/node.rb#8408 + # source://prism/lib/prism/node.rb#8445 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -15985,19 +17956,19 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8388 + # source://prism/lib/prism/node.rb#8425 sig { returns(T::Boolean) } def safe_navigation?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#8479 + # source://prism/lib/prism/node.rb#8516 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#8451 + # source://prism/lib/prism/node.rb#8488 sig { returns(Prism::Node) } def value; end @@ -16005,14 +17976,14 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8393 + # source://prism/lib/prism/node.rb#8430 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#8484 + # source://prism/lib/prism/node.rb#8521 def type; end end end @@ -16030,13 +18001,13 @@ end # for foo[bar] in baz do end # ^^^^^^^^ # -# source://prism/lib/prism/node.rb#8516 +# source://prism/lib/prism/node.rb#8553 class Prism::IndexTargetNode < ::Prism::Node # Initialize a new IndexTargetNode node. # # @return [IndexTargetNode] a new instance of IndexTargetNode # - # source://prism/lib/prism/node.rb#8518 + # source://prism/lib/prism/node.rb#8555 sig do params( source: Prism::Source, @@ -16047,7 +18018,7 @@ class Prism::IndexTargetNode < ::Prism::Node opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node) + block: T.nilable(Prism::BlockArgumentNode) ).void end def initialize(source, node_id, location, flags, receiver, opening_loc, arguments, closing_loc, block); end @@ -16055,18 +18026,18 @@ class Prism::IndexTargetNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#8637 + # source://prism/lib/prism/node.rb#8674 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#8531 + # source://prism/lib/prism/node.rb#8568 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism/lib/prism/node.rb#8598 + # source://prism/lib/prism/node.rb#8635 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16074,49 +18045,49 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8578 + # source://prism/lib/prism/node.rb#8615 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Prism::node? + # attr_reader block: BlockArgumentNode? # - # source://prism/lib/prism/node.rb#8608 - sig { returns(T.nilable(Prism::Node)) } + # source://prism/lib/prism/node.rb#8645 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8536 + # source://prism/lib/prism/node.rb#8573 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#8616 + # source://prism/lib/prism/node.rb#8653 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#8601 + # source://prism/lib/prism/node.rb#8638 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#8550 + # source://prism/lib/prism/node.rb#8587 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#8541 + # source://prism/lib/prism/node.rb#8578 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?) -> IndexTargetNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: BlockArgumentNode?) -> IndexTargetNode # - # source://prism/lib/prism/node.rb#8555 + # source://prism/lib/prism/node.rb#8592 sig do params( node_id: Integer, @@ -16126,7 +18097,7 @@ class Prism::IndexTargetNode < ::Prism::Node opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node) + block: T.nilable(Prism::BlockArgumentNode) ).returns(Prism::IndexTargetNode) end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), receiver: T.unsafe(nil), opening_loc: T.unsafe(nil), arguments: T.unsafe(nil), closing_loc: T.unsafe(nil), block: T.unsafe(nil)); end @@ -16134,13 +18105,13 @@ class Prism::IndexTargetNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8536 + # source://prism/lib/prism/node.rb#8573 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: BlockArgumentNode? } # - # source://prism/lib/prism/node.rb#8563 + # source://prism/lib/prism/node.rb#8600 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16151,31 +18122,31 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8583 + # source://prism/lib/prism/node.rb#8620 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#8621 + # source://prism/lib/prism/node.rb#8658 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#8611 + # source://prism/lib/prism/node.rb#8648 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#8591 + # source://prism/lib/prism/node.rb#8628 sig { returns(Prism::Location) } def opening_loc; end # attr_reader receiver: Prism::node # - # source://prism/lib/prism/node.rb#8588 + # source://prism/lib/prism/node.rb#8625 sig { returns(Prism::Node) } def receiver; end @@ -16183,13 +18154,13 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8568 + # source://prism/lib/prism/node.rb#8605 sig { returns(T::Boolean) } def safe_navigation?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#8626 + # source://prism/lib/prism/node.rb#8663 sig { override.returns(Symbol) } def type; end @@ -16197,14 +18168,14 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#8573 + # source://prism/lib/prism/node.rb#8610 sig { returns(T::Boolean) } def variable_call?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#8631 + # source://prism/lib/prism/node.rb#8668 def type; end end end @@ -16212,11 +18183,11 @@ 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#397 +# source://prism/lib/prism/parse_result.rb#529 class Prism::InlineComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism/lib/prism/parse_result.rb#405 + # source://prism/lib/prism/parse_result.rb#537 sig { returns(String) } def inspect; end @@ -16225,7 +18196,7 @@ class Prism::InlineComment < ::Prism::Comment # # @return [Boolean] # - # source://prism/lib/prism/parse_result.rb#400 + # source://prism/lib/prism/parse_result.rb#532 sig { override.returns(T::Boolean) } def trailing?; end end @@ -17057,55 +19028,84 @@ end # @target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#8652 +# source://prism/lib/prism/node.rb#8689 class Prism::InstanceVariableAndWriteNode < ::Prism::Node # Initialize a new InstanceVariableAndWriteNode node. # # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode # - # source://prism/lib/prism/node.rb#8654 + # source://prism/lib/prism/node.rb#8691 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#8740 + # source://prism/lib/prism/node.rb#8777 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#8666 + # source://prism/lib/prism/node.rb#8703 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8671 + # source://prism/lib/prism/node.rb#8708 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#8681 + # source://prism/lib/prism/node.rb#8718 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#8676 + # source://prism/lib/prism/node.rb#8713 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableAndWriteNode # - # source://prism/lib/prism/node.rb#8686 + # source://prism/lib/prism/node.rb#8723 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableAndWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8671 + # source://prism/lib/prism/node.rb#8708 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#8694 + # source://prism/lib/prism/node.rb#8731 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#218 @@ -17116,45 +19116,50 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#8724 + # source://prism/lib/prism/node.rb#8761 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#8699 + # source://prism/lib/prism/node.rb#8736 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#8702 + # source://prism/lib/prism/node.rb#8739 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#8719 + # source://prism/lib/prism/node.rb#8756 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#8709 + # source://prism/lib/prism/node.rb#8746 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#8729 + # source://prism/lib/prism/node.rb#8766 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#8716 + # source://prism/lib/prism/node.rb#8753 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#8734 + # source://prism/lib/prism/node.rb#8771 def type; end end end @@ -17164,65 +19169,98 @@ end # @target += value # ^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#8753 +# source://prism/lib/prism/node.rb#8790 class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # Initialize a new InstanceVariableOperatorWriteNode node. # # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode # - # source://prism/lib/prism/node.rb#8755 + # source://prism/lib/prism/node.rb#8792 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#8840 + # source://prism/lib/prism/node.rb#8877 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#8768 + # source://prism/lib/prism/node.rb#8805 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism/lib/prism/node.rb#8821 + # source://prism/lib/prism/node.rb#8858 + sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism/lib/prism/node.rb#8811 + # source://prism/lib/prism/node.rb#8848 + sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8773 + # source://prism/lib/prism/node.rb#8810 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#8783 + # source://prism/lib/prism/node.rb#8820 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#8778 + # source://prism/lib/prism/node.rb#8815 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> InstanceVariableOperatorWriteNode # - # source://prism/lib/prism/node.rb#8788 + # source://prism/lib/prism/node.rb#8825 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::InstanceVariableOperatorWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8773 + # source://prism/lib/prism/node.rb#8810 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # - # source://prism/lib/prism/node.rb#8796 + # source://prism/lib/prism/node.rb#8833 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#230 @@ -17233,18 +19271,20 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#8824 + # source://prism/lib/prism/node.rb#8861 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#8801 + # source://prism/lib/prism/node.rb#8838 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#8804 + # source://prism/lib/prism/node.rb#8841 + sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is @@ -17261,19 +19301,20 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#8829 + # source://prism/lib/prism/node.rb#8866 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#8818 + # source://prism/lib/prism/node.rb#8855 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#8834 + # source://prism/lib/prism/node.rb#8871 def type; end end end @@ -17283,55 +19324,84 @@ end # @target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#8854 +# source://prism/lib/prism/node.rb#8891 class Prism::InstanceVariableOrWriteNode < ::Prism::Node # Initialize a new InstanceVariableOrWriteNode node. # # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode # - # source://prism/lib/prism/node.rb#8856 + # source://prism/lib/prism/node.rb#8893 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#8942 + # source://prism/lib/prism/node.rb#8979 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#8868 + # source://prism/lib/prism/node.rb#8905 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8873 + # source://prism/lib/prism/node.rb#8910 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#8883 + # source://prism/lib/prism/node.rb#8920 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#8878 + # source://prism/lib/prism/node.rb#8915 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableOrWriteNode # - # source://prism/lib/prism/node.rb#8888 + # source://prism/lib/prism/node.rb#8925 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableOrWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8873 + # source://prism/lib/prism/node.rb#8910 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#8896 + # source://prism/lib/prism/node.rb#8933 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#224 @@ -17342,45 +19412,50 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#8926 + # source://prism/lib/prism/node.rb#8963 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#8901 + # source://prism/lib/prism/node.rb#8938 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#8904 + # source://prism/lib/prism/node.rb#8941 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#8921 + # source://prism/lib/prism/node.rb#8958 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#8911 + # source://prism/lib/prism/node.rb#8948 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#8931 + # source://prism/lib/prism/node.rb#8968 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#8918 + # source://prism/lib/prism/node.rb#8955 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#8936 + # source://prism/lib/prism/node.rb#8973 def type; end end end @@ -17390,55 +19465,70 @@ end # @foo # ^^^^ # -# source://prism/lib/prism/node.rb#8955 +# source://prism/lib/prism/node.rb#8992 class Prism::InstanceVariableReadNode < ::Prism::Node # Initialize a new InstanceVariableReadNode node. # # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode # - # source://prism/lib/prism/node.rb#8957 + # source://prism/lib/prism/node.rb#8994 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#9022 + # source://prism/lib/prism/node.rb#9059 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#8966 + # source://prism/lib/prism/node.rb#9003 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8971 + # source://prism/lib/prism/node.rb#9008 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#8981 + # source://prism/lib/prism/node.rb#9018 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#8976 + # source://prism/lib/prism/node.rb#9013 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableReadNode # - # source://prism/lib/prism/node.rb#8986 + # source://prism/lib/prism/node.rb#9023 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#8971 + # source://prism/lib/prism/node.rb#9008 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism/lib/prism/node.rb#8994 + # source://prism/lib/prism/node.rb#9031 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17446,7 +19536,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#9006 + # source://prism/lib/prism/node.rb#9043 sig { override.returns(String) } def inspect; end @@ -17456,19 +19546,20 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # @_test # name `:@_test` # - # source://prism/lib/prism/node.rb#9003 + # source://prism/lib/prism/node.rb#9040 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#9011 + # source://prism/lib/prism/node.rb#9048 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#9016 + # source://prism/lib/prism/node.rb#9053 def type; end end end @@ -17478,55 +19569,70 @@ end # @foo, @bar = baz # ^^^^ ^^^^ # -# source://prism/lib/prism/node.rb#9032 +# source://prism/lib/prism/node.rb#9069 class Prism::InstanceVariableTargetNode < ::Prism::Node # Initialize a new InstanceVariableTargetNode node. # # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode # - # source://prism/lib/prism/node.rb#9034 + # source://prism/lib/prism/node.rb#9071 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#9095 + # source://prism/lib/prism/node.rb#9132 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#9043 + # source://prism/lib/prism/node.rb#9080 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9048 + # source://prism/lib/prism/node.rb#9085 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#9058 + # source://prism/lib/prism/node.rb#9095 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#9053 + # source://prism/lib/prism/node.rb#9090 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableTargetNode # - # source://prism/lib/prism/node.rb#9063 + # source://prism/lib/prism/node.rb#9100 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9048 + # source://prism/lib/prism/node.rb#9085 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism/lib/prism/node.rb#9071 + # source://prism/lib/prism/node.rb#9108 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17534,25 +19640,26 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#9079 + # source://prism/lib/prism/node.rb#9116 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#9076 + # source://prism/lib/prism/node.rb#9113 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#9084 + # source://prism/lib/prism/node.rb#9121 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#9089 + # source://prism/lib/prism/node.rb#9126 def type; end end end @@ -17562,55 +19669,84 @@ end # @foo = 1 # ^^^^^^^^ # -# source://prism/lib/prism/node.rb#9105 +# source://prism/lib/prism/node.rb#9142 class Prism::InstanceVariableWriteNode < ::Prism::Node # Initialize a new InstanceVariableWriteNode node. # # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode # - # source://prism/lib/prism/node.rb#9107 + # source://prism/lib/prism/node.rb#9144 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#9209 + # source://prism/lib/prism/node.rb#9246 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#9119 + # source://prism/lib/prism/node.rb#9156 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9124 + # source://prism/lib/prism/node.rb#9161 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#9134 + # source://prism/lib/prism/node.rb#9171 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#9129 + # source://prism/lib/prism/node.rb#9166 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> InstanceVariableWriteNode # - # source://prism/lib/prism/node.rb#9139 + # source://prism/lib/prism/node.rb#9176 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9124 + # source://prism/lib/prism/node.rb#9161 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism/lib/prism/node.rb#9147 + # source://prism/lib/prism/node.rb#9184 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17618,7 +19754,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#9193 + # source://prism/lib/prism/node.rb#9230 sig { override.returns(String) } def inspect; end @@ -17628,7 +19764,8 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # @_foo = "bar" # name `@_foo` # - # source://prism/lib/prism/node.rb#9156 + # source://prism/lib/prism/node.rb#9193 + sig { returns(Symbol) } def name; end # The location of the variable name. @@ -17636,12 +19773,14 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1 # ^^^ # - # source://prism/lib/prism/node.rb#9162 + # source://prism/lib/prism/node.rb#9199 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#9188 + # source://prism/lib/prism/node.rb#9225 + sig { returns(String) } def operator; end # The location of the `=` operator. @@ -17649,12 +19788,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @x = y # ^ # - # source://prism/lib/prism/node.rb#9181 + # source://prism/lib/prism/node.rb#9218 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#9198 + # source://prism/lib/prism/node.rb#9235 sig { override.returns(Symbol) } def type; end @@ -17666,40 +19806,41 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1234 # ^^^^ # - # source://prism/lib/prism/node.rb#9175 + # source://prism/lib/prism/node.rb#9212 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#9203 + # source://prism/lib/prism/node.rb#9240 def type; end end end # Flags for integer nodes that correspond to the base of the integer. # -# source://prism/lib/prism/node.rb#16689 +# source://prism/lib/prism/node.rb#16732 module Prism::IntegerBaseFlags; end # 0b prefix # -# source://prism/lib/prism/node.rb#16691 +# source://prism/lib/prism/node.rb#16734 Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) # 0d or no prefix # -# source://prism/lib/prism/node.rb#16694 +# source://prism/lib/prism/node.rb#16737 Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) # 0x prefix # -# source://prism/lib/prism/node.rb#16700 +# source://prism/lib/prism/node.rb#16743 Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) # 0o or 0 prefix # -# source://prism/lib/prism/node.rb#16697 +# source://prism/lib/prism/node.rb#16740 Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # Represents an integer number literal. @@ -17707,13 +19848,13 @@ Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # 1 # ^ # -# source://prism/lib/prism/node.rb#9222 +# source://prism/lib/prism/node.rb#9259 class Prism::IntegerNode < ::Prism::Node # Initialize a new IntegerNode node. # # @return [IntegerNode] a new instance of IntegerNode # - # source://prism/lib/prism/node.rb#9224 + # source://prism/lib/prism/node.rb#9261 sig do params( source: Prism::Source, @@ -17728,12 +19869,12 @@ class Prism::IntegerNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#9305 + # source://prism/lib/prism/node.rb#9342 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#9233 + # source://prism/lib/prism/node.rb#9270 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -17741,31 +19882,31 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9266 + # source://prism/lib/prism/node.rb#9303 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9238 + # source://prism/lib/prism/node.rb#9275 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#9248 + # source://prism/lib/prism/node.rb#9285 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#9243 + # source://prism/lib/prism/node.rb#9280 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Integer) -> IntegerNode # - # source://prism/lib/prism/node.rb#9253 + # source://prism/lib/prism/node.rb#9290 sig do params( node_id: Integer, @@ -17780,20 +19921,20 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9271 + # source://prism/lib/prism/node.rb#9308 sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9238 + # source://prism/lib/prism/node.rb#9275 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Integer } # - # source://prism/lib/prism/node.rb#9261 + # source://prism/lib/prism/node.rb#9298 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17804,13 +19945,13 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9281 + # source://prism/lib/prism/node.rb#9318 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#9289 + # source://prism/lib/prism/node.rb#9326 sig { override.returns(String) } def inspect; end @@ -17818,26 +19959,26 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9276 + # source://prism/lib/prism/node.rb#9313 sig { returns(T::Boolean) } def octal?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#9294 + # source://prism/lib/prism/node.rb#9331 sig { override.returns(Symbol) } def type; end # The value of the integer literal as a number. # - # source://prism/lib/prism/node.rb#9286 + # source://prism/lib/prism/node.rb#9323 sig { returns(Integer) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#9299 + # source://prism/lib/prism/node.rb#9336 def type; end end end @@ -17847,7 +19988,7 @@ end # if /foo #{bar} baz/ then end # ^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#9316 +# source://prism/lib/prism/node.rb#9353 class Prism::InterpolatedMatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -17855,7 +19996,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode # - # source://prism/lib/prism/node.rb#9318 + # source://prism/lib/prism/node.rb#9355 sig do params( source: Prism::Source, @@ -17872,12 +20013,12 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#9460 + # source://prism/lib/prism/node.rb#9497 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#9329 + # source://prism/lib/prism/node.rb#9366 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -17885,43 +20026,43 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9387 + # source://prism/lib/prism/node.rb#9424 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9334 + # source://prism/lib/prism/node.rb#9371 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#9439 + # source://prism/lib/prism/node.rb#9476 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#9427 + # source://prism/lib/prism/node.rb#9464 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#9344 + # source://prism/lib/prism/node.rb#9381 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#9339 + # source://prism/lib/prism/node.rb#9376 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedMatchLastLineNode # - # source://prism/lib/prism/node.rb#9349 + # source://prism/lib/prism/node.rb#9386 sig do params( node_id: Integer, @@ -17937,13 +20078,13 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9334 + # source://prism/lib/prism/node.rb#9371 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism/lib/prism/node.rb#9357 + # source://prism/lib/prism/node.rb#9394 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17951,7 +20092,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9382 + # source://prism/lib/prism/node.rb#9419 sig { returns(T::Boolean) } def euc_jp?; end @@ -17959,7 +20100,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9367 + # source://prism/lib/prism/node.rb#9404 sig { returns(T::Boolean) } def extended?; end @@ -17970,7 +20111,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9407 + # source://prism/lib/prism/node.rb#9444 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -17978,7 +20119,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9412 + # source://prism/lib/prism/node.rb#9449 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -17986,7 +20127,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9402 + # source://prism/lib/prism/node.rb#9439 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -17994,13 +20135,13 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9362 + # source://prism/lib/prism/node.rb#9399 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#9444 + # source://prism/lib/prism/node.rb#9481 sig { override.returns(String) } def inspect; end @@ -18008,7 +20149,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9372 + # source://prism/lib/prism/node.rb#9409 sig { returns(T::Boolean) } def multi_line?; end @@ -18019,19 +20160,19 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9377 + # source://prism/lib/prism/node.rb#9414 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#9434 + # source://prism/lib/prism/node.rb#9471 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#9417 + # source://prism/lib/prism/node.rb#9454 sig { returns(Prism::Location) } def opening_loc; end @@ -18040,13 +20181,13 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism/lib/prism/node.rb#9424 + # source://prism/lib/prism/node.rb#9461 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#9449 + # source://prism/lib/prism/node.rb#9486 sig { override.returns(Symbol) } def type; end @@ -18054,7 +20195,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9397 + # source://prism/lib/prism/node.rb#9434 sig { returns(T::Boolean) } def utf_8?; end @@ -18062,14 +20203,14 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9392 + # source://prism/lib/prism/node.rb#9429 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#9454 + # source://prism/lib/prism/node.rb#9491 def type; end end end @@ -18079,7 +20220,7 @@ end # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#9474 +# source://prism/lib/prism/node.rb#9511 class Prism::InterpolatedRegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -18087,7 +20228,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode # - # source://prism/lib/prism/node.rb#9476 + # source://prism/lib/prism/node.rb#9513 sig do params( source: Prism::Source, @@ -18104,12 +20245,12 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#9618 + # source://prism/lib/prism/node.rb#9655 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#9487 + # source://prism/lib/prism/node.rb#9524 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -18117,43 +20258,43 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9545 + # source://prism/lib/prism/node.rb#9582 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9492 + # source://prism/lib/prism/node.rb#9529 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#9597 + # source://prism/lib/prism/node.rb#9634 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#9585 + # source://prism/lib/prism/node.rb#9622 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#9502 + # source://prism/lib/prism/node.rb#9539 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#9497 + # source://prism/lib/prism/node.rb#9534 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedRegularExpressionNode # - # source://prism/lib/prism/node.rb#9507 + # source://prism/lib/prism/node.rb#9544 sig do params( node_id: Integer, @@ -18169,13 +20310,13 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9492 + # source://prism/lib/prism/node.rb#9529 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism/lib/prism/node.rb#9515 + # source://prism/lib/prism/node.rb#9552 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18183,7 +20324,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9540 + # source://prism/lib/prism/node.rb#9577 sig { returns(T::Boolean) } def euc_jp?; end @@ -18191,7 +20332,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9525 + # source://prism/lib/prism/node.rb#9562 sig { returns(T::Boolean) } def extended?; end @@ -18202,7 +20343,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9565 + # source://prism/lib/prism/node.rb#9602 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -18210,7 +20351,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9570 + # source://prism/lib/prism/node.rb#9607 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -18218,7 +20359,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9560 + # source://prism/lib/prism/node.rb#9597 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -18226,13 +20367,13 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9520 + # source://prism/lib/prism/node.rb#9557 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#9602 + # source://prism/lib/prism/node.rb#9639 sig { override.returns(String) } def inspect; end @@ -18240,7 +20381,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9530 + # source://prism/lib/prism/node.rb#9567 sig { returns(T::Boolean) } def multi_line?; end @@ -18251,19 +20392,19 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9535 + # source://prism/lib/prism/node.rb#9572 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#9592 + # source://prism/lib/prism/node.rb#9629 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#9575 + # source://prism/lib/prism/node.rb#9612 sig { returns(Prism::Location) } def opening_loc; end @@ -18272,13 +20413,13 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism/lib/prism/node.rb#9582 + # source://prism/lib/prism/node.rb#9619 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#9607 + # source://prism/lib/prism/node.rb#9644 sig { override.returns(Symbol) } def type; end @@ -18286,7 +20427,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9555 + # source://prism/lib/prism/node.rb#9592 sig { returns(T::Boolean) } def utf_8?; end @@ -18294,14 +20435,14 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9550 + # source://prism/lib/prism/node.rb#9587 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#9612 + # source://prism/lib/prism/node.rb#9649 def type; end end end @@ -18311,7 +20452,7 @@ end # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#9632 +# source://prism/lib/prism/node.rb#9669 class Prism::InterpolatedStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -18319,7 +20460,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode # - # source://prism/lib/prism/node.rb#9634 + # source://prism/lib/prism/node.rb#9671 sig do params( source: Prism::Source, @@ -18336,48 +20477,48 @@ class Prism::InterpolatedStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#9743 + # source://prism/lib/prism/node.rb#9780 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#9645 + # source://prism/lib/prism/node.rb#9682 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9650 + # source://prism/lib/prism/node.rb#9687 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism/lib/prism/node.rb#9722 + # source://prism/lib/prism/node.rb#9759 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism/lib/prism/node.rb#9704 + # source://prism/lib/prism/node.rb#9741 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#9660 + # source://prism/lib/prism/node.rb#9697 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#9655 + # source://prism/lib/prism/node.rb#9692 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], ?closing_loc: Location?) -> InterpolatedStringNode # - # source://prism/lib/prism/node.rb#9665 + # source://prism/lib/prism/node.rb#9702 sig do params( node_id: Integer, @@ -18393,13 +20534,13 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9650 + # source://prism/lib/prism/node.rb#9687 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location? } # - # source://prism/lib/prism/node.rb#9673 + # source://prism/lib/prism/node.rb#9710 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18410,7 +20551,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9678 + # source://prism/lib/prism/node.rb#9715 sig { returns(T::Boolean) } def frozen?; end @@ -18419,7 +20560,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#9727 + # source://prism/lib/prism/node.rb#9764 sig { override.returns(String) } def inspect; end @@ -18427,7 +20568,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#9683 + # source://prism/lib/prism/node.rb#9720 sig { returns(T::Boolean) } def mutable?; end @@ -18436,19 +20577,19 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def opening: () -> String? # - # source://prism/lib/prism/node.rb#9717 + # source://prism/lib/prism/node.rb#9754 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism/lib/prism/node.rb#9688 + # source://prism/lib/prism/node.rb#9725 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] # - # source://prism/lib/prism/node.rb#9701 + # source://prism/lib/prism/node.rb#9738 sig do returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)]) end @@ -18456,27 +20597,27 @@ class Prism::InterpolatedStringNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#9732 + # source://prism/lib/prism/node.rb#9769 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#9737 + # source://prism/lib/prism/node.rb#9774 def type; end end end # Flags for interpolated string nodes that indicated mutability if they are also marked as literals. # -# source://prism/lib/prism/node.rb#16704 +# source://prism/lib/prism/node.rb#16747 module Prism::InterpolatedStringNodeFlags; end -# source://prism/lib/prism/node.rb#16706 +# source://prism/lib/prism/node.rb#16749 Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism/lib/prism/node.rb#16709 +# source://prism/lib/prism/node.rb#16752 Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a symbol literal that contains interpolation. @@ -18484,65 +20625,94 @@ Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # :"foo #{bar} baz" # ^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#9757 +# source://prism/lib/prism/node.rb#9794 class Prism::InterpolatedSymbolNode < ::Prism::Node # Initialize a new InterpolatedSymbolNode node. # # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode # - # source://prism/lib/prism/node.rb#9759 + # source://prism/lib/prism/node.rb#9796 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#9858 + # source://prism/lib/prism/node.rb#9895 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#9770 + # source://prism/lib/prism/node.rb#9807 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9775 + # source://prism/lib/prism/node.rb#9812 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism/lib/prism/node.rb#9837 + # source://prism/lib/prism/node.rb#9874 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism/lib/prism/node.rb#9819 + # source://prism/lib/prism/node.rb#9856 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#9785 + # source://prism/lib/prism/node.rb#9822 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#9780 + # source://prism/lib/prism/node.rb#9817 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?) -> InterpolatedSymbolNode # - # source://prism/lib/prism/node.rb#9790 + # source://prism/lib/prism/node.rb#9827 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedSymbolNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9775 + # source://prism/lib/prism/node.rb#9812 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location? } # - # source://prism/lib/prism/node.rb#9798 + # source://prism/lib/prism/node.rb#9835 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18550,7 +20720,7 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#9842 + # source://prism/lib/prism/node.rb#9879 sig { override.returns(String) } def inspect; end @@ -18559,29 +20729,32 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # def opening: () -> String? # - # source://prism/lib/prism/node.rb#9832 + # source://prism/lib/prism/node.rb#9869 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism/lib/prism/node.rb#9803 + # source://prism/lib/prism/node.rb#9840 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism/lib/prism/node.rb#9816 + # source://prism/lib/prism/node.rb#9853 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#9847 + # source://prism/lib/prism/node.rb#9884 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#9852 + # source://prism/lib/prism/node.rb#9889 def type; end end end @@ -18591,7 +20764,7 @@ end # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#9871 +# source://prism/lib/prism/node.rb#9908 class Prism::InterpolatedXStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -18599,59 +20772,88 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode # - # source://prism/lib/prism/node.rb#9873 + # source://prism/lib/prism/node.rb#9910 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#9960 + # source://prism/lib/prism/node.rb#9997 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#9884 + # source://prism/lib/prism/node.rb#9921 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9889 + # source://prism/lib/prism/node.rb#9926 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#9939 + # source://prism/lib/prism/node.rb#9976 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#9927 + # source://prism/lib/prism/node.rb#9964 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#9899 + # source://prism/lib/prism/node.rb#9936 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#9894 + # source://prism/lib/prism/node.rb#9931 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedXStringNode # - # source://prism/lib/prism/node.rb#9904 + # source://prism/lib/prism/node.rb#9941 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9889 + # source://prism/lib/prism/node.rb#9926 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # - # source://prism/lib/prism/node.rb#9912 + # source://prism/lib/prism/node.rb#9949 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18662,7 +20864,7 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#9944 + # source://prism/lib/prism/node.rb#9981 sig { override.returns(String) } def inspect; end @@ -18671,29 +20873,32 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def opening: () -> String # - # source://prism/lib/prism/node.rb#9934 + # source://prism/lib/prism/node.rb#9971 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#9917 + # source://prism/lib/prism/node.rb#9954 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism/lib/prism/node.rb#9924 + # source://prism/lib/prism/node.rb#9961 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#9949 + # source://prism/lib/prism/node.rb#9986 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#9954 + # source://prism/lib/prism/node.rb#9991 def type; end end end @@ -18703,55 +20908,63 @@ end # -> { it } # ^^ # -# source://prism/lib/prism/node.rb#9973 +# source://prism/lib/prism/node.rb#10010 class Prism::ItLocalVariableReadNode < ::Prism::Node # Initialize a new ItLocalVariableReadNode node. # # @return [ItLocalVariableReadNode] a new instance of ItLocalVariableReadNode # - # source://prism/lib/prism/node.rb#9975 + # source://prism/lib/prism/node.rb#10012 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#10032 + # source://prism/lib/prism/node.rb#10069 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#9983 + # source://prism/lib/prism/node.rb#10020 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9988 + # source://prism/lib/prism/node.rb#10025 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#9998 + # source://prism/lib/prism/node.rb#10035 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#9993 + # source://prism/lib/prism/node.rb#10030 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItLocalVariableReadNode # - # source://prism/lib/prism/node.rb#10003 + # source://prism/lib/prism/node.rb#10040 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItLocalVariableReadNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#9988 + # source://prism/lib/prism/node.rb#10025 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#10011 + # source://prism/lib/prism/node.rb#10048 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18759,20 +20972,20 @@ class Prism::ItLocalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#10016 + # source://prism/lib/prism/node.rb#10053 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#10021 + # source://prism/lib/prism/node.rb#10058 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#10026 + # source://prism/lib/prism/node.rb#10063 def type; end end end @@ -18782,55 +20995,63 @@ end # -> { it + it } # ^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#10041 +# source://prism/lib/prism/node.rb#10078 class Prism::ItParametersNode < ::Prism::Node # Initialize a new ItParametersNode node. # # @return [ItParametersNode] a new instance of ItParametersNode # - # source://prism/lib/prism/node.rb#10043 + # source://prism/lib/prism/node.rb#10080 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#10100 + # source://prism/lib/prism/node.rb#10137 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#10051 + # source://prism/lib/prism/node.rb#10088 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10056 + # source://prism/lib/prism/node.rb#10093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#10066 + # source://prism/lib/prism/node.rb#10103 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#10061 + # source://prism/lib/prism/node.rb#10098 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItParametersNode # - # source://prism/lib/prism/node.rb#10071 + # source://prism/lib/prism/node.rb#10108 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItParametersNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10056 + # source://prism/lib/prism/node.rb#10093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#10079 + # source://prism/lib/prism/node.rb#10116 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18838,20 +21059,20 @@ class Prism::ItParametersNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#10084 + # source://prism/lib/prism/node.rb#10121 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#10089 + # source://prism/lib/prism/node.rb#10126 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#10094 + # source://prism/lib/prism/node.rb#10131 def type; end end end @@ -18861,13 +21082,13 @@ end # foo(a: b) # ^^^^ # -# source://prism/lib/prism/node.rb#10109 +# source://prism/lib/prism/node.rb#10146 class Prism::KeywordHashNode < ::Prism::Node # Initialize a new KeywordHashNode node. # # @return [KeywordHashNode] a new instance of KeywordHashNode # - # source://prism/lib/prism/node.rb#10111 + # source://prism/lib/prism/node.rb#10148 sig do params( source: Prism::Source, @@ -18882,36 +21103,36 @@ class Prism::KeywordHashNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#10177 + # source://prism/lib/prism/node.rb#10214 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#10120 + # source://prism/lib/prism/node.rb#10157 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10125 + # source://prism/lib/prism/node.rb#10162 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#10135 + # source://prism/lib/prism/node.rb#10172 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#10130 + # source://prism/lib/prism/node.rb#10167 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode]) -> KeywordHashNode # - # source://prism/lib/prism/node.rb#10140 + # source://prism/lib/prism/node.rb#10177 sig do params( node_id: Integer, @@ -18925,19 +21146,19 @@ class Prism::KeywordHashNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10125 + # source://prism/lib/prism/node.rb#10162 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[AssocNode | AssocSplatNode] } # - # source://prism/lib/prism/node.rb#10148 + # source://prism/lib/prism/node.rb#10185 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader elements: Array[AssocNode | AssocSplatNode] # - # source://prism/lib/prism/node.rb#10158 + # source://prism/lib/prism/node.rb#10195 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end @@ -18946,7 +21167,7 @@ class Prism::KeywordHashNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#10161 + # source://prism/lib/prism/node.rb#10198 sig { override.returns(String) } def inspect; end @@ -18954,32 +21175,32 @@ class Prism::KeywordHashNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#10153 + # source://prism/lib/prism/node.rb#10190 sig { returns(T::Boolean) } def symbol_keys?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#10166 + # source://prism/lib/prism/node.rb#10203 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#10171 + # source://prism/lib/prism/node.rb#10208 def type; end end end # Flags for keyword hash nodes. # -# source://prism/lib/prism/node.rb#16713 +# source://prism/lib/prism/node.rb#16756 module Prism::KeywordHashNodeFlags; end # a keyword hash which only has `AssocNode` elements all with symbol keys, which means the elements can be treated as keyword arguments # -# source://prism/lib/prism/node.rb#16715 +# source://prism/lib/prism/node.rb#16758 Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # Represents a keyword rest parameter to a method, block, or lambda definition. @@ -18988,13 +21209,13 @@ Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # ^^^ # end # -# source://prism/lib/prism/node.rb#10190 +# source://prism/lib/prism/node.rb#10227 class Prism::KeywordRestParameterNode < ::Prism::Node # Initialize a new KeywordRestParameterNode node. # # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode # - # source://prism/lib/prism/node.rb#10192 + # source://prism/lib/prism/node.rb#10229 sig do params( source: Prism::Source, @@ -19011,36 +21232,36 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#10285 + # source://prism/lib/prism/node.rb#10322 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#10203 + # source://prism/lib/prism/node.rb#10240 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10208 + # source://prism/lib/prism/node.rb#10245 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#10218 + # source://prism/lib/prism/node.rb#10255 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#10213 + # source://prism/lib/prism/node.rb#10250 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> KeywordRestParameterNode # - # source://prism/lib/prism/node.rb#10223 + # source://prism/lib/prism/node.rb#10260 sig do params( node_id: Integer, @@ -19056,13 +21277,13 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10208 + # source://prism/lib/prism/node.rb#10245 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism/lib/prism/node.rb#10231 + # source://prism/lib/prism/node.rb#10268 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19071,31 +21292,31 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#10269 + # source://prism/lib/prism/node.rb#10306 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism/lib/prism/node.rb#10241 + # source://prism/lib/prism/node.rb#10278 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism/lib/prism/node.rb#10244 + # source://prism/lib/prism/node.rb#10281 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#10264 + # source://prism/lib/prism/node.rb#10301 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#10257 + # source://prism/lib/prism/node.rb#10294 sig { returns(Prism::Location) } def operator_loc; end @@ -19103,20 +21324,20 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#10236 + # source://prism/lib/prism/node.rb#10273 sig { returns(T::Boolean) } def repeated_parameter?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#10274 + # source://prism/lib/prism/node.rb#10311 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#10279 + # source://prism/lib/prism/node.rb#10316 def type; end end end @@ -19126,70 +21347,106 @@ end # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#10298 +# source://prism/lib/prism/node.rb#10335 class Prism::LambdaNode < ::Prism::Node # Initialize a new LambdaNode node. # # @return [LambdaNode] a new instance of LambdaNode # - # source://prism/lib/prism/node.rb#10300 + # source://prism/lib/prism/node.rb#10337 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).void + end def initialize(source, node_id, location, flags, locals, operator_loc, opening_loc, closing_loc, parameters, body); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#10411 + # source://prism/lib/prism/node.rb#10448 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#10314 + # source://prism/lib/prism/node.rb#10351 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism/lib/prism/node.rb#10377 + # source://prism/lib/prism/node.rb#10414 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10319 + # source://prism/lib/prism/node.rb#10356 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#10390 + # source://prism/lib/prism/node.rb#10427 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#10367 + # source://prism/lib/prism/node.rb#10404 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#10332 + # source://prism/lib/prism/node.rb#10369 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#10324 + # source://prism/lib/prism/node.rb#10361 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: Prism::node?, ?body: Prism::node?) -> LambdaNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil) -> LambdaNode # - # source://prism/lib/prism/node.rb#10337 + # source://prism/lib/prism/node.rb#10374 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).returns(Prism::LambdaNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10319 + # source://prism/lib/prism/node.rb#10356 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Prism::node?, body: Prism::node? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil } # - # source://prism/lib/prism/node.rb#10345 + # source://prism/lib/prism/node.rb#10382 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -19197,50 +21454,56 @@ class Prism::LambdaNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#10395 + # source://prism/lib/prism/node.rb#10432 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism/lib/prism/node.rb#10350 + # source://prism/lib/prism/node.rb#10387 + sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#10385 + # source://prism/lib/prism/node.rb#10422 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#10360 + # source://prism/lib/prism/node.rb#10397 + sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#10380 + # source://prism/lib/prism/node.rb#10417 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#10353 + # source://prism/lib/prism/node.rb#10390 + sig { returns(Prism::Location) } def operator_loc; end - # attr_reader parameters: Prism::node? + # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil # - # source://prism/lib/prism/node.rb#10374 + # source://prism/lib/prism/node.rb#10411 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#10400 + # source://prism/lib/prism/node.rb#10437 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#10405 + # source://prism/lib/prism/node.rb#10442 def type; end end end @@ -19496,13 +21759,13 @@ end # This is a result specific to the `lex` and `lex_file` methods. # -# source://prism/lib/prism/parse_result.rb#627 +# source://prism/lib/prism/parse_result.rb#764 class Prism::LexResult < ::Prism::Result # Create a new lex result object with the given values. # # @return [LexResult] a new instance of LexResult # - # source://prism/lib/prism/parse_result.rb#632 + # source://prism/lib/prism/parse_result.rb#769 sig do params( value: T::Array[T.untyped], @@ -19518,13 +21781,13 @@ class Prism::LexResult < ::Prism::Result # Implement the hash pattern matching interface for LexResult. # - # source://prism/lib/prism/parse_result.rb#638 + # source://prism/lib/prism/parse_result.rb#775 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The list of tokens that were parsed from the source code. # - # source://prism/lib/prism/parse_result.rb#629 + # source://prism/lib/prism/parse_result.rb#766 sig { returns(T::Array[T.untyped]) } def value; end end @@ -19556,60 +21819,92 @@ end # target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#10427 +# source://prism/lib/prism/node.rb#10464 class Prism::LocalVariableAndWriteNode < ::Prism::Node # Initialize a new LocalVariableAndWriteNode node. # # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode # - # source://prism/lib/prism/node.rb#10429 + # source://prism/lib/prism/node.rb#10466 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).void + end def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#10519 + # source://prism/lib/prism/node.rb#10556 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#10442 + # source://prism/lib/prism/node.rb#10479 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10447 + # source://prism/lib/prism/node.rb#10484 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#10457 + # source://prism/lib/prism/node.rb#10494 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#10452 + # source://prism/lib/prism/node.rb#10489 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableAndWriteNode # - # source://prism/lib/prism/node.rb#10462 + # source://prism/lib/prism/node.rb#10499 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableAndWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10447 + # source://prism/lib/prism/node.rb#10484 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } # - # source://prism/lib/prism/node.rb#10470 + # source://prism/lib/prism/node.rb#10507 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism/lib/prism/node.rb#10495 + # source://prism/lib/prism/node.rb#10532 + sig { returns(Integer) } def depth; end # source://prism/lib/prism/desugar_compiler.rb#236 @@ -19620,45 +21915,50 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#10503 + # source://prism/lib/prism/node.rb#10540 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#10492 + # source://prism/lib/prism/node.rb#10529 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#10475 + # source://prism/lib/prism/node.rb#10512 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#10498 + # source://prism/lib/prism/node.rb#10535 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#10482 + # source://prism/lib/prism/node.rb#10519 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#10508 + # source://prism/lib/prism/node.rb#10545 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#10489 + # source://prism/lib/prism/node.rb#10526 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#10513 + # source://prism/lib/prism/node.rb#10550 def type; end end end @@ -19668,70 +21968,106 @@ end # target += value # ^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#10533 +# source://prism/lib/prism/node.rb#10570 class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # Initialize a new LocalVariableOperatorWriteNode node. # # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode # - # source://prism/lib/prism/node.rb#10535 + # source://prism/lib/prism/node.rb#10572 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).void + end def initialize(source, node_id, location, flags, name_loc, binary_operator_loc, value, name, binary_operator, depth); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#10624 + # source://prism/lib/prism/node.rb#10661 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#10549 + # source://prism/lib/prism/node.rb#10586 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism/lib/prism/node.rb#10602 + # source://prism/lib/prism/node.rb#10639 + sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism/lib/prism/node.rb#10589 + # source://prism/lib/prism/node.rb#10626 + sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10554 + # source://prism/lib/prism/node.rb#10591 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#10564 + # source://prism/lib/prism/node.rb#10601 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#10559 + # source://prism/lib/prism/node.rb#10596 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer) -> LocalVariableOperatorWriteNode # - # source://prism/lib/prism/node.rb#10569 + # source://prism/lib/prism/node.rb#10606 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOperatorWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10554 + # source://prism/lib/prism/node.rb#10591 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer } # - # source://prism/lib/prism/node.rb#10577 + # source://prism/lib/prism/node.rb#10614 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism/lib/prism/node.rb#10605 + # source://prism/lib/prism/node.rb#10642 + sig { returns(Integer) } def depth; end # source://prism/lib/prism/desugar_compiler.rb#248 @@ -19742,18 +22078,20 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#10608 + # source://prism/lib/prism/node.rb#10645 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#10599 + # source://prism/lib/prism/node.rb#10636 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#10582 + # source://prism/lib/prism/node.rb#10619 + sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is @@ -19770,19 +22108,20 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#10613 + # source://prism/lib/prism/node.rb#10650 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#10596 + # source://prism/lib/prism/node.rb#10633 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#10618 + # source://prism/lib/prism/node.rb#10655 def type; end end end @@ -19792,60 +22131,92 @@ end # target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#10639 +# source://prism/lib/prism/node.rb#10676 class Prism::LocalVariableOrWriteNode < ::Prism::Node # Initialize a new LocalVariableOrWriteNode node. # # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode # - # source://prism/lib/prism/node.rb#10641 + # source://prism/lib/prism/node.rb#10678 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).void + end def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#10731 + # source://prism/lib/prism/node.rb#10768 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#10654 + # source://prism/lib/prism/node.rb#10691 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10659 + # source://prism/lib/prism/node.rb#10696 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#10669 + # source://prism/lib/prism/node.rb#10706 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#10664 + # source://prism/lib/prism/node.rb#10701 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableOrWriteNode # - # source://prism/lib/prism/node.rb#10674 + # source://prism/lib/prism/node.rb#10711 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOrWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10659 + # source://prism/lib/prism/node.rb#10696 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } # - # source://prism/lib/prism/node.rb#10682 + # source://prism/lib/prism/node.rb#10719 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism/lib/prism/node.rb#10707 + # source://prism/lib/prism/node.rb#10744 + sig { returns(Integer) } def depth; end # source://prism/lib/prism/desugar_compiler.rb#242 @@ -19856,45 +22227,50 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#10715 + # source://prism/lib/prism/node.rb#10752 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#10704 + # source://prism/lib/prism/node.rb#10741 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#10687 + # source://prism/lib/prism/node.rb#10724 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#10710 + # source://prism/lib/prism/node.rb#10747 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#10694 + # source://prism/lib/prism/node.rb#10731 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#10720 + # source://prism/lib/prism/node.rb#10757 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#10701 + # source://prism/lib/prism/node.rb#10738 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#10725 + # source://prism/lib/prism/node.rb#10762 def type; end end end @@ -19904,55 +22280,80 @@ end # foo # ^^^ # -# source://prism/lib/prism/node.rb#10745 +# source://prism/lib/prism/node.rb#10782 class Prism::LocalVariableReadNode < ::Prism::Node # Initialize a new LocalVariableReadNode node. # # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode # - # source://prism/lib/prism/node.rb#10747 + # source://prism/lib/prism/node.rb#10784 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end def initialize(source, node_id, location, flags, name, depth); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#10826 + # source://prism/lib/prism/node.rb#10863 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#10757 + # source://prism/lib/prism/node.rb#10794 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10762 + # source://prism/lib/prism/node.rb#10799 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#10772 + # source://prism/lib/prism/node.rb#10809 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#10767 + # source://prism/lib/prism/node.rb#10804 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableReadNode # - # source://prism/lib/prism/node.rb#10777 + # source://prism/lib/prism/node.rb#10814 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10762 + # source://prism/lib/prism/node.rb#10799 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # - # source://prism/lib/prism/node.rb#10785 + # source://prism/lib/prism/node.rb#10822 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The number of visible scopes that should be searched to find the origin of this local variable. @@ -19963,7 +22364,8 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). # - # source://prism/lib/prism/node.rb#10807 + # source://prism/lib/prism/node.rb#10844 + sig { returns(Integer) } def depth; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -19971,7 +22373,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#10810 + # source://prism/lib/prism/node.rb#10847 sig { override.returns(String) } def inspect; end @@ -19985,19 +22387,20 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # _1 # name `:_1` # - # source://prism/lib/prism/node.rb#10798 + # source://prism/lib/prism/node.rb#10835 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#10815 + # source://prism/lib/prism/node.rb#10852 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#10820 + # source://prism/lib/prism/node.rb#10857 def type; end end end @@ -20007,60 +22410,86 @@ end # foo, bar = baz # ^^^ ^^^ # -# source://prism/lib/prism/node.rb#10837 +# source://prism/lib/prism/node.rb#10874 class Prism::LocalVariableTargetNode < ::Prism::Node # Initialize a new LocalVariableTargetNode node. # # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode # - # source://prism/lib/prism/node.rb#10839 + # source://prism/lib/prism/node.rb#10876 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end def initialize(source, node_id, location, flags, name, depth); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#10904 + # source://prism/lib/prism/node.rb#10941 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#10849 + # source://prism/lib/prism/node.rb#10886 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10854 + # source://prism/lib/prism/node.rb#10891 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#10864 + # source://prism/lib/prism/node.rb#10901 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#10859 + # source://prism/lib/prism/node.rb#10896 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableTargetNode # - # source://prism/lib/prism/node.rb#10869 + # source://prism/lib/prism/node.rb#10906 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10854 + # source://prism/lib/prism/node.rb#10891 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # - # source://prism/lib/prism/node.rb#10877 + # source://prism/lib/prism/node.rb#10914 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # - # source://prism/lib/prism/node.rb#10885 + # source://prism/lib/prism/node.rb#10922 + sig { returns(Integer) } def depth; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20068,25 +22497,26 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#10888 + # source://prism/lib/prism/node.rb#10925 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#10882 + # source://prism/lib/prism/node.rb#10919 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#10893 + # source://prism/lib/prism/node.rb#10930 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#10898 + # source://prism/lib/prism/node.rb#10935 def type; end end end @@ -20096,55 +22526,86 @@ end # foo = 1 # ^^^^^^^ # -# source://prism/lib/prism/node.rb#10915 +# source://prism/lib/prism/node.rb#10952 class Prism::LocalVariableWriteNode < ::Prism::Node # Initialize a new LocalVariableWriteNode node. # # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode # - # source://prism/lib/prism/node.rb#10917 + # source://prism/lib/prism/node.rb#10954 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, name, depth, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#11033 + # source://prism/lib/prism/node.rb#11070 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#10930 + # source://prism/lib/prism/node.rb#10967 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10935 + # source://prism/lib/prism/node.rb#10972 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#10945 + # source://prism/lib/prism/node.rb#10982 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#10940 + # source://prism/lib/prism/node.rb#10977 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> LocalVariableWriteNode # - # source://prism/lib/prism/node.rb#10950 + # source://prism/lib/prism/node.rb#10987 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#10935 + # source://prism/lib/prism/node.rb#10972 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location } # - # source://prism/lib/prism/node.rb#10958 + # source://prism/lib/prism/node.rb#10995 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The number of semantic scopes we have to traverse to find the declaration of this variable. @@ -20155,7 +22616,8 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # The specific rules for calculating the depth may differ from individual Ruby implementations, as they are not specified by the language. For more information, see [the Prism documentation](https://github.com/ruby/prism/blob/main/docs/local_variable_depth.md). # - # source://prism/lib/prism/node.rb#10976 + # source://prism/lib/prism/node.rb#11013 + sig { returns(Integer) } def depth; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20163,7 +22625,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#11017 + # source://prism/lib/prism/node.rb#11054 sig { override.returns(String) } def inspect; end @@ -20173,7 +22635,8 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # abc = 123 # name `:abc` # - # source://prism/lib/prism/node.rb#10967 + # source://prism/lib/prism/node.rb#11004 + sig { returns(Symbol) } def name; end # The location of the variable name. @@ -20181,12 +22644,14 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # foo = :bar # ^^^ # - # source://prism/lib/prism/node.rb#10982 + # source://prism/lib/prism/node.rb#11019 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#11012 + # source://prism/lib/prism/node.rb#11049 + sig { returns(String) } def operator; end # The location of the `=` operator. @@ -20194,12 +22659,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # x = :y # ^ # - # source://prism/lib/prism/node.rb#11005 + # source://prism/lib/prism/node.rb#11042 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#11022 + # source://prism/lib/prism/node.rb#11059 sig { override.returns(Symbol) } def type; end @@ -20215,33 +22681,34 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # foo = foo # - # source://prism/lib/prism/node.rb#10999 + # source://prism/lib/prism/node.rb#11036 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#11027 + # source://prism/lib/prism/node.rb#11064 def type; end end end # This represents a location in the source. # -# source://prism/lib/prism/parse_result.rb#165 +# source://prism/lib/prism/parse_result.rb#273 class Prism::Location # Create a new location object with the given source, start byte offset, and # byte length. # # @return [Location] a new instance of Location # - # source://prism/lib/prism/parse_result.rb#180 + # source://prism/lib/prism/parse_result.rb#288 sig { params(source: Prism::Source, start_offset: Integer, length: Integer).void } def initialize(source, start_offset, length); end # Returns true if the given other location is equal to this location. # - # source://prism/lib/prism/parse_result.rb#344 + # source://prism/lib/prism/parse_result.rb#476 sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end @@ -20249,84 +22716,128 @@ class Prism::Location # that occurs after this location on the same line, and return the new # location. This will raise an error if the string does not exist. # - # source://prism/lib/prism/parse_result.rb#363 + # source://prism/lib/prism/parse_result.rb#495 sig { params(string: String).returns(Prism::Location) } def adjoin(string); end + # The end column in code units using the given cache to fetch or calculate + # the value. + # + # source://prism/lib/prism/parse_result.rb#461 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_column(cache); end + + # The end offset from the start of the file in code units using the given + # cache to fetch or calculate the value. + # + # source://prism/lib/prism/parse_result.rb#397 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_offset(cache); end + + # The start column in code units using the given cache to fetch or calculate + # the value. + # + # source://prism/lib/prism/parse_result.rb#437 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_column(cache); end + + # The start offset from the start of the file in code units using the given + # cache to fetch or calculate the value. + # + # source://prism/lib/prism/parse_result.rb#375 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_offset(cache); end + # Returns a new location that is the result of chopping off the last byte. # - # source://prism/lib/prism/parse_result.rb#226 + # source://prism/lib/prism/parse_result.rb#334 sig { returns(Prism::Location) } def chop; end # Returns all comments that are associated with this location (both leading # and trailing comments). # - # source://prism/lib/prism/parse_result.rb#216 + # source://prism/lib/prism/parse_result.rb#324 sig { returns(T::Array[Prism::Comment]) } def comments; end # Create a new location object with the given options. # - # source://prism/lib/prism/parse_result.rb#221 + # source://prism/lib/prism/parse_result.rb#329 sig { params(source: Prism::Source, start_offset: Integer, length: Integer).returns(Prism::Location) } def copy(source: T.unsafe(nil), start_offset: T.unsafe(nil), length: T.unsafe(nil)); end # Implement the hash pattern matching interface for Location. # - # source://prism/lib/prism/parse_result.rb#334 + # source://prism/lib/prism/parse_result.rb#466 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The column number in characters where this location ends from the start of # the line. # - # source://prism/lib/prism/parse_result.rb#323 + # source://prism/lib/prism/parse_result.rb#449 sig { returns(Integer) } def end_character_column; end # The character offset from the beginning of the source where this location # ends. # - # source://prism/lib/prism/parse_result.rb#272 + # source://prism/lib/prism/parse_result.rb#386 sig { returns(Integer) } def end_character_offset; end # The column number in code units of the given encoding where this location # ends from the start of the line. # - # source://prism/lib/prism/parse_result.rb#329 + # source://prism/lib/prism/parse_result.rb#455 sig { params(encoding: Encoding).returns(Integer) } def end_code_units_column(encoding = T.unsafe(nil)); end # The offset from the start of the file in code units of the given encoding. # - # source://prism/lib/prism/parse_result.rb#277 + # source://prism/lib/prism/parse_result.rb#391 sig { params(encoding: Encoding).returns(Integer) } def end_code_units_offset(encoding = T.unsafe(nil)); end # The column number in bytes where this location ends from the start of the # line. # - # source://prism/lib/prism/parse_result.rb#317 + # source://prism/lib/prism/parse_result.rb#443 sig { returns(Integer) } def end_column; end # The line number where this location ends. # - # source://prism/lib/prism/parse_result.rb#293 + # source://prism/lib/prism/parse_result.rb#413 sig { returns(Integer) } def end_line; end # The byte offset from the beginning of the source where this location ends. # - # source://prism/lib/prism/parse_result.rb#266 + # source://prism/lib/prism/parse_result.rb#380 sig { returns(Integer) } def end_offset; end # Returns a string representation of this location. # - # source://prism/lib/prism/parse_result.rb#231 + # source://prism/lib/prism/parse_result.rb#339 sig { returns(String) } def inspect; end @@ -20334,38 +22845,38 @@ class Prism::Location # other location. Raises an error if this location is not before the other # location or if they don't share the same source. # - # source://prism/lib/prism/parse_result.rb#353 + # source://prism/lib/prism/parse_result.rb#485 sig { params(other: Prism::Location).returns(Prism::Location) } def join(other); end # Attach a comment to the leading comments of this location. # - # source://prism/lib/prism/parse_result.rb#199 + # source://prism/lib/prism/parse_result.rb#307 sig { params(comment: Prism::Comment).void } def leading_comment(comment); end # These are the comments that are associated with this location that exist # before the start of this location. # - # source://prism/lib/prism/parse_result.rb#194 + # source://prism/lib/prism/parse_result.rb#302 sig { returns(T::Array[Prism::Comment]) } def leading_comments; end # The length of this location in bytes. # - # source://prism/lib/prism/parse_result.rb#176 + # source://prism/lib/prism/parse_result.rb#284 sig { returns(Integer) } def length; end # Implement the pretty print interface for Location. # - # source://prism/lib/prism/parse_result.rb#339 + # source://prism/lib/prism/parse_result.rb#471 sig { params(q: T.untyped).void } def pretty_print(q); end # The source code that this location represents. # - # source://prism/lib/prism/parse_result.rb#241 + # source://prism/lib/prism/parse_result.rb#349 sig { returns(String) } def slice; end @@ -20373,78 +22884,78 @@ class Prism::Location # of the line that this location starts on to the end of the line that this # location ends on. # - # source://prism/lib/prism/parse_result.rb#248 + # source://prism/lib/prism/parse_result.rb#356 def slice_lines; end # Returns all of the lines of the source code associated with this location. # - # source://prism/lib/prism/parse_result.rb#236 + # source://prism/lib/prism/parse_result.rb#344 sig { returns(T::Array[String]) } def source_lines; end # The column number in characters where this location ends from the start of # the line. # - # source://prism/lib/prism/parse_result.rb#305 + # source://prism/lib/prism/parse_result.rb#425 sig { returns(Integer) } def start_character_column; end # The character offset from the beginning of the source where this location # starts. # - # source://prism/lib/prism/parse_result.rb#256 + # source://prism/lib/prism/parse_result.rb#364 sig { returns(Integer) } def start_character_offset; end # The column number in code units of the given encoding where this location # starts from the start of the line. # - # source://prism/lib/prism/parse_result.rb#311 + # source://prism/lib/prism/parse_result.rb#431 sig { params(encoding: Encoding).returns(Integer) } def start_code_units_column(encoding = T.unsafe(nil)); end # The offset from the start of the file in code units of the given encoding. # - # source://prism/lib/prism/parse_result.rb#261 + # source://prism/lib/prism/parse_result.rb#369 sig { params(encoding: Encoding).returns(Integer) } def start_code_units_offset(encoding = T.unsafe(nil)); end # The column number in bytes where this location starts from the start of # the line. # - # source://prism/lib/prism/parse_result.rb#299 + # source://prism/lib/prism/parse_result.rb#419 sig { returns(Integer) } def start_column; end # The line number where this location starts. # - # source://prism/lib/prism/parse_result.rb#282 + # source://prism/lib/prism/parse_result.rb#402 sig { returns(Integer) } def start_line; end # The content of the line where this location starts before this location. # - # source://prism/lib/prism/parse_result.rb#287 + # source://prism/lib/prism/parse_result.rb#407 sig { returns(String) } def start_line_slice; end # The byte offset from the beginning of the source where this location # starts. # - # source://prism/lib/prism/parse_result.rb#173 + # source://prism/lib/prism/parse_result.rb#281 sig { returns(Integer) } def start_offset; end # Attach a comment to the trailing comments of this location. # - # source://prism/lib/prism/parse_result.rb#210 + # source://prism/lib/prism/parse_result.rb#318 sig { params(comment: Prism::Comment).void } def trailing_comment(comment); end # These are the comments that are associated with this location that exist # after the end of this location. # - # source://prism/lib/prism/parse_result.rb#205 + # source://prism/lib/prism/parse_result.rb#313 sig { returns(T::Array[Prism::Comment]) } def trailing_comments; end @@ -20453,66 +22964,66 @@ class Prism::Location # A Source object that is used to determine more information from the given # offset and length. # - # source://prism/lib/prism/parse_result.rb#168 + # source://prism/lib/prism/parse_result.rb#276 sig { returns(Prism::Source) } def source; end end # Flags for while and until loop nodes. # -# source://prism/lib/prism/node.rb#16719 +# source://prism/lib/prism/node.rb#16762 module Prism::LoopFlags; end # a loop after a begin statement, so the body is executed first before the condition # -# source://prism/lib/prism/node.rb#16721 +# source://prism/lib/prism/node.rb#16764 Prism::LoopFlags::BEGIN_MODIFIER = T.let(T.unsafe(nil), Integer) # This represents a magic comment that was encountered during parsing. # -# source://prism/lib/prism/parse_result.rb#425 +# source://prism/lib/prism/parse_result.rb#557 class Prism::MagicComment # Create a new magic comment object with the given key and value locations. # # @return [MagicComment] a new instance of MagicComment # - # source://prism/lib/prism/parse_result.rb#433 + # source://prism/lib/prism/parse_result.rb#565 sig { params(key_loc: Prism::Location, value_loc: Prism::Location).void } def initialize(key_loc, value_loc); end # Implement the hash pattern matching interface for MagicComment. # - # source://prism/lib/prism/parse_result.rb#449 + # source://prism/lib/prism/parse_result.rb#581 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this magic comment. # - # source://prism/lib/prism/parse_result.rb#454 + # source://prism/lib/prism/parse_result.rb#586 sig { returns(String) } def inspect; end # Returns the key of the magic comment by slicing it from the source code. # - # source://prism/lib/prism/parse_result.rb#439 + # source://prism/lib/prism/parse_result.rb#571 sig { returns(String) } def key; end # A Location object representing the location of the key in the source. # - # source://prism/lib/prism/parse_result.rb#427 + # source://prism/lib/prism/parse_result.rb#559 sig { returns(Prism::Location) } def key_loc; end # Returns the value of the magic comment by slicing it from the source code. # - # source://prism/lib/prism/parse_result.rb#444 + # source://prism/lib/prism/parse_result.rb#576 sig { returns(String) } def value; end # A Location object representing the location of the value in the source. # - # source://prism/lib/prism/parse_result.rb#430 + # source://prism/lib/prism/parse_result.rb#562 sig { returns(Prism::Location) } def value_loc; end end @@ -20522,7 +23033,7 @@ end # if /foo/i then end # ^^^^^^ # -# source://prism/lib/prism/node.rb#11047 +# source://prism/lib/prism/node.rb#11084 class Prism::MatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -20530,7 +23041,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [MatchLastLineNode] a new instance of MatchLastLineNode # - # source://prism/lib/prism/node.rb#11049 + # source://prism/lib/prism/node.rb#11086 sig do params( source: Prism::Source, @@ -20548,12 +23059,12 @@ class Prism::MatchLastLineNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#11204 + # source://prism/lib/prism/node.rb#11241 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#11061 + # source://prism/lib/prism/node.rb#11098 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -20561,55 +23072,55 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#11119 + # source://prism/lib/prism/node.rb#11156 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11066 + # source://prism/lib/prism/node.rb#11103 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#11183 + # source://prism/lib/prism/node.rb#11220 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#11163 + # source://prism/lib/prism/node.rb#11200 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#11076 + # source://prism/lib/prism/node.rb#11113 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#11071 + # source://prism/lib/prism/node.rb#11108 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism/lib/prism/node.rb#11178 + # source://prism/lib/prism/node.rb#11215 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism/lib/prism/node.rb#11156 + # source://prism/lib/prism/node.rb#11193 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> MatchLastLineNode # - # source://prism/lib/prism/node.rb#11081 + # source://prism/lib/prism/node.rb#11118 sig do params( node_id: Integer, @@ -20626,13 +23137,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11066 + # source://prism/lib/prism/node.rb#11103 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism/lib/prism/node.rb#11089 + # source://prism/lib/prism/node.rb#11126 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20640,7 +23151,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#11114 + # source://prism/lib/prism/node.rb#11151 sig { returns(T::Boolean) } def euc_jp?; end @@ -20648,7 +23159,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#11099 + # source://prism/lib/prism/node.rb#11136 sig { returns(T::Boolean) } def extended?; end @@ -20659,7 +23170,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#11139 + # source://prism/lib/prism/node.rb#11176 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -20667,7 +23178,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#11144 + # source://prism/lib/prism/node.rb#11181 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -20675,7 +23186,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#11134 + # source://prism/lib/prism/node.rb#11171 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -20683,13 +23194,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#11094 + # source://prism/lib/prism/node.rb#11131 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#11188 + # source://prism/lib/prism/node.rb#11225 sig { override.returns(String) } def inspect; end @@ -20697,7 +23208,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#11104 + # source://prism/lib/prism/node.rb#11141 sig { returns(T::Boolean) } def multi_line?; end @@ -20705,19 +23216,19 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#11109 + # source://prism/lib/prism/node.rb#11146 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#11173 + # source://prism/lib/prism/node.rb#11210 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#11149 + # source://prism/lib/prism/node.rb#11186 sig { returns(Prism::Location) } def opening_loc; end @@ -20726,13 +23237,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#11193 + # source://prism/lib/prism/node.rb#11230 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism/lib/prism/node.rb#11170 + # source://prism/lib/prism/node.rb#11207 sig { returns(String) } def unescaped; end @@ -20740,7 +23251,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#11129 + # source://prism/lib/prism/node.rb#11166 sig { returns(T::Boolean) } def utf_8?; end @@ -20748,14 +23259,14 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#11124 + # source://prism/lib/prism/node.rb#11161 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#11198 + # source://prism/lib/prism/node.rb#11235 def type; end end end @@ -20765,55 +23276,82 @@ end # foo in bar # ^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#11218 +# source://prism/lib/prism/node.rb#11255 class Prism::MatchPredicateNode < ::Prism::Node # Initialize a new MatchPredicateNode node. # # @return [MatchPredicateNode] a new instance of MatchPredicateNode # - # source://prism/lib/prism/node.rb#11220 + # source://prism/lib/prism/node.rb#11257 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, value, pattern, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#11298 + # source://prism/lib/prism/node.rb#11335 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#11231 + # source://prism/lib/prism/node.rb#11268 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11236 + # source://prism/lib/prism/node.rb#11273 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#11246 + # source://prism/lib/prism/node.rb#11283 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#11241 + # source://prism/lib/prism/node.rb#11278 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchPredicateNode # - # source://prism/lib/prism/node.rb#11251 + # source://prism/lib/prism/node.rb#11288 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchPredicateNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11236 + # source://prism/lib/prism/node.rb#11273 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } # - # source://prism/lib/prism/node.rb#11259 + # source://prism/lib/prism/node.rb#11296 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20821,40 +23359,44 @@ class Prism::MatchPredicateNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#11282 + # source://prism/lib/prism/node.rb#11319 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#11277 + # source://prism/lib/prism/node.rb#11314 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#11270 + # source://prism/lib/prism/node.rb#11307 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism/lib/prism/node.rb#11267 + # source://prism/lib/prism/node.rb#11304 + sig { returns(Prism::Node) } def pattern; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#11287 + # source://prism/lib/prism/node.rb#11324 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#11264 + # source://prism/lib/prism/node.rb#11301 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#11292 + # source://prism/lib/prism/node.rb#11329 def type; end end end @@ -20864,55 +23406,82 @@ end # foo => bar # ^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#11310 +# source://prism/lib/prism/node.rb#11347 class Prism::MatchRequiredNode < ::Prism::Node # Initialize a new MatchRequiredNode node. # # @return [MatchRequiredNode] a new instance of MatchRequiredNode # - # source://prism/lib/prism/node.rb#11312 + # source://prism/lib/prism/node.rb#11349 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, value, pattern, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#11390 + # source://prism/lib/prism/node.rb#11427 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#11323 + # source://prism/lib/prism/node.rb#11360 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11328 + # source://prism/lib/prism/node.rb#11365 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#11338 + # source://prism/lib/prism/node.rb#11375 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#11333 + # source://prism/lib/prism/node.rb#11370 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchRequiredNode # - # source://prism/lib/prism/node.rb#11343 + # source://prism/lib/prism/node.rb#11380 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchRequiredNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11328 + # source://prism/lib/prism/node.rb#11365 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } # - # source://prism/lib/prism/node.rb#11351 + # source://prism/lib/prism/node.rb#11388 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20920,40 +23489,44 @@ class Prism::MatchRequiredNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#11374 + # source://prism/lib/prism/node.rb#11411 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#11369 + # source://prism/lib/prism/node.rb#11406 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#11362 + # source://prism/lib/prism/node.rb#11399 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism/lib/prism/node.rb#11359 + # source://prism/lib/prism/node.rb#11396 + sig { returns(Prism::Node) } def pattern; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#11379 + # source://prism/lib/prism/node.rb#11416 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#11356 + # source://prism/lib/prism/node.rb#11393 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#11384 + # source://prism/lib/prism/node.rb#11421 def type; end end end @@ -20963,60 +23536,86 @@ end # /(?bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#11402 +# source://prism/lib/prism/node.rb#11439 class Prism::MatchWriteNode < ::Prism::Node # Initialize a new MatchWriteNode node. # # @return [MatchWriteNode] a new instance of MatchWriteNode # - # source://prism/lib/prism/node.rb#11404 + # source://prism/lib/prism/node.rb#11441 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).void + end def initialize(source, node_id, location, flags, call, targets); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#11469 + # source://prism/lib/prism/node.rb#11506 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#11414 + # source://prism/lib/prism/node.rb#11451 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader call: CallNode # - # source://prism/lib/prism/node.rb#11447 + # source://prism/lib/prism/node.rb#11484 + sig { returns(Prism::CallNode) } def call; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11419 + # source://prism/lib/prism/node.rb#11456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#11429 + # source://prism/lib/prism/node.rb#11466 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#11424 + # source://prism/lib/prism/node.rb#11461 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?call: CallNode, ?targets: Array[LocalVariableTargetNode]) -> MatchWriteNode # - # source://prism/lib/prism/node.rb#11434 + # source://prism/lib/prism/node.rb#11471 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).returns(Prism::MatchWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11419 + # source://prism/lib/prism/node.rb#11456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, call: CallNode, targets: Array[LocalVariableTargetNode] } # - # source://prism/lib/prism/node.rb#11442 + # source://prism/lib/prism/node.rb#11479 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21024,80 +23623,89 @@ class Prism::MatchWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#11453 + # source://prism/lib/prism/node.rb#11490 sig { override.returns(String) } def inspect; end # attr_reader targets: Array[LocalVariableTargetNode] # - # source://prism/lib/prism/node.rb#11450 + # source://prism/lib/prism/node.rb#11487 + sig { returns(T::Array[Prism::LocalVariableTargetNode]) } def targets; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#11458 + # source://prism/lib/prism/node.rb#11495 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#11463 + # source://prism/lib/prism/node.rb#11500 def type; end end end # Represents a node that is missing from the source and results in a syntax error. # -# source://prism/lib/prism/node.rb#11478 +# source://prism/lib/prism/node.rb#11515 class Prism::MissingNode < ::Prism::Node # Initialize a new MissingNode node. # # @return [MissingNode] a new instance of MissingNode # - # source://prism/lib/prism/node.rb#11480 + # source://prism/lib/prism/node.rb#11517 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#11537 + # source://prism/lib/prism/node.rb#11574 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#11488 + # source://prism/lib/prism/node.rb#11525 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11493 + # source://prism/lib/prism/node.rb#11530 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#11503 + # source://prism/lib/prism/node.rb#11540 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#11498 + # source://prism/lib/prism/node.rb#11535 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> MissingNode # - # source://prism/lib/prism/node.rb#11508 + # source://prism/lib/prism/node.rb#11545 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::MissingNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11493 + # source://prism/lib/prism/node.rb#11530 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#11516 + # source://prism/lib/prism/node.rb#11553 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21105,20 +23713,20 @@ class Prism::MissingNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#11521 + # source://prism/lib/prism/node.rb#11558 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#11526 + # source://prism/lib/prism/node.rb#11563 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#11531 + # source://prism/lib/prism/node.rb#11568 def type; end end end @@ -21128,75 +23736,112 @@ end # module Foo end # ^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#11546 +# source://prism/lib/prism/node.rb#11583 class Prism::ModuleNode < ::Prism::Node # Initialize a new ModuleNode node. # # @return [ModuleNode] a new instance of ModuleNode # - # source://prism/lib/prism/node.rb#11548 + # source://prism/lib/prism/node.rb#11585 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).void + end def initialize(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#11650 + # source://prism/lib/prism/node.rb#11687 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#11562 + # source://prism/lib/prism/node.rb#11599 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism/lib/prism/node.rb#11611 + # source://prism/lib/prism/node.rb#11648 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11567 + # source://prism/lib/prism/node.rb#11604 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#11580 + # source://prism/lib/prism/node.rb#11617 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#11572 + # source://prism/lib/prism/node.rb#11609 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant_path: Prism::node + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | MissingNode # - # source://prism/lib/prism/node.rb#11608 + # source://prism/lib/prism/node.rb#11645 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode)) } def constant_path; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | MissingNode, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode # - # source://prism/lib/prism/node.rb#11585 + # source://prism/lib/prism/node.rb#11622 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ModuleNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11567 + # source://prism/lib/prism/node.rb#11604 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: Prism::node, body: Prism::node?, end_keyword_loc: Location, name: Symbol } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | MissingNode, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } # - # source://prism/lib/prism/node.rb#11593 + # source://prism/lib/prism/node.rb#11630 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism/lib/prism/node.rb#11629 + # source://prism/lib/prism/node.rb#11666 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism/lib/prism/node.rb#11614 + # source://prism/lib/prism/node.rb#11651 + sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21204,40 +23849,44 @@ class Prism::ModuleNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#11634 + # source://prism/lib/prism/node.rb#11671 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism/lib/prism/node.rb#11598 + # source://prism/lib/prism/node.rb#11635 + sig { returns(T::Array[Symbol]) } def locals; end # def module_keyword: () -> String # - # source://prism/lib/prism/node.rb#11624 + # source://prism/lib/prism/node.rb#11661 + sig { returns(String) } def module_keyword; end # attr_reader module_keyword_loc: Location # - # source://prism/lib/prism/node.rb#11601 + # source://prism/lib/prism/node.rb#11638 + sig { returns(Prism::Location) } def module_keyword_loc; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#11621 + # source://prism/lib/prism/node.rb#11658 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#11639 + # source://prism/lib/prism/node.rb#11676 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#11644 + # source://prism/lib/prism/node.rb#11681 def type; end end end @@ -21252,55 +23901,86 @@ end # for a, b in [[1, 2], [3, 4]] # ^^^^ # -# source://prism/lib/prism/node.rb#11671 +# source://prism/lib/prism/node.rb#11708 class Prism::MultiTargetNode < ::Prism::Node # Initialize a new MultiTargetNode node. # # @return [MultiTargetNode] a new instance of MultiTargetNode # - # source://prism/lib/prism/node.rb#11673 + # source://prism/lib/prism/node.rb#11710 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#11814 + # source://prism/lib/prism/node.rb#11851 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#11686 + # source://prism/lib/prism/node.rb#11723 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11691 + # source://prism/lib/prism/node.rb#11728 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#11705 + # source://prism/lib/prism/node.rb#11742 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#11696 + # source://prism/lib/prism/node.rb#11733 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?) -> MultiTargetNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?) -> MultiTargetNode # - # source://prism/lib/prism/node.rb#11710 + # source://prism/lib/prism/node.rb#11747 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::MultiTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11691 + # source://prism/lib/prism/node.rb#11728 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], lparen_loc: Location?, rparen_loc: Location? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location? } # - # source://prism/lib/prism/node.rb#11718 + # source://prism/lib/prism/node.rb#11755 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21308,7 +23988,7 @@ class Prism::MultiTargetNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#11798 + # source://prism/lib/prism/node.rb#11835 sig { override.returns(String) } def inspect; end @@ -21322,12 +24002,16 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b, c) = 1, 2, 3, 4, 5 # ^^^^ # - # source://prism/lib/prism/node.rb#11731 + # source://prism/lib/prism/node.rb#11768 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end def lefts; end # def lparen: () -> String? # - # source://prism/lib/prism/node.rb#11788 + # source://prism/lib/prism/node.rb#11825 + sig { returns(T.nilable(String)) } def lparen; end # The location of the opening parenthesis. @@ -21335,7 +24019,8 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b, c) = 1, 2, 3 # ^ # - # source://prism/lib/prism/node.rb#11759 + # source://prism/lib/prism/node.rb#11796 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # Represents a splat node in the target expression. @@ -21348,12 +24033,13 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b, *) = 1, 2, 3, 4 # ^ # - # If the `*` is omitted, the field will containt an `ImplicitRestNode` + # If the `*` is omitted, this field will contain an `ImplicitRestNode` # # a, (b,) = 1, 2, 3, 4 # ^ # - # source://prism/lib/prism/node.rb#11747 + # source://prism/lib/prism/node.rb#11784 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end # Represents the targets expressions after a splat node. @@ -21361,12 +24047,16 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (*, b, c) = 1, 2, 3, 4, 5 # ^^^^ # - # source://prism/lib/prism/node.rb#11753 + # source://prism/lib/prism/node.rb#11790 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end def rights; end # def rparen: () -> String? # - # source://prism/lib/prism/node.rb#11793 + # source://prism/lib/prism/node.rb#11830 + sig { returns(T.nilable(String)) } def rparen; end # The location of the closing parenthesis. @@ -21374,19 +24064,20 @@ class Prism::MultiTargetNode < ::Prism::Node # a, (b, c) = 1, 2, 3 # ^ # - # source://prism/lib/prism/node.rb#11775 + # source://prism/lib/prism/node.rb#11812 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#11803 + # source://prism/lib/prism/node.rb#11840 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#11808 + # source://prism/lib/prism/node.rb#11845 def type; end end end @@ -21396,55 +24087,90 @@ end # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#11830 +# source://prism/lib/prism/node.rb#11867 class Prism::MultiWriteNode < ::Prism::Node # Initialize a new MultiWriteNode node. # # @return [MultiWriteNode] a new instance of MultiWriteNode # - # source://prism/lib/prism/node.rb#11832 + # source://prism/lib/prism/node.rb#11869 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#11997 + # source://prism/lib/prism/node.rb#12034 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#11847 + # source://prism/lib/prism/node.rb#11884 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11852 + # source://prism/lib/prism/node.rb#11889 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#11867 + # source://prism/lib/prism/node.rb#11904 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#11857 + # source://prism/lib/prism/node.rb#11894 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode # - # source://prism/lib/prism/node.rb#11872 + # source://prism/lib/prism/node.rb#11909 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::MultiWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#11852 + # source://prism/lib/prism/node.rb#11889 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#11880 + # source://prism/lib/prism/node.rb#11917 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21452,7 +24178,7 @@ class Prism::MultiWriteNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#11981 + # source://prism/lib/prism/node.rb#12018 sig { override.returns(String) } def inspect; end @@ -21466,12 +24192,16 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, c = 1, 2, 3, 4, 5 # ^^^^^^^ # - # source://prism/lib/prism/node.rb#11893 + # source://prism/lib/prism/node.rb#11930 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end def lefts; end # def lparen: () -> String? # - # source://prism/lib/prism/node.rb#11966 + # source://prism/lib/prism/node.rb#12003 + sig { returns(T.nilable(String)) } def lparen; end # The location of the opening parenthesis. @@ -21479,12 +24209,14 @@ class Prism::MultiWriteNode < ::Prism::Node # (a, b, c) = 1, 2, 3 # ^ # - # source://prism/lib/prism/node.rb#11921 + # source://prism/lib/prism/node.rb#11958 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#11976 + # source://prism/lib/prism/node.rb#12013 + sig { returns(String) } def operator; end # The location of the operator. @@ -21492,7 +24224,8 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, c = 1, 2, 3 # ^ # - # source://prism/lib/prism/node.rb#11953 + # source://prism/lib/prism/node.rb#11990 + sig { returns(Prism::Location) } def operator_loc; end # Represents a splat node in the target expression. @@ -21505,12 +24238,13 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, * = 1, 2, 3, 4 # ^ # - # If the `*` is omitted, the field will containt an `ImplicitRestNode` + # If the `*` is omitted, this field will contain an `ImplicitRestNode` # # a, b, = 1, 2, 3, 4 # ^ # - # source://prism/lib/prism/node.rb#11909 + # source://prism/lib/prism/node.rb#11946 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end # Represents the targets expressions after a splat node. @@ -21518,12 +24252,16 @@ class Prism::MultiWriteNode < ::Prism::Node # a, *, b, c = 1, 2, 3, 4, 5 # ^^^^ # - # source://prism/lib/prism/node.rb#11915 + # source://prism/lib/prism/node.rb#11952 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end def rights; end # def rparen: () -> String? # - # source://prism/lib/prism/node.rb#11971 + # source://prism/lib/prism/node.rb#12008 + sig { returns(T.nilable(String)) } def rparen; end # The location of the closing parenthesis. @@ -21531,12 +24269,13 @@ class Prism::MultiWriteNode < ::Prism::Node # (a, b, c) = 1, 2, 3 # ^ # - # source://prism/lib/prism/node.rb#11937 + # source://prism/lib/prism/node.rb#11974 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#11986 + # source://prism/lib/prism/node.rb#12023 sig { override.returns(Symbol) } def type; end @@ -21545,13 +24284,14 @@ class Prism::MultiWriteNode < ::Prism::Node # a, b, c = 1, 2, 3 # ^^^^^^^ # - # source://prism/lib/prism/node.rb#11963 + # source://prism/lib/prism/node.rb#12000 + sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#11991 + # source://prism/lib/prism/node.rb#12028 def type; end end end @@ -22323,60 +25063,86 @@ end # next 1 # ^^^^^^ # -# source://prism/lib/prism/node.rb#12015 +# source://prism/lib/prism/node.rb#12052 class Prism::NextNode < ::Prism::Node # Initialize a new NextNode node. # # @return [NextNode] a new instance of NextNode # - # source://prism/lib/prism/node.rb#12017 + # source://prism/lib/prism/node.rb#12054 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, arguments, keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#12093 + # source://prism/lib/prism/node.rb#12130 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#12027 + # source://prism/lib/prism/node.rb#12064 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism/lib/prism/node.rb#12062 + # source://prism/lib/prism/node.rb#12099 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12032 + # source://prism/lib/prism/node.rb#12069 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#12044 + # source://prism/lib/prism/node.rb#12081 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#12037 + # source://prism/lib/prism/node.rb#12074 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> NextNode # - # source://prism/lib/prism/node.rb#12049 + # source://prism/lib/prism/node.rb#12086 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::NextNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12032 + # source://prism/lib/prism/node.rb#12069 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # - # source://prism/lib/prism/node.rb#12057 + # source://prism/lib/prism/node.rb#12094 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22384,30 +25150,32 @@ class Prism::NextNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#12077 + # source://prism/lib/prism/node.rb#12114 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#12072 + # source://prism/lib/prism/node.rb#12109 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#12065 + # source://prism/lib/prism/node.rb#12102 + sig { returns(Prism::Location) } def keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#12082 + # source://prism/lib/prism/node.rb#12119 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#12087 + # source://prism/lib/prism/node.rb#12124 def type; end end end @@ -22417,55 +25185,63 @@ end # nil # ^^^ # -# source://prism/lib/prism/node.rb#12104 +# source://prism/lib/prism/node.rb#12141 class Prism::NilNode < ::Prism::Node # Initialize a new NilNode node. # # @return [NilNode] a new instance of NilNode # - # source://prism/lib/prism/node.rb#12106 + # source://prism/lib/prism/node.rb#12143 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#12163 + # source://prism/lib/prism/node.rb#12200 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#12114 + # source://prism/lib/prism/node.rb#12151 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12119 + # source://prism/lib/prism/node.rb#12156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#12129 + # source://prism/lib/prism/node.rb#12166 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#12124 + # source://prism/lib/prism/node.rb#12161 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> NilNode # - # source://prism/lib/prism/node.rb#12134 + # source://prism/lib/prism/node.rb#12171 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::NilNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12119 + # source://prism/lib/prism/node.rb#12156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#12142 + # source://prism/lib/prism/node.rb#12179 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22473,20 +25249,20 @@ class Prism::NilNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#12147 + # source://prism/lib/prism/node.rb#12184 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#12152 + # source://prism/lib/prism/node.rb#12189 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#12157 + # source://prism/lib/prism/node.rb#12194 def type; end end end @@ -22497,55 +25273,80 @@ end # ^^^^^ # end # -# source://prism/lib/prism/node.rb#12173 +# source://prism/lib/prism/node.rb#12210 class Prism::NoKeywordsParameterNode < ::Prism::Node # Initialize a new NoKeywordsParameterNode node. # # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode # - # source://prism/lib/prism/node.rb#12175 + # source://prism/lib/prism/node.rb#12212 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, operator_loc, keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#12258 + # source://prism/lib/prism/node.rb#12295 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#12185 + # source://prism/lib/prism/node.rb#12222 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12190 + # source://prism/lib/prism/node.rb#12227 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#12200 + # source://prism/lib/prism/node.rb#12237 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#12195 + # source://prism/lib/prism/node.rb#12232 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?keyword_loc: Location) -> NoKeywordsParameterNode # - # source://prism/lib/prism/node.rb#12205 + # source://prism/lib/prism/node.rb#12242 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12190 + # source://prism/lib/prism/node.rb#12227 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, keyword_loc: Location } # - # source://prism/lib/prism/node.rb#12213 + # source://prism/lib/prism/node.rb#12250 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22553,40 +25354,44 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#12242 + # source://prism/lib/prism/node.rb#12279 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#12237 + # source://prism/lib/prism/node.rb#12274 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#12225 + # source://prism/lib/prism/node.rb#12262 + sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#12232 + # source://prism/lib/prism/node.rb#12269 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#12218 + # source://prism/lib/prism/node.rb#12255 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#12247 + # source://prism/lib/prism/node.rb#12284 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#12252 + # source://prism/lib/prism/node.rb#12289 def type; end end end @@ -22832,19 +25637,19 @@ end # The flags that are common to all nodes. # -# source://prism/lib/prism/node.rb#16812 +# source://prism/lib/prism/node.rb#16855 module Prism::NodeFlags; end # A flag to indicate that the node is a candidate to emit a :line event # through tracepoint when compiled. # -# source://prism/lib/prism/node.rb#16815 +# source://prism/lib/prism/node.rb#16858 Prism::NodeFlags::NEWLINE = T.let(T.unsafe(nil), Integer) # A flag to indicate that the value that the node represents is a value that # can be determined at parse-time. # -# source://prism/lib/prism/node.rb#16819 +# source://prism/lib/prism/node.rb#16862 Prism::NodeFlags::STATIC_LITERAL = T.let(T.unsafe(nil), Integer) # Represents an implicit set of parameters through the use of numbered parameters within a block or lambda. @@ -22852,55 +25657,78 @@ Prism::NodeFlags::STATIC_LITERAL = T.let(T.unsafe(nil), Integer) # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#12269 +# source://prism/lib/prism/node.rb#12306 class Prism::NumberedParametersNode < ::Prism::Node # Initialize a new NumberedParametersNode node. # # @return [NumberedParametersNode] a new instance of NumberedParametersNode # - # source://prism/lib/prism/node.rb#12271 + # source://prism/lib/prism/node.rb#12308 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).void + end def initialize(source, node_id, location, flags, maximum); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#12332 + # source://prism/lib/prism/node.rb#12369 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#12280 + # source://prism/lib/prism/node.rb#12317 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12285 + # source://prism/lib/prism/node.rb#12322 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#12295 + # source://prism/lib/prism/node.rb#12332 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#12290 + # source://prism/lib/prism/node.rb#12327 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?maximum: Integer) -> NumberedParametersNode # - # source://prism/lib/prism/node.rb#12300 + # source://prism/lib/prism/node.rb#12337 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).returns(Prism::NumberedParametersNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12285 + # source://prism/lib/prism/node.rb#12322 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer } # - # source://prism/lib/prism/node.rb#12308 + # source://prism/lib/prism/node.rb#12345 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22908,25 +25736,26 @@ class Prism::NumberedParametersNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#12316 + # source://prism/lib/prism/node.rb#12353 sig { override.returns(String) } def inspect; end # attr_reader maximum: Integer # - # source://prism/lib/prism/node.rb#12313 + # source://prism/lib/prism/node.rb#12350 + sig { returns(Integer) } def maximum; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#12321 + # source://prism/lib/prism/node.rb#12358 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#12326 + # source://prism/lib/prism/node.rb#12363 def type; end end end @@ -22936,55 +25765,78 @@ end # $1 # ^^ # -# source://prism/lib/prism/node.rb#12342 +# source://prism/lib/prism/node.rb#12379 class Prism::NumberedReferenceReadNode < ::Prism::Node # Initialize a new NumberedReferenceReadNode node. # # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode # - # source://prism/lib/prism/node.rb#12344 + # source://prism/lib/prism/node.rb#12381 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).void + end def initialize(source, node_id, location, flags, number); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#12411 + # source://prism/lib/prism/node.rb#12448 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#12353 + # source://prism/lib/prism/node.rb#12390 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12358 + # source://prism/lib/prism/node.rb#12395 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#12368 + # source://prism/lib/prism/node.rb#12405 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#12363 + # source://prism/lib/prism/node.rb#12400 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?number: Integer) -> NumberedReferenceReadNode # - # source://prism/lib/prism/node.rb#12373 + # source://prism/lib/prism/node.rb#12410 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).returns(Prism::NumberedReferenceReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12358 + # source://prism/lib/prism/node.rb#12395 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer } # - # source://prism/lib/prism/node.rb#12381 + # source://prism/lib/prism/node.rb#12418 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22992,7 +25844,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#12395 + # source://prism/lib/prism/node.rb#12432 sig { override.returns(String) } def inspect; end @@ -23004,19 +25856,20 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # $4294967296 # number `0` # - # source://prism/lib/prism/node.rb#12392 + # source://prism/lib/prism/node.rb#12429 + sig { returns(Integer) } def number; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#12400 + # source://prism/lib/prism/node.rb#12437 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#12405 + # source://prism/lib/prism/node.rb#12442 def type; end end end @@ -23027,13 +25880,13 @@ end # ^^^^ # end # -# source://prism/lib/prism/node.rb#12422 +# source://prism/lib/prism/node.rb#12459 class Prism::OptionalKeywordParameterNode < ::Prism::Node # Initialize a new OptionalKeywordParameterNode node. # # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode # - # source://prism/lib/prism/node.rb#12424 + # source://prism/lib/prism/node.rb#12461 sig do params( source: Prism::Source, @@ -23050,36 +25903,36 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#12502 + # source://prism/lib/prism/node.rb#12539 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#12435 + # source://prism/lib/prism/node.rb#12472 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12440 + # source://prism/lib/prism/node.rb#12477 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#12450 + # source://prism/lib/prism/node.rb#12487 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#12445 + # source://prism/lib/prism/node.rb#12482 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node) -> OptionalKeywordParameterNode # - # source://prism/lib/prism/node.rb#12455 + # source://prism/lib/prism/node.rb#12492 sig do params( node_id: Integer, @@ -23095,13 +25948,13 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12440 + # source://prism/lib/prism/node.rb#12477 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#12463 + # source://prism/lib/prism/node.rb#12500 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23110,19 +25963,19 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#12486 + # source://prism/lib/prism/node.rb#12523 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#12473 + # source://prism/lib/prism/node.rb#12510 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#12476 + # source://prism/lib/prism/node.rb#12513 sig { returns(Prism::Location) } def name_loc; end @@ -23130,26 +25983,26 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#12468 + # source://prism/lib/prism/node.rb#12505 sig { returns(T::Boolean) } def repeated_parameter?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#12491 + # source://prism/lib/prism/node.rb#12528 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#12483 + # source://prism/lib/prism/node.rb#12520 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#12496 + # source://prism/lib/prism/node.rb#12533 def type; end end end @@ -23160,13 +26013,13 @@ end # ^^^^^ # end # -# source://prism/lib/prism/node.rb#12516 +# source://prism/lib/prism/node.rb#12553 class Prism::OptionalParameterNode < ::Prism::Node # Initialize a new OptionalParameterNode node. # # @return [OptionalParameterNode] a new instance of OptionalParameterNode # - # source://prism/lib/prism/node.rb#12518 + # source://prism/lib/prism/node.rb#12555 sig do params( source: Prism::Source, @@ -23184,36 +26037,36 @@ class Prism::OptionalParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#12609 + # source://prism/lib/prism/node.rb#12646 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#12530 + # source://prism/lib/prism/node.rb#12567 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12535 + # source://prism/lib/prism/node.rb#12572 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#12545 + # source://prism/lib/prism/node.rb#12582 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#12540 + # source://prism/lib/prism/node.rb#12577 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> OptionalParameterNode # - # source://prism/lib/prism/node.rb#12550 + # source://prism/lib/prism/node.rb#12587 sig do params( node_id: Integer, @@ -23230,13 +26083,13 @@ class Prism::OptionalParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12535 + # source://prism/lib/prism/node.rb#12572 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # - # source://prism/lib/prism/node.rb#12558 + # source://prism/lib/prism/node.rb#12595 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23245,31 +26098,31 @@ class Prism::OptionalParameterNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#12593 + # source://prism/lib/prism/node.rb#12630 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#12568 + # source://prism/lib/prism/node.rb#12605 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#12571 + # source://prism/lib/prism/node.rb#12608 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#12588 + # source://prism/lib/prism/node.rb#12625 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#12578 + # source://prism/lib/prism/node.rb#12615 sig { returns(Prism::Location) } def operator_loc; end @@ -23277,26 +26130,26 @@ class Prism::OptionalParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#12563 + # source://prism/lib/prism/node.rb#12600 sig { returns(T::Boolean) } def repeated_parameter?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#12598 + # source://prism/lib/prism/node.rb#12635 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism/lib/prism/node.rb#12585 + # source://prism/lib/prism/node.rb#12622 sig { returns(Prism::Node) } def value; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#12603 + # source://prism/lib/prism/node.rb#12640 def type; end end end @@ -23306,55 +26159,82 @@ end # left or right # ^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#12623 +# source://prism/lib/prism/node.rb#12660 class Prism::OrNode < ::Prism::Node # Initialize a new OrNode node. # # @return [OrNode] a new instance of OrNode # - # source://prism/lib/prism/node.rb#12625 + # source://prism/lib/prism/node.rb#12662 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, left, right, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#12718 + # source://prism/lib/prism/node.rb#12755 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#12636 + # source://prism/lib/prism/node.rb#12673 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12641 + # source://prism/lib/prism/node.rb#12678 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#12651 + # source://prism/lib/prism/node.rb#12688 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#12646 + # source://prism/lib/prism/node.rb#12683 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> OrNode # - # source://prism/lib/prism/node.rb#12656 + # source://prism/lib/prism/node.rb#12693 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::OrNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12641 + # source://prism/lib/prism/node.rb#12678 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # - # source://prism/lib/prism/node.rb#12664 + # source://prism/lib/prism/node.rb#12701 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23362,7 +26242,7 @@ class Prism::OrNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#12702 + # source://prism/lib/prism/node.rb#12739 sig { override.returns(String) } def inspect; end @@ -23374,12 +26254,14 @@ class Prism::OrNode < ::Prism::Node # 1 || 2 # ^ # - # source://prism/lib/prism/node.rb#12675 + # source://prism/lib/prism/node.rb#12712 + sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#12697 + # source://prism/lib/prism/node.rb#12734 + sig { returns(String) } def operator; end # The location of the `or` keyword or the `||` operator. @@ -23387,10 +26269,11 @@ class Prism::OrNode < ::Prism::Node # left or right # ^^ # - # source://prism/lib/prism/node.rb#12690 + # source://prism/lib/prism/node.rb#12727 + sig { returns(Prism::Location) } def operator_loc; end - # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # Represents the right side of the expression. # # left || right # ^^^^^ @@ -23398,19 +26281,20 @@ class Prism::OrNode < ::Prism::Node # 1 or 2 # ^ # - # source://prism/lib/prism/node.rb#12684 + # source://prism/lib/prism/node.rb#12721 + sig { returns(Prism::Node) } def right; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#12707 + # source://prism/lib/prism/node.rb#12744 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#12712 + # source://prism/lib/prism/node.rb#12749 def type; end end end @@ -23659,12 +26543,12 @@ Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) # Flags for parameter nodes. # -# source://prism/lib/prism/node.rb#16725 +# source://prism/lib/prism/node.rb#16768 module Prism::ParameterFlags; end # a parameter name that has been repeated in the method signature # -# source://prism/lib/prism/node.rb#16727 +# source://prism/lib/prism/node.rb#16770 Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # Represents the list of parameters on a method, block, or lambda definition. @@ -23673,60 +26557,96 @@ Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # ^^^^^^^ # end # -# source://prism/lib/prism/node.rb#12731 +# source://prism/lib/prism/node.rb#12768 class Prism::ParametersNode < ::Prism::Node # Initialize a new ParametersNode node. # # @return [ParametersNode] a new instance of ParametersNode # - # source://prism/lib/prism/node.rb#12733 + # source://prism/lib/prism/node.rb#12770 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).void + end def initialize(source, node_id, location, flags, requireds, optionals, rest, posts, keywords, keyword_rest, block); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#12826 + # source://prism/lib/prism/node.rb#12863 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#12748 + # source://prism/lib/prism/node.rb#12785 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockParameterNode? # - # source://prism/lib/prism/node.rb#12807 + # source://prism/lib/prism/node.rb#12844 + sig { returns(T.nilable(Prism::BlockParameterNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12753 + # source://prism/lib/prism/node.rb#12790 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#12771 + # source://prism/lib/prism/node.rb#12808 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#12758 + # source://prism/lib/prism/node.rb#12795 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?) -> ParametersNode # - # source://prism/lib/prism/node.rb#12776 + # source://prism/lib/prism/node.rb#12813 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).returns(Prism::ParametersNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12753 + # source://prism/lib/prism/node.rb#12790 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode? } # - # source://prism/lib/prism/node.rb#12784 + # source://prism/lib/prism/node.rb#12821 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23734,38 +26654,48 @@ class Prism::ParametersNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#12810 + # source://prism/lib/prism/node.rb#12847 sig { override.returns(String) } def inspect; end # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil # - # source://prism/lib/prism/node.rb#12804 + # source://prism/lib/prism/node.rb#12841 + sig do + returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) + end def keyword_rest; end # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] # - # source://prism/lib/prism/node.rb#12801 + # source://prism/lib/prism/node.rb#12838 + sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } def keywords; end # attr_reader optionals: Array[OptionalParameterNode] # - # source://prism/lib/prism/node.rb#12792 + # source://prism/lib/prism/node.rb#12829 + sig { returns(T::Array[Prism::OptionalParameterNode]) } def optionals; end # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] # - # source://prism/lib/prism/node.rb#12798 + # source://prism/lib/prism/node.rb#12835 + sig do + returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) + end def posts; end # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] # - # source://prism/lib/prism/node.rb#12789 + # source://prism/lib/prism/node.rb#12826 + sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } def requireds; end # attr_reader rest: RestParameterNode | ImplicitRestNode | nil # - # source://prism/lib/prism/node.rb#12795 + # source://prism/lib/prism/node.rb#12832 + sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } def rest; end # Mirrors the Method#parameters method. @@ -23776,14 +26706,14 @@ class Prism::ParametersNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#12815 + # source://prism/lib/prism/node.rb#12852 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#12820 + # source://prism/lib/prism/node.rb#12857 def type; end end end @@ -23793,70 +26723,100 @@ end # (10 + 34) # ^^^^^^^^^ # -# source://prism/lib/prism/node.rb#12846 +# source://prism/lib/prism/node.rb#12883 class Prism::ParenthesesNode < ::Prism::Node # Initialize a new ParenthesesNode node. # # @return [ParenthesesNode] a new instance of ParenthesesNode # - # source://prism/lib/prism/node.rb#12848 + # source://prism/lib/prism/node.rb#12885 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, body, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#12937 + # source://prism/lib/prism/node.rb#12974 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#12859 + # source://prism/lib/prism/node.rb#12896 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism/lib/prism/node.rb#12894 + # source://prism/lib/prism/node.rb#12931 + sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12864 + # source://prism/lib/prism/node.rb#12901 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#12916 + # source://prism/lib/prism/node.rb#12953 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#12904 + # source://prism/lib/prism/node.rb#12941 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#12876 + # source://prism/lib/prism/node.rb#12913 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#12869 + # source://prism/lib/prism/node.rb#12906 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location) -> ParenthesesNode # - # source://prism/lib/prism/node.rb#12881 + # source://prism/lib/prism/node.rb#12918 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::ParenthesesNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12864 + # source://prism/lib/prism/node.rb#12901 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Prism::node?, opening_loc: Location, closing_loc: Location } # - # source://prism/lib/prism/node.rb#12889 + # source://prism/lib/prism/node.rb#12926 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23864,7 +26824,7 @@ class Prism::ParenthesesNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#12921 + # source://prism/lib/prism/node.rb#12958 sig { override.returns(String) } def inspect; end @@ -23873,87 +26833,89 @@ class Prism::ParenthesesNode < ::Prism::Node # def opening: () -> String # - # source://prism/lib/prism/node.rb#12911 + # source://prism/lib/prism/node.rb#12948 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#12897 + # source://prism/lib/prism/node.rb#12934 + sig { returns(Prism::Location) } def opening_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#12926 + # source://prism/lib/prism/node.rb#12963 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#12931 + # source://prism/lib/prism/node.rb#12968 def type; end end end # This represents an error that was encountered during parsing. # -# source://prism/lib/prism/parse_result.rb#460 +# source://prism/lib/prism/parse_result.rb#592 class Prism::ParseError # Create a new error object with the given message and location. # # @return [ParseError] a new instance of ParseError # - # source://prism/lib/prism/parse_result.rb#475 + # source://prism/lib/prism/parse_result.rb#607 sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } def initialize(type, message, location, level); end # Implement the hash pattern matching interface for ParseError. # - # source://prism/lib/prism/parse_result.rb#483 + # source://prism/lib/prism/parse_result.rb#615 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this error. # - # source://prism/lib/prism/parse_result.rb#488 + # source://prism/lib/prism/parse_result.rb#620 sig { returns(String) } def inspect; end # The level of this error. # - # source://prism/lib/prism/parse_result.rb#472 + # source://prism/lib/prism/parse_result.rb#604 sig { returns(Symbol) } def level; end # A Location object representing the location of this error in the source. # - # source://prism/lib/prism/parse_result.rb#469 + # source://prism/lib/prism/parse_result.rb#601 sig { returns(Prism::Location) } def location; end # The message associated with this error. # - # source://prism/lib/prism/parse_result.rb#466 + # source://prism/lib/prism/parse_result.rb#598 sig { returns(String) } def message; end # The type of error. This is an _internal_ symbol that is used for # communicating with translation layers. It is not meant to be public API. # - # source://prism/lib/prism/parse_result.rb#463 + # source://prism/lib/prism/parse_result.rb#595 sig { returns(Symbol) } def type; end end # This is a result specific to the `parse_lex` and `parse_lex_file` methods. # -# source://prism/lib/prism/parse_result.rb#644 +# source://prism/lib/prism/parse_result.rb#781 class Prism::ParseLexResult < ::Prism::Result # Create a new parse lex result object with the given values. # # @return [ParseLexResult] a new instance of ParseLexResult # - # source://prism/lib/prism/parse_result.rb#650 + # source://prism/lib/prism/parse_result.rb#787 sig do params( value: [Prism::ProgramNode, T::Array[T.untyped]], @@ -23969,27 +26931,27 @@ class Prism::ParseLexResult < ::Prism::Result # Implement the hash pattern matching interface for ParseLexResult. # - # source://prism/lib/prism/parse_result.rb#656 + # source://prism/lib/prism/parse_result.rb#793 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # A tuple of the syntax tree and the list of tokens that were parsed from # the source code. # - # source://prism/lib/prism/parse_result.rb#647 + # source://prism/lib/prism/parse_result.rb#784 sig { returns([Prism::ProgramNode, T::Array[T.untyped]]) } def value; end end # This is a result specific to the `parse` and `parse_file` methods. # -# source://prism/lib/prism/parse_result.rb#585 +# source://prism/lib/prism/parse_result.rb#722 class Prism::ParseResult < ::Prism::Result # Create a new parse result object with the given values. # # @return [ParseResult] a new instance of ParseResult # - # source://prism/lib/prism/parse_result.rb#598 + # source://prism/lib/prism/parse_result.rb#735 sig do params( value: Prism::ProgramNode, @@ -24005,30 +26967,30 @@ class Prism::ParseResult < ::Prism::Result # Attach the list of comments to their respective locations in the tree. # - # source://prism/lib/prism/parse_result.rb#609 + # source://prism/lib/prism/parse_result.rb#746 def attach_comments!; end # Implement the hash pattern matching interface for ParseResult. # - # source://prism/lib/prism/parse_result.rb#604 + # source://prism/lib/prism/parse_result.rb#741 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of the syntax tree with the errors # displayed inline. # - # source://prism/lib/prism/parse_result.rb#621 + # source://prism/lib/prism/parse_result.rb#758 def errors_format; end # Walk the tree and mark nodes that are on a new line, loosely emulating # the behavior of CRuby's `:line` tracepoint event. # - # source://prism/lib/prism/parse_result.rb#615 + # source://prism/lib/prism/parse_result.rb#752 def mark_newlines!; end # The syntax tree that was parsed from the source code. # - # source://prism/lib/prism/parse_result.rb#595 + # source://prism/lib/prism/parse_result.rb#732 sig { returns(Prism::ProgramNode) } def value; end end @@ -24221,50 +27183,50 @@ end # This represents a warning that was encountered during parsing. # -# source://prism/lib/prism/parse_result.rb#494 +# source://prism/lib/prism/parse_result.rb#626 class Prism::ParseWarning # Create a new warning object with the given message and location. # # @return [ParseWarning] a new instance of ParseWarning # - # source://prism/lib/prism/parse_result.rb#509 + # source://prism/lib/prism/parse_result.rb#641 sig { params(type: Symbol, message: String, location: Prism::Location, level: Symbol).void } def initialize(type, message, location, level); end # Implement the hash pattern matching interface for ParseWarning. # - # source://prism/lib/prism/parse_result.rb#517 + # source://prism/lib/prism/parse_result.rb#649 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this warning. # - # source://prism/lib/prism/parse_result.rb#522 + # source://prism/lib/prism/parse_result.rb#654 sig { returns(String) } def inspect; end # The level of this warning. # - # source://prism/lib/prism/parse_result.rb#506 + # source://prism/lib/prism/parse_result.rb#638 sig { returns(Symbol) } def level; end # A Location object representing the location of this warning in the source. # - # source://prism/lib/prism/parse_result.rb#503 + # source://prism/lib/prism/parse_result.rb#635 sig { returns(Prism::Location) } def location; end # The message associated with this warning. # - # source://prism/lib/prism/parse_result.rb#500 + # source://prism/lib/prism/parse_result.rb#632 sig { returns(String) } def message; end # The type of warning. This is an _internal_ symbol that is used for # communicating with translation layers. It is not meant to be public API. # - # source://prism/lib/prism/parse_result.rb#497 + # source://prism/lib/prism/parse_result.rb#629 sig { returns(Symbol) } def type; end end @@ -24435,60 +27397,90 @@ end # foo in ^(bar) # ^^^^^^ # -# source://prism/lib/prism/node.rb#12949 +# source://prism/lib/prism/node.rb#12986 class Prism::PinnedExpressionNode < ::Prism::Node # Initialize a new PinnedExpressionNode node. # # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode # - # source://prism/lib/prism/node.rb#12951 + # source://prism/lib/prism/node.rb#12988 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, expression, operator_loc, lparen_loc, rparen_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#13051 + # source://prism/lib/prism/node.rb#13088 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#12963 + # source://prism/lib/prism/node.rb#13000 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12968 + # source://prism/lib/prism/node.rb#13005 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#12978 + # source://prism/lib/prism/node.rb#13015 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#12973 + # source://prism/lib/prism/node.rb#13010 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location) -> PinnedExpressionNode # - # source://prism/lib/prism/node.rb#12983 + # source://prism/lib/prism/node.rb#13020 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#12968 + # source://prism/lib/prism/node.rb#13005 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location } # - # source://prism/lib/prism/node.rb#12991 + # source://prism/lib/prism/node.rb#13028 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node # - # source://prism/lib/prism/node.rb#12996 + # source://prism/lib/prism/node.rb#13033 + sig { returns(Prism::Node) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24496,50 +27488,56 @@ class Prism::PinnedExpressionNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#13035 + # source://prism/lib/prism/node.rb#13072 sig { override.returns(String) } def inspect; end # def lparen: () -> String # - # source://prism/lib/prism/node.rb#13025 + # source://prism/lib/prism/node.rb#13062 + sig { returns(String) } def lparen; end # attr_reader lparen_loc: Location # - # source://prism/lib/prism/node.rb#13006 + # source://prism/lib/prism/node.rb#13043 + sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#13020 + # source://prism/lib/prism/node.rb#13057 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#12999 + # source://prism/lib/prism/node.rb#13036 + sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # - # source://prism/lib/prism/node.rb#13030 + # source://prism/lib/prism/node.rb#13067 + sig { returns(String) } def rparen; end # attr_reader rparen_loc: Location # - # source://prism/lib/prism/node.rb#13013 + # source://prism/lib/prism/node.rb#13050 + sig { returns(Prism::Location) } def rparen_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#13040 + # source://prism/lib/prism/node.rb#13077 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#13045 + # source://prism/lib/prism/node.rb#13082 def type; end end end @@ -24549,55 +27547,80 @@ end # foo in ^bar # ^^^^ # -# source://prism/lib/prism/node.rb#13064 +# source://prism/lib/prism/node.rb#13101 class Prism::PinnedVariableNode < ::Prism::Node # Initialize a new PinnedVariableNode node. # # @return [PinnedVariableNode] a new instance of PinnedVariableNode # - # source://prism/lib/prism/node.rb#13066 + # source://prism/lib/prism/node.rb#13103 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, variable, operator_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#13140 + # source://prism/lib/prism/node.rb#13177 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#13076 + # source://prism/lib/prism/node.rb#13113 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13081 + # source://prism/lib/prism/node.rb#13118 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#13091 + # source://prism/lib/prism/node.rb#13128 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#13086 + # source://prism/lib/prism/node.rb#13123 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable: Prism::node, ?operator_loc: Location) -> PinnedVariableNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, ?operator_loc: Location) -> PinnedVariableNode # - # source://prism/lib/prism/node.rb#13096 + # source://prism/lib/prism/node.rb#13133 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).returns(Prism::PinnedVariableNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13081 + # source://prism/lib/prism/node.rb#13118 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: Prism::node, operator_loc: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, operator_loc: Location } # - # source://prism/lib/prism/node.rb#13104 + # source://prism/lib/prism/node.rb#13141 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24605,35 +27628,40 @@ class Prism::PinnedVariableNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#13124 + # source://prism/lib/prism/node.rb#13161 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#13119 + # source://prism/lib/prism/node.rb#13156 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#13112 + # source://prism/lib/prism/node.rb#13149 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#13129 + # source://prism/lib/prism/node.rb#13166 sig { override.returns(Symbol) } def type; end - # attr_reader variable: Prism::node + # attr_reader variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode # - # source://prism/lib/prism/node.rb#13109 + # source://prism/lib/prism/node.rb#13146 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode)) + end def variable; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#13134 + # source://prism/lib/prism/node.rb#13171 def type; end end end @@ -24643,65 +27671,96 @@ end # END { foo } # ^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#13151 +# source://prism/lib/prism/node.rb#13188 class Prism::PostExecutionNode < ::Prism::Node # Initialize a new PostExecutionNode node. # # @return [PostExecutionNode] a new instance of PostExecutionNode # - # source://prism/lib/prism/node.rb#13153 + # source://prism/lib/prism/node.rb#13190 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#13255 + # source://prism/lib/prism/node.rb#13292 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#13165 + # source://prism/lib/prism/node.rb#13202 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13170 + # source://prism/lib/prism/node.rb#13207 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#13234 + # source://prism/lib/prism/node.rb#13271 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#13217 + # source://prism/lib/prism/node.rb#13254 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#13182 + # source://prism/lib/prism/node.rb#13219 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#13175 + # source://prism/lib/prism/node.rb#13212 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PostExecutionNode # - # source://prism/lib/prism/node.rb#13187 + # source://prism/lib/prism/node.rb#13224 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PostExecutionNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13170 + # source://prism/lib/prism/node.rb#13207 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } # - # source://prism/lib/prism/node.rb#13195 + # source://prism/lib/prism/node.rb#13232 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24709,45 +27768,50 @@ class Prism::PostExecutionNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#13239 + # source://prism/lib/prism/node.rb#13276 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#13224 + # source://prism/lib/prism/node.rb#13261 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#13203 + # source://prism/lib/prism/node.rb#13240 + sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#13229 + # source://prism/lib/prism/node.rb#13266 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#13210 + # source://prism/lib/prism/node.rb#13247 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism/lib/prism/node.rb#13200 + # source://prism/lib/prism/node.rb#13237 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#13244 + # source://prism/lib/prism/node.rb#13281 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#13249 + # source://prism/lib/prism/node.rb#13286 def type; end end end @@ -24757,65 +27821,96 @@ end # BEGIN { foo } # ^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#13268 +# source://prism/lib/prism/node.rb#13305 class Prism::PreExecutionNode < ::Prism::Node # Initialize a new PreExecutionNode node. # # @return [PreExecutionNode] a new instance of PreExecutionNode # - # source://prism/lib/prism/node.rb#13270 + # source://prism/lib/prism/node.rb#13307 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#13372 + # source://prism/lib/prism/node.rb#13409 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#13282 + # source://prism/lib/prism/node.rb#13319 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13287 + # source://prism/lib/prism/node.rb#13324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#13351 + # source://prism/lib/prism/node.rb#13388 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#13334 + # source://prism/lib/prism/node.rb#13371 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#13299 + # source://prism/lib/prism/node.rb#13336 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#13292 + # source://prism/lib/prism/node.rb#13329 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PreExecutionNode # - # source://prism/lib/prism/node.rb#13304 + # source://prism/lib/prism/node.rb#13341 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PreExecutionNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13287 + # source://prism/lib/prism/node.rb#13324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } # - # source://prism/lib/prism/node.rb#13312 + # source://prism/lib/prism/node.rb#13349 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24823,100 +27918,130 @@ class Prism::PreExecutionNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#13356 + # source://prism/lib/prism/node.rb#13393 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#13341 + # source://prism/lib/prism/node.rb#13378 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#13320 + # source://prism/lib/prism/node.rb#13357 + sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#13346 + # source://prism/lib/prism/node.rb#13383 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#13327 + # source://prism/lib/prism/node.rb#13364 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism/lib/prism/node.rb#13317 + # source://prism/lib/prism/node.rb#13354 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#13361 + # source://prism/lib/prism/node.rb#13398 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#13366 + # source://prism/lib/prism/node.rb#13403 def type; end end end # The top level node of any parse tree. # -# source://prism/lib/prism/node.rb#13382 +# source://prism/lib/prism/node.rb#13419 class Prism::ProgramNode < ::Prism::Node # Initialize a new ProgramNode node. # # @return [ProgramNode] a new instance of ProgramNode # - # source://prism/lib/prism/node.rb#13384 + # source://prism/lib/prism/node.rb#13421 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).void + end def initialize(source, node_id, location, flags, locals, statements); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#13449 + # source://prism/lib/prism/node.rb#13486 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#13394 + # source://prism/lib/prism/node.rb#13431 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13399 + # source://prism/lib/prism/node.rb#13436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#13409 + # source://prism/lib/prism/node.rb#13446 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#13404 + # source://prism/lib/prism/node.rb#13441 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?statements: StatementsNode) -> ProgramNode # - # source://prism/lib/prism/node.rb#13414 + # source://prism/lib/prism/node.rb#13451 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).returns(Prism::ProgramNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13399 + # source://prism/lib/prism/node.rb#13436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], statements: StatementsNode } # - # source://prism/lib/prism/node.rb#13422 + # source://prism/lib/prism/node.rb#13459 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24924,42 +28049,44 @@ class Prism::ProgramNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#13433 + # source://prism/lib/prism/node.rb#13470 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism/lib/prism/node.rb#13427 + # source://prism/lib/prism/node.rb#13464 + sig { returns(T::Array[Symbol]) } def locals; end # attr_reader statements: StatementsNode # - # source://prism/lib/prism/node.rb#13430 + # source://prism/lib/prism/node.rb#13467 + sig { returns(Prism::StatementsNode) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#13438 + # source://prism/lib/prism/node.rb#13475 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#13443 + # source://prism/lib/prism/node.rb#13480 def type; end end end # Flags for range and flip-flop nodes. # -# source://prism/lib/prism/node.rb#16731 +# source://prism/lib/prism/node.rb#16774 module Prism::RangeFlags; end # ... operator # -# source://prism/lib/prism/node.rb#16733 +# source://prism/lib/prism/node.rb#16776 Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # Represents the use of the `..` or `...` operators. @@ -24970,13 +28097,13 @@ Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # c if a =~ /left/ ... b =~ /right/ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#13464 +# source://prism/lib/prism/node.rb#13501 class Prism::RangeNode < ::Prism::Node # Initialize a new RangeNode node. # # @return [RangeNode] a new instance of RangeNode # - # source://prism/lib/prism/node.rb#13466 + # source://prism/lib/prism/node.rb#13503 sig do params( source: Prism::Source, @@ -24993,36 +28120,36 @@ class Prism::RangeNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#13565 + # source://prism/lib/prism/node.rb#13602 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#13477 + # source://prism/lib/prism/node.rb#13514 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13482 + # source://prism/lib/prism/node.rb#13519 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#13495 + # source://prism/lib/prism/node.rb#13532 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#13487 + # source://prism/lib/prism/node.rb#13524 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location) -> RangeNode # - # source://prism/lib/prism/node.rb#13500 + # source://prism/lib/prism/node.rb#13537 sig do params( node_id: Integer, @@ -25038,13 +28165,13 @@ class Prism::RangeNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13482 + # source://prism/lib/prism/node.rb#13519 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node?, right: Prism::node?, operator_loc: Location } # - # source://prism/lib/prism/node.rb#13508 + # source://prism/lib/prism/node.rb#13545 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25052,7 +28179,7 @@ class Prism::RangeNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13513 + # source://prism/lib/prism/node.rb#13550 sig { returns(T::Boolean) } def exclude_end?; end @@ -25061,7 +28188,7 @@ class Prism::RangeNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#13549 + # source://prism/lib/prism/node.rb#13586 sig { override.returns(String) } def inspect; end @@ -25073,19 +28200,19 @@ class Prism::RangeNode < ::Prism::Node # hello...goodbye # ^^^^^ # - # source://prism/lib/prism/node.rb#13524 + # source://prism/lib/prism/node.rb#13561 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#13544 + # source://prism/lib/prism/node.rb#13581 sig { returns(String) } def operator; end # The location of the `..` or `...` operator. # - # source://prism/lib/prism/node.rb#13537 + # source://prism/lib/prism/node.rb#13574 sig { returns(Prism::Location) } def operator_loc; end @@ -25098,20 +28225,20 @@ class Prism::RangeNode < ::Prism::Node # ^^^ # If neither right-hand or left-hand side was included, this will be a MissingNode. # - # source://prism/lib/prism/node.rb#13534 + # source://prism/lib/prism/node.rb#13571 sig { returns(T.nilable(Prism::Node)) } def right; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#13554 + # source://prism/lib/prism/node.rb#13591 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#13559 + # source://prism/lib/prism/node.rb#13596 def type; end end end @@ -25121,13 +28248,13 @@ end # 1.0r # ^^^^ # -# source://prism/lib/prism/node.rb#13578 +# source://prism/lib/prism/node.rb#13615 class Prism::RationalNode < ::Prism::Node # Initialize a new RationalNode node. # # @return [RationalNode] a new instance of RationalNode # - # source://prism/lib/prism/node.rb#13580 + # source://prism/lib/prism/node.rb#13617 sig do params( source: Prism::Source, @@ -25143,12 +28270,12 @@ class Prism::RationalNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#13669 + # source://prism/lib/prism/node.rb#13706 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#13590 + # source://prism/lib/prism/node.rb#13627 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -25156,31 +28283,31 @@ class Prism::RationalNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13623 + # source://prism/lib/prism/node.rb#13660 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13595 + # source://prism/lib/prism/node.rb#13632 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#13605 + # source://prism/lib/prism/node.rb#13642 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#13600 + # source://prism/lib/prism/node.rb#13637 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numerator: Integer, ?denominator: Integer) -> RationalNode # - # source://prism/lib/prism/node.rb#13610 + # source://prism/lib/prism/node.rb#13647 sig do params( node_id: Integer, @@ -25196,20 +28323,20 @@ class Prism::RationalNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13628 + # source://prism/lib/prism/node.rb#13665 sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13595 + # source://prism/lib/prism/node.rb#13632 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numerator: Integer, denominator: Integer } # - # source://prism/lib/prism/node.rb#13618 + # source://prism/lib/prism/node.rb#13655 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25217,7 +28344,7 @@ class Prism::RationalNode < ::Prism::Node # # 1.5r # denominator 2 # - # source://prism/lib/prism/node.rb#13650 + # source://prism/lib/prism/node.rb#13687 sig { returns(Integer) } def denominator; end @@ -25228,13 +28355,13 @@ class Prism::RationalNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13638 + # source://prism/lib/prism/node.rb#13675 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#13653 + # source://prism/lib/prism/node.rb#13690 sig { override.returns(String) } def inspect; end @@ -25242,7 +28369,7 @@ class Prism::RationalNode < ::Prism::Node # # 1.5r # numerator 3 # - # source://prism/lib/prism/node.rb#13645 + # source://prism/lib/prism/node.rb#13682 sig { returns(Integer) } def numerator; end @@ -25256,13 +28383,13 @@ class Prism::RationalNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13633 + # source://prism/lib/prism/node.rb#13670 sig { returns(T::Boolean) } def octal?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#13658 + # source://prism/lib/prism/node.rb#13695 sig { override.returns(Symbol) } def type; end @@ -25275,7 +28402,7 @@ class Prism::RationalNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#13663 + # source://prism/lib/prism/node.rb#13700 def type; end end end @@ -25285,55 +28412,63 @@ end # redo # ^^^^ # -# source://prism/lib/prism/node.rb#13681 +# source://prism/lib/prism/node.rb#13718 class Prism::RedoNode < ::Prism::Node # Initialize a new RedoNode node. # # @return [RedoNode] a new instance of RedoNode # - # source://prism/lib/prism/node.rb#13683 + # source://prism/lib/prism/node.rb#13720 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#13740 + # source://prism/lib/prism/node.rb#13777 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#13691 + # source://prism/lib/prism/node.rb#13728 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13696 + # source://prism/lib/prism/node.rb#13733 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#13706 + # source://prism/lib/prism/node.rb#13743 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#13701 + # source://prism/lib/prism/node.rb#13738 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RedoNode # - # source://prism/lib/prism/node.rb#13711 + # source://prism/lib/prism/node.rb#13748 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RedoNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13696 + # source://prism/lib/prism/node.rb#13733 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#13719 + # source://prism/lib/prism/node.rb#13756 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -25341,20 +28476,20 @@ class Prism::RedoNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#13724 + # source://prism/lib/prism/node.rb#13761 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#13729 + # source://prism/lib/prism/node.rb#13766 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#13734 + # source://prism/lib/prism/node.rb#13771 def type; end end end @@ -25491,62 +28626,62 @@ class Prism::Reflection::StringField < ::Prism::Reflection::Field; end # Flags for regular expression and match last line nodes. # -# source://prism/lib/prism/node.rb#16737 +# source://prism/lib/prism/node.rb#16780 module Prism::RegularExpressionFlags; end # n - forces the ASCII-8BIT encoding # -# source://prism/lib/prism/node.rb#16754 +# source://prism/lib/prism/node.rb#16797 Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) # e - forces the EUC-JP encoding # -# source://prism/lib/prism/node.rb#16751 +# source://prism/lib/prism/node.rb#16794 Prism::RegularExpressionFlags::EUC_JP = T.let(T.unsafe(nil), Integer) # x - ignores whitespace and allows comments in regular expressions # -# source://prism/lib/prism/node.rb#16742 +# source://prism/lib/prism/node.rb#16785 Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to binary # -# source://prism/lib/prism/node.rb#16766 +# source://prism/lib/prism/node.rb#16809 Prism::RegularExpressionFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to US-ASCII # -# source://prism/lib/prism/node.rb#16769 +# source://prism/lib/prism/node.rb#16812 Prism::RegularExpressionFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism/lib/prism/node.rb#16763 +# source://prism/lib/prism/node.rb#16806 Prism::RegularExpressionFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # i - ignores the case of characters when matching # -# source://prism/lib/prism/node.rb#16739 +# source://prism/lib/prism/node.rb#16782 Prism::RegularExpressionFlags::IGNORE_CASE = T.let(T.unsafe(nil), Integer) # m - allows $ to match the end of lines within strings # -# source://prism/lib/prism/node.rb#16745 +# source://prism/lib/prism/node.rb#16788 Prism::RegularExpressionFlags::MULTI_LINE = T.let(T.unsafe(nil), Integer) # o - only interpolates values into the regular expression once # -# source://prism/lib/prism/node.rb#16748 +# source://prism/lib/prism/node.rb#16791 Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) # u - forces the UTF-8 encoding # -# source://prism/lib/prism/node.rb#16760 +# source://prism/lib/prism/node.rb#16803 Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) # s - forces the Windows-31J encoding # -# source://prism/lib/prism/node.rb#16757 +# source://prism/lib/prism/node.rb#16800 Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # Represents a regular expression literal with no interpolation. @@ -25554,7 +28689,7 @@ Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # /foo/i # ^^^^^^ # -# source://prism/lib/prism/node.rb#13749 +# source://prism/lib/prism/node.rb#13786 class Prism::RegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions @@ -25562,7 +28697,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [RegularExpressionNode] a new instance of RegularExpressionNode # - # source://prism/lib/prism/node.rb#13751 + # source://prism/lib/prism/node.rb#13788 sig do params( source: Prism::Source, @@ -25580,12 +28715,12 @@ class Prism::RegularExpressionNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#13906 + # source://prism/lib/prism/node.rb#13943 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#13763 + # source://prism/lib/prism/node.rb#13800 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -25593,55 +28728,55 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13821 + # source://prism/lib/prism/node.rb#13858 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13768 + # source://prism/lib/prism/node.rb#13805 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#13885 + # source://prism/lib/prism/node.rb#13922 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#13865 + # source://prism/lib/prism/node.rb#13902 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#13778 + # source://prism/lib/prism/node.rb#13815 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#13773 + # source://prism/lib/prism/node.rb#13810 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism/lib/prism/node.rb#13880 + # source://prism/lib/prism/node.rb#13917 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism/lib/prism/node.rb#13858 + # source://prism/lib/prism/node.rb#13895 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> RegularExpressionNode # - # source://prism/lib/prism/node.rb#13783 + # source://prism/lib/prism/node.rb#13820 sig do params( node_id: Integer, @@ -25658,13 +28793,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13768 + # source://prism/lib/prism/node.rb#13805 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism/lib/prism/node.rb#13791 + # source://prism/lib/prism/node.rb#13828 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25672,7 +28807,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13816 + # source://prism/lib/prism/node.rb#13853 sig { returns(T::Boolean) } def euc_jp?; end @@ -25680,7 +28815,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13801 + # source://prism/lib/prism/node.rb#13838 sig { returns(T::Boolean) } def extended?; end @@ -25691,7 +28826,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13841 + # source://prism/lib/prism/node.rb#13878 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -25699,7 +28834,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13846 + # source://prism/lib/prism/node.rb#13883 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -25707,7 +28842,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13836 + # source://prism/lib/prism/node.rb#13873 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -25715,13 +28850,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13796 + # source://prism/lib/prism/node.rb#13833 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#13890 + # source://prism/lib/prism/node.rb#13927 sig { override.returns(String) } def inspect; end @@ -25729,7 +28864,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13806 + # source://prism/lib/prism/node.rb#13843 sig { returns(T::Boolean) } def multi_line?; end @@ -25737,19 +28872,19 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13811 + # source://prism/lib/prism/node.rb#13848 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#13875 + # source://prism/lib/prism/node.rb#13912 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#13851 + # source://prism/lib/prism/node.rb#13888 sig { returns(Prism::Location) } def opening_loc; end @@ -25758,13 +28893,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#13895 + # source://prism/lib/prism/node.rb#13932 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism/lib/prism/node.rb#13872 + # source://prism/lib/prism/node.rb#13909 sig { returns(String) } def unescaped; end @@ -25772,7 +28907,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13831 + # source://prism/lib/prism/node.rb#13868 sig { returns(T::Boolean) } def utf_8?; end @@ -25780,14 +28915,14 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13826 + # source://prism/lib/prism/node.rb#13863 sig { returns(T::Boolean) } def windows_31j?; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#13900 + # source://prism/lib/prism/node.rb#13937 def type; end end end @@ -25807,13 +28942,13 @@ end # ^^ # end # -# source://prism/lib/prism/node.rb#13921 +# source://prism/lib/prism/node.rb#13958 class Prism::RequiredKeywordParameterNode < ::Prism::Node # Initialize a new RequiredKeywordParameterNode node. # # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode # - # source://prism/lib/prism/node.rb#13923 + # source://prism/lib/prism/node.rb#13960 sig do params( source: Prism::Source, @@ -25829,36 +28964,36 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#13997 + # source://prism/lib/prism/node.rb#14034 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#13933 + # source://prism/lib/prism/node.rb#13970 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13938 + # source://prism/lib/prism/node.rb#13975 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#13948 + # source://prism/lib/prism/node.rb#13985 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#13943 + # source://prism/lib/prism/node.rb#13980 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location) -> RequiredKeywordParameterNode # - # source://prism/lib/prism/node.rb#13953 + # source://prism/lib/prism/node.rb#13990 sig do params( node_id: Integer, @@ -25873,13 +29008,13 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#13938 + # source://prism/lib/prism/node.rb#13975 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location } # - # source://prism/lib/prism/node.rb#13961 + # source://prism/lib/prism/node.rb#13998 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25888,19 +29023,19 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#13981 + # source://prism/lib/prism/node.rb#14018 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism/lib/prism/node.rb#13971 + # source://prism/lib/prism/node.rb#14008 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism/lib/prism/node.rb#13974 + # source://prism/lib/prism/node.rb#14011 sig { returns(Prism::Location) } def name_loc; end @@ -25908,20 +29043,20 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#13966 + # source://prism/lib/prism/node.rb#14003 sig { returns(T::Boolean) } def repeated_parameter?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#13986 + # source://prism/lib/prism/node.rb#14023 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#13991 + # source://prism/lib/prism/node.rb#14028 def type; end end end @@ -25932,168 +29067,196 @@ end # ^ # end # -# source://prism/lib/prism/node.rb#14010 +# source://prism/lib/prism/node.rb#14047 class Prism::RequiredParameterNode < ::Prism::Node # Initialize a new RequiredParameterNode node. # # @return [RequiredParameterNode] a new instance of RequiredParameterNode # - # source://prism/lib/prism/node.rb#14012 + # source://prism/lib/prism/node.rb#14049 sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # + # source://prism/lib/prism/node.rb#14115 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism/lib/prism/node.rb#14058 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism/lib/prism/node.rb#14063 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def child_nodes; end + + # def comment_targets: () -> Array[Node | Location] + # + # source://prism/lib/prism/node.rb#14073 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } + def comment_targets; end + + # def compact_child_nodes: () -> Array[Node] + # + # source://prism/lib/prism/node.rb#14068 + sig { override.returns(T::Array[Prism::Node]) } + def compact_child_nodes; end + + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> RequiredParameterNode + # # source://prism/lib/prism/node.rb#14078 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::RequiredParameterNode) + end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end + + # def child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism/lib/prism/node.rb#14063 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } + def deconstruct; end + + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } + # + # source://prism/lib/prism/node.rb#14086 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism/lib/prism/node.rb#14099 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism/lib/prism/node.rb#14096 + sig { returns(Symbol) } + def name; end + + # def repeated_parameter?: () -> bool + # + # @return [Boolean] + # + # source://prism/lib/prism/node.rb#14091 + sig { returns(T::Boolean) } + def repeated_parameter?; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism/lib/prism/node.rb#14104 + sig { override.returns(Symbol) } + def type; end + + class << self + # Return a symbol representation of this node type. See `Node::type`. + # + # source://prism/lib/prism/node.rb#14109 + def type; end + end +end + +# Represents an expression modified with a rescue. +# +# foo rescue nil +# ^^^^^^^^^^^^^^ +# +# source://prism/lib/prism/node.rb#14126 +class Prism::RescueModifierNode < ::Prism::Node + # Initialize a new RescueModifierNode node. + # + # @return [RescueModifierNode] a new instance of RescueModifierNode + # + # source://prism/lib/prism/node.rb#14128 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).void + end + def initialize(source, node_id, location, flags, expression, keyword_loc, rescue_expression); end + + # Implements case-equality for the node. This is effectively == but without + # comparing the value of locations. Locations are checked only for presence. + # + # source://prism/lib/prism/node.rb#14206 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#14021 + # source://prism/lib/prism/node.rb#14139 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14026 + # source://prism/lib/prism/node.rb#14144 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#14036 + # source://prism/lib/prism/node.rb#14154 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#14031 + # source://prism/lib/prism/node.rb#14149 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> RequiredParameterNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node) -> RescueModifierNode # - # source://prism/lib/prism/node.rb#14041 + # source://prism/lib/prism/node.rb#14159 sig do params( node_id: Integer, location: Prism::Location, flags: Integer, - name: Symbol - ).returns(Prism::RequiredParameterNode) - end - def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism/lib/prism/node.rb#14026 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } - # - # source://prism/lib/prism/node.rb#14049 - sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } - def deconstruct_keys(keys); end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism/lib/prism/node.rb#14062 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism/lib/prism/node.rb#14059 - sig { returns(Symbol) } - def name; end - - # def repeated_parameter?: () -> bool - # - # @return [Boolean] - # - # source://prism/lib/prism/node.rb#14054 - sig { returns(T::Boolean) } - def repeated_parameter?; end - - # Return a symbol representation of this node type. See `Node#type`. - # - # source://prism/lib/prism/node.rb#14067 - sig { override.returns(Symbol) } - def type; end - - class << self - # Return a symbol representation of this node type. See `Node::type`. - # - # source://prism/lib/prism/node.rb#14072 - def type; end + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).returns(Prism::RescueModifierNode) end -end - -# Represents an expression modified with a rescue. -# -# foo rescue nil -# ^^^^^^^^^^^^^^ -# -# source://prism/lib/prism/node.rb#14089 -class Prism::RescueModifierNode < ::Prism::Node - # Initialize a new RescueModifierNode node. - # - # @return [RescueModifierNode] a new instance of RescueModifierNode - # - # source://prism/lib/prism/node.rb#14091 - def initialize(source, node_id, location, flags, expression, keyword_loc, rescue_expression); end - - # Implements case-equality for the node. This is effectively == but without - # comparing the value of locations. Locations are checked only for presence. - # - # source://prism/lib/prism/node.rb#14169 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism/lib/prism/node.rb#14102 - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism/lib/prism/node.rb#14107 - def child_nodes; end - - # def comment_targets: () -> Array[Node | Location] - # - # source://prism/lib/prism/node.rb#14117 - def comment_targets; end - - # def compact_child_nodes: () -> Array[Node] - # - # source://prism/lib/prism/node.rb#14112 - def compact_child_nodes; end - - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node) -> RescueModifierNode - # - # source://prism/lib/prism/node.rb#14122 def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14107 + # source://prism/lib/prism/node.rb#14144 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node } # - # source://prism/lib/prism/node.rb#14130 + # source://prism/lib/prism/node.rb#14167 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node # - # source://prism/lib/prism/node.rb#14135 + # source://prism/lib/prism/node.rb#14172 + sig { returns(Prism::Node) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -26101,18 +29264,20 @@ class Prism::RescueModifierNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#14153 + # source://prism/lib/prism/node.rb#14190 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#14148 + # source://prism/lib/prism/node.rb#14185 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#14138 + # source://prism/lib/prism/node.rb#14175 + sig { returns(Prism::Location) } def keyword_loc; end # source://prism/lib/prism/parse_result/newlines.rb#115 @@ -26120,19 +29285,20 @@ class Prism::RescueModifierNode < ::Prism::Node # attr_reader rescue_expression: Prism::node # - # source://prism/lib/prism/node.rb#14145 + # source://prism/lib/prism/node.rb#14182 + sig { returns(Prism::Node) } def rescue_expression; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#14158 + # source://prism/lib/prism/node.rb#14195 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#14163 + # source://prism/lib/prism/node.rb#14200 def type; end end end @@ -26145,41 +29311,59 @@ end # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # end # -# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. +# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field. # -# source://prism/lib/prism/node.rb#14186 +# source://prism/lib/prism/node.rb#14223 class Prism::RescueNode < ::Prism::Node # Initialize a new RescueNode node. # # @return [RescueNode] a new instance of RescueNode # - # source://prism/lib/prism/node.rb#14188 + # source://prism/lib/prism/node.rb#14225 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).void + end def initialize(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, statements, subsequent); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#14298 + # source://prism/lib/prism/node.rb#14335 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#14202 + # source://prism/lib/prism/node.rb#14239 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14207 + # source://prism/lib/prism/node.rb#14244 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#14222 + # source://prism/lib/prism/node.rb#14259 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#14212 + # source://prism/lib/prism/node.rb#14249 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns the subsequent rescue clause of the rescue node. This method is @@ -26188,25 +29372,41 @@ class Prism::RescueNode < ::Prism::Node # source://prism/lib/prism/node_ext.rb#494 def consequent; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: Prism::node?, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode # - # source://prism/lib/prism/node.rb#14227 + # source://prism/lib/prism/node.rb#14264 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).returns(Prism::RescueNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14207 + # source://prism/lib/prism/node.rb#14244 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: Prism::node?, statements: StatementsNode?, subsequent: RescueNode? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, statements: StatementsNode?, subsequent: RescueNode? } # - # source://prism/lib/prism/node.rb#14235 + # source://prism/lib/prism/node.rb#14272 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader exceptions: Array[Prism::node] # - # source://prism/lib/prism/node.rb#14247 + # source://prism/lib/prism/node.rb#14284 + sig { returns(T::Array[Prism::Node]) } def exceptions; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -26214,55 +29414,64 @@ class Prism::RescueNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#14282 + # source://prism/lib/prism/node.rb#14319 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#14272 + # source://prism/lib/prism/node.rb#14309 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#14240 + # source://prism/lib/prism/node.rb#14277 + sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # - # source://prism/lib/prism/node.rb#14277 + # source://prism/lib/prism/node.rb#14314 + sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism/lib/prism/node.rb#14250 + # source://prism/lib/prism/node.rb#14287 + sig { returns(T.nilable(Prism::Location)) } def operator_loc; end - # attr_reader reference: Prism::node? + # attr_reader reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil # - # source://prism/lib/prism/node.rb#14263 + # source://prism/lib/prism/node.rb#14300 + sig do + returns(T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode))) + end def reference; end # attr_reader statements: StatementsNode? # - # source://prism/lib/prism/node.rb#14266 + # source://prism/lib/prism/node.rb#14303 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # attr_reader subsequent: RescueNode? # - # source://prism/lib/prism/node.rb#14269 + # source://prism/lib/prism/node.rb#14306 + sig { returns(T.nilable(Prism::RescueNode)) } def subsequent; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#14287 + # source://prism/lib/prism/node.rb#14324 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#14292 + # source://prism/lib/prism/node.rb#14329 def type; end end end @@ -26273,13 +29482,13 @@ end # ^^ # end # -# source://prism/lib/prism/node.rb#14315 +# source://prism/lib/prism/node.rb#14352 class Prism::RestParameterNode < ::Prism::Node # Initialize a new RestParameterNode node. # # @return [RestParameterNode] a new instance of RestParameterNode # - # source://prism/lib/prism/node.rb#14317 + # source://prism/lib/prism/node.rb#14354 sig do params( source: Prism::Source, @@ -26296,36 +29505,36 @@ class Prism::RestParameterNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#14410 + # source://prism/lib/prism/node.rb#14447 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#14328 + # source://prism/lib/prism/node.rb#14365 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14333 + # source://prism/lib/prism/node.rb#14370 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#14343 + # source://prism/lib/prism/node.rb#14380 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#14338 + # source://prism/lib/prism/node.rb#14375 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> RestParameterNode # - # source://prism/lib/prism/node.rb#14348 + # source://prism/lib/prism/node.rb#14385 sig do params( node_id: Integer, @@ -26341,13 +29550,13 @@ class Prism::RestParameterNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14333 + # source://prism/lib/prism/node.rb#14370 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol?, name_loc: Location?, operator_loc: Location } # - # source://prism/lib/prism/node.rb#14356 + # source://prism/lib/prism/node.rb#14393 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -26356,31 +29565,31 @@ class Prism::RestParameterNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#14394 + # source://prism/lib/prism/node.rb#14431 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism/lib/prism/node.rb#14366 + # source://prism/lib/prism/node.rb#14403 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism/lib/prism/node.rb#14369 + # source://prism/lib/prism/node.rb#14406 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#14389 + # source://prism/lib/prism/node.rb#14426 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#14382 + # source://prism/lib/prism/node.rb#14419 sig { returns(Prism::Location) } def operator_loc; end @@ -26388,20 +29597,20 @@ class Prism::RestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#14361 + # source://prism/lib/prism/node.rb#14398 sig { returns(T::Boolean) } def repeated_parameter?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#14399 + # source://prism/lib/prism/node.rb#14436 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#14404 + # source://prism/lib/prism/node.rb#14441 def type; end end end @@ -26410,13 +29619,13 @@ end # the requested structure, any comments that were encounters, and any errors # that were encountered. # -# source://prism/lib/prism/parse_result.rb#530 +# source://prism/lib/prism/parse_result.rb#662 class Prism::Result # Create a new result object with the given values. # # @return [Result] a new instance of Result # - # source://prism/lib/prism/parse_result.rb#552 + # source://prism/lib/prism/parse_result.rb#684 sig do params( comments: T::Array[Prism::Comment], @@ -26429,9 +29638,19 @@ class Prism::Result end def initialize(comments, magic_comments, data_loc, errors, warnings, source); end + # Create a code units cache for the given encoding. + # + # source://prism/lib/prism/parse_result.rb#716 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + # The list of comments that were encountered during parsing. # - # source://prism/lib/prism/parse_result.rb#532 + # source://prism/lib/prism/parse_result.rb#664 sig { returns(T::Array[Prism::Comment]) } def comments; end @@ -26439,25 +29658,25 @@ class Prism::Result # and the rest of the content of the file. This content is loaded into the # DATA constant when the file being parsed is the main file being executed. # - # source://prism/lib/prism/parse_result.rb#540 + # source://prism/lib/prism/parse_result.rb#672 sig { returns(T.nilable(Prism::Location)) } def data_loc; end # Implement the hash pattern matching interface for Result. # - # source://prism/lib/prism/parse_result.rb#562 + # source://prism/lib/prism/parse_result.rb#694 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns the encoding of the source code that was parsed. # - # source://prism/lib/prism/parse_result.rb#567 + # source://prism/lib/prism/parse_result.rb#699 sig { returns(Encoding) } def encoding; end # The list of errors that were generated during parsing. # - # source://prism/lib/prism/parse_result.rb#543 + # source://prism/lib/prism/parse_result.rb#675 sig { returns(T::Array[Prism::ParseError]) } def errors; end @@ -26466,19 +29685,19 @@ class Prism::Result # # @return [Boolean] # - # source://prism/lib/prism/parse_result.rb#579 + # source://prism/lib/prism/parse_result.rb#711 sig { returns(T::Boolean) } def failure?; end # The list of magic comments that were encountered during parsing. # - # source://prism/lib/prism/parse_result.rb#535 + # source://prism/lib/prism/parse_result.rb#667 sig { returns(T::Array[Prism::MagicComment]) } def magic_comments; end # A Source instance that represents the source code that was parsed. # - # source://prism/lib/prism/parse_result.rb#549 + # source://prism/lib/prism/parse_result.rb#681 sig { returns(Prism::Source) } def source; end @@ -26487,13 +29706,13 @@ class Prism::Result # # @return [Boolean] # - # source://prism/lib/prism/parse_result.rb#573 + # source://prism/lib/prism/parse_result.rb#705 sig { returns(T::Boolean) } def success?; end # The list of warnings that were generated during parsing. # - # source://prism/lib/prism/parse_result.rb#546 + # source://prism/lib/prism/parse_result.rb#678 sig { returns(T::Array[Prism::ParseWarning]) } def warnings; end end @@ -26503,55 +29722,63 @@ end # retry # ^^^^^ # -# source://prism/lib/prism/node.rb#14423 +# source://prism/lib/prism/node.rb#14460 class Prism::RetryNode < ::Prism::Node # Initialize a new RetryNode node. # # @return [RetryNode] a new instance of RetryNode # - # source://prism/lib/prism/node.rb#14425 + # source://prism/lib/prism/node.rb#14462 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#14482 + # source://prism/lib/prism/node.rb#14519 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#14433 + # source://prism/lib/prism/node.rb#14470 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14438 + # source://prism/lib/prism/node.rb#14475 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#14448 + # source://prism/lib/prism/node.rb#14485 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#14443 + # source://prism/lib/prism/node.rb#14480 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RetryNode # - # source://prism/lib/prism/node.rb#14453 + # source://prism/lib/prism/node.rb#14490 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RetryNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14438 + # source://prism/lib/prism/node.rb#14475 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#14461 + # source://prism/lib/prism/node.rb#14498 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -26559,20 +29786,20 @@ class Prism::RetryNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#14466 + # source://prism/lib/prism/node.rb#14503 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#14471 + # source://prism/lib/prism/node.rb#14508 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#14476 + # source://prism/lib/prism/node.rb#14513 def type; end end end @@ -26582,60 +29809,86 @@ end # return 1 # ^^^^^^^^ # -# source://prism/lib/prism/node.rb#14491 +# source://prism/lib/prism/node.rb#14528 class Prism::ReturnNode < ::Prism::Node # Initialize a new ReturnNode node. # # @return [ReturnNode] a new instance of ReturnNode # - # source://prism/lib/prism/node.rb#14493 + # source://prism/lib/prism/node.rb#14530 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).void + end def initialize(source, node_id, location, flags, keyword_loc, arguments); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#14569 + # source://prism/lib/prism/node.rb#14606 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#14503 + # source://prism/lib/prism/node.rb#14540 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism/lib/prism/node.rb#14545 + # source://prism/lib/prism/node.rb#14582 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14508 + # source://prism/lib/prism/node.rb#14545 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#14520 + # source://prism/lib/prism/node.rb#14557 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#14513 + # source://prism/lib/prism/node.rb#14550 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?) -> ReturnNode # - # source://prism/lib/prism/node.rb#14525 + # source://prism/lib/prism/node.rb#14562 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).returns(Prism::ReturnNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14508 + # source://prism/lib/prism/node.rb#14545 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, arguments: ArgumentsNode? } # - # source://prism/lib/prism/node.rb#14533 + # source://prism/lib/prism/node.rb#14570 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -26643,30 +29896,32 @@ class Prism::ReturnNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#14553 + # source://prism/lib/prism/node.rb#14590 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#14548 + # source://prism/lib/prism/node.rb#14585 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#14538 + # source://prism/lib/prism/node.rb#14575 + sig { returns(Prism::Location) } def keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#14558 + # source://prism/lib/prism/node.rb#14595 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#14563 + # source://prism/lib/prism/node.rb#14600 def type; end end end @@ -26676,55 +29931,63 @@ end # self # ^^^^ # -# source://prism/lib/prism/node.rb#14580 +# source://prism/lib/prism/node.rb#14617 class Prism::SelfNode < ::Prism::Node # Initialize a new SelfNode node. # # @return [SelfNode] a new instance of SelfNode # - # source://prism/lib/prism/node.rb#14582 + # source://prism/lib/prism/node.rb#14619 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#14639 + # source://prism/lib/prism/node.rb#14676 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#14590 + # source://prism/lib/prism/node.rb#14627 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14595 + # source://prism/lib/prism/node.rb#14632 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#14605 + # source://prism/lib/prism/node.rb#14642 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#14600 + # source://prism/lib/prism/node.rb#14637 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SelfNode # - # source://prism/lib/prism/node.rb#14610 + # source://prism/lib/prism/node.rb#14647 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SelfNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14595 + # source://prism/lib/prism/node.rb#14632 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#14618 + # source://prism/lib/prism/node.rb#14655 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -26732,20 +29995,20 @@ class Prism::SelfNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#14623 + # source://prism/lib/prism/node.rb#14660 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#14628 + # source://prism/lib/prism/node.rb#14665 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#14633 + # source://prism/lib/prism/node.rb#14670 def type; end end end @@ -26763,154 +30026,154 @@ module Prism::Serialize # Deserialize the tokens represented by the given string into a parse # result. # - # source://prism/lib/prism/serialize.rb#40 + # source://prism/lib/prism/serialize.rb#51 def load_tokens(source, serialized); end end end -# source://prism/lib/prism/serialize.rb#44 +# source://prism/lib/prism/serialize.rb#55 class Prism::Serialize::Loader # @return [Loader] a new instance of Loader # - # source://prism/lib/prism/serialize.rb#80 + # source://prism/lib/prism/serialize.rb#91 def initialize(source, serialized); end # Returns the value of attribute constant_pool. # - # source://prism/lib/prism/serialize.rb#77 + # source://prism/lib/prism/serialize.rb#88 def constant_pool; end # Returns the value of attribute constant_pool_offset. # - # source://prism/lib/prism/serialize.rb#77 + # source://prism/lib/prism/serialize.rb#88 def constant_pool_offset; end # Returns the value of attribute encoding. # - # source://prism/lib/prism/serialize.rb#76 + # source://prism/lib/prism/serialize.rb#87 def encoding; end # Returns the value of attribute input. # - # source://prism/lib/prism/serialize.rb#76 + # source://prism/lib/prism/serialize.rb#87 def input; end # Returns the value of attribute io. # - # source://prism/lib/prism/serialize.rb#76 + # source://prism/lib/prism/serialize.rb#87 def io; end - # source://prism/lib/prism/serialize.rb#118 + # source://prism/lib/prism/serialize.rb#129 def load_comments; end - # source://prism/lib/prism/serialize.rb#104 + # source://prism/lib/prism/serialize.rb#115 def load_encoding; end - # source://prism/lib/prism/serialize.rb#95 + # source://prism/lib/prism/serialize.rb#106 def load_header; end - # source://prism/lib/prism/serialize.rb#114 + # source://prism/lib/prism/serialize.rb#125 def load_line_offsets; end - # source://prism/lib/prism/serialize.rb#446 + # source://prism/lib/prism/serialize.rb#462 def load_metadata; end - # source://prism/lib/prism/serialize.rb#480 + # source://prism/lib/prism/serialize.rb#496 def load_nodes; end - # source://prism/lib/prism/serialize.rb#494 + # source://prism/lib/prism/serialize.rb#510 def load_result; end - # source://prism/lib/prism/serialize.rb#110 + # source://prism/lib/prism/serialize.rb#121 def load_start_line; end - # source://prism/lib/prism/serialize.rb#455 + # source://prism/lib/prism/serialize.rb#471 def load_tokens; end - # source://prism/lib/prism/serialize.rb#468 + # source://prism/lib/prism/serialize.rb#484 def load_tokens_result; end # Returns the value of attribute serialized. # - # source://prism/lib/prism/serialize.rb#76 + # source://prism/lib/prism/serialize.rb#87 def serialized; end # Returns the value of attribute source. # - # source://prism/lib/prism/serialize.rb#77 + # source://prism/lib/prism/serialize.rb#88 def source; end # Returns the value of attribute start_line. # - # source://prism/lib/prism/serialize.rb#78 + # source://prism/lib/prism/serialize.rb#89 def start_line; end private - # source://prism/lib/prism/serialize.rb#580 + # source://prism/lib/prism/serialize.rb#596 def load_constant(index); end - # source://prism/lib/prism/serialize.rb#533 + # source://prism/lib/prism/serialize.rb#549 def load_double; end - # source://prism/lib/prism/serialize.rb#548 + # source://prism/lib/prism/serialize.rb#564 def load_embedded_string; end - # source://prism/lib/prism/serialize.rb#610 + # source://prism/lib/prism/serialize.rb#626 def load_error_level; end - # source://prism/lib/prism/serialize.rb#522 + # source://prism/lib/prism/serialize.rb#538 def load_integer; end - # source://prism/lib/prism/serialize.rb#564 + # source://prism/lib/prism/serialize.rb#580 def load_location; end - # source://prism/lib/prism/serialize.rb#568 + # source://prism/lib/prism/serialize.rb#584 def load_location_object; end - # source://prism/lib/prism/serialize.rb#639 + # source://prism/lib/prism/serialize.rb#655 def load_node; end - # source://prism/lib/prism/serialize.rb#605 + # source://prism/lib/prism/serialize.rb#621 def load_optional_constant; end - # source://prism/lib/prism/serialize.rb#572 + # source://prism/lib/prism/serialize.rb#588 def load_optional_location; end - # source://prism/lib/prism/serialize.rb#576 + # source://prism/lib/prism/serialize.rb#592 def load_optional_location_object; end - # source://prism/lib/prism/serialize.rb#541 + # source://prism/lib/prism/serialize.rb#557 def load_optional_node; end - # source://prism/lib/prism/serialize.rb#601 + # source://prism/lib/prism/serialize.rb#617 def load_required_constant; end - # source://prism/lib/prism/serialize.rb#552 + # source://prism/lib/prism/serialize.rb#568 def load_string; end - # source://prism/lib/prism/serialize.rb#537 + # source://prism/lib/prism/serialize.rb#553 def load_uint32; end - # source://prism/lib/prism/serialize.rb#517 + # source://prism/lib/prism/serialize.rb#533 def load_varsint; end # variable-length integer using https://en.wikipedia.org/wiki/LEB128 # This is also what protobuf uses: https://protobuf.dev/programming-guides/encoding/#varints # - # source://prism/lib/prism/serialize.rb#503 + # source://prism/lib/prism/serialize.rb#519 def load_varuint; end - # source://prism/lib/prism/serialize.rb#625 + # source://prism/lib/prism/serialize.rb#641 def load_warning_level; end end -# source://prism/lib/prism/serialize.rb#127 +# source://prism/lib/prism/serialize.rb#138 Prism::Serialize::Loader::DIAGNOSTIC_TYPES = T.let(T.unsafe(nil), Array) # StringIO is synchronized and that adds a high overhead on TruffleRuby. # -# source://prism/lib/prism/serialize.rb#72 +# source://prism/lib/prism/serialize.rb#83 Prism::Serialize::Loader::FastStringIO = StringIO # The major version of prism that we are expecting to find in the serialized @@ -26933,7 +30196,7 @@ Prism::Serialize::PATCH_VERSION = T.let(T.unsafe(nil), Integer) # The token types that can be indexed by their enum values. # -# source://prism/lib/prism/serialize.rb#1721 +# source://prism/lib/prism/serialize.rb#1737 Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # This node wraps a constant write to indicate that when the value is written, it should have its shareability state modified. @@ -26941,13 +30204,13 @@ Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # C = { a: 1 } # ^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#14649 +# source://prism/lib/prism/node.rb#14686 class Prism::ShareableConstantNode < ::Prism::Node # Initialize a new ShareableConstantNode node. # # @return [ShareableConstantNode] a new instance of ShareableConstantNode # - # source://prism/lib/prism/node.rb#14651 + # source://prism/lib/prism/node.rb#14688 sig do params( source: Prism::Source, @@ -26962,36 +30225,36 @@ class Prism::ShareableConstantNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#14727 + # source://prism/lib/prism/node.rb#14764 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#14660 + # source://prism/lib/prism/node.rb#14697 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14665 + # source://prism/lib/prism/node.rb#14702 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#14675 + # source://prism/lib/prism/node.rb#14712 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#14670 + # source://prism/lib/prism/node.rb#14707 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode) -> ShareableConstantNode # - # source://prism/lib/prism/node.rb#14680 + # source://prism/lib/prism/node.rb#14717 sig do params( node_id: Integer, @@ -27005,13 +30268,13 @@ class Prism::ShareableConstantNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14665 + # source://prism/lib/prism/node.rb#14702 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode } # - # source://prism/lib/prism/node.rb#14688 + # source://prism/lib/prism/node.rb#14725 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27019,7 +30282,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#14703 + # source://prism/lib/prism/node.rb#14740 sig { returns(T::Boolean) } def experimental_copy?; end @@ -27027,7 +30290,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#14698 + # source://prism/lib/prism/node.rb#14735 sig { returns(T::Boolean) } def experimental_everything?; end @@ -27036,7 +30299,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#14711 + # source://prism/lib/prism/node.rb#14748 sig { override.returns(String) } def inspect; end @@ -27044,19 +30307,19 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#14693 + # source://prism/lib/prism/node.rb#14730 sig { returns(T::Boolean) } def literal?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#14716 + # source://prism/lib/prism/node.rb#14753 sig { override.returns(Symbol) } def type; end # The constant write that should be modified with the shareability state. # - # source://prism/lib/prism/node.rb#14708 + # source://prism/lib/prism/node.rb#14745 sig do returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) end @@ -27065,29 +30328,29 @@ class Prism::ShareableConstantNode < ::Prism::Node class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#14721 + # source://prism/lib/prism/node.rb#14758 def type; end end end # Flags for shareable constant nodes. # -# source://prism/lib/prism/node.rb#16773 +# source://prism/lib/prism/node.rb#16816 module Prism::ShareableConstantNodeFlags; end # constant writes that should be modified with shareable constant value experimental copy # -# source://prism/lib/prism/node.rb#16781 +# source://prism/lib/prism/node.rb#16824 Prism::ShareableConstantNodeFlags::EXPERIMENTAL_COPY = T.let(T.unsafe(nil), Integer) # constant writes that should be modified with shareable constant value experimental everything # -# source://prism/lib/prism/node.rb#16778 +# source://prism/lib/prism/node.rb#16821 Prism::ShareableConstantNodeFlags::EXPERIMENTAL_EVERYTHING = T.let(T.unsafe(nil), Integer) # constant writes that should be modified with shareable constant value literal # -# source://prism/lib/prism/node.rb#16775 +# source://prism/lib/prism/node.rb#16818 Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # Represents a singleton class declaration involving the `class` keyword. @@ -27095,85 +30358,124 @@ Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # class << self end # ^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#14738 +# source://prism/lib/prism/node.rb#14775 class Prism::SingletonClassNode < ::Prism::Node # Initialize a new SingletonClassNode node. # # @return [SingletonClassNode] a new instance of SingletonClassNode # - # source://prism/lib/prism/node.rb#14740 + # source://prism/lib/prism/node.rb#14777 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#14851 + # source://prism/lib/prism/node.rb#14888 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#14754 + # source://prism/lib/prism/node.rb#14791 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism/lib/prism/node.rb#14810 + # source://prism/lib/prism/node.rb#14847 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14759 + # source://prism/lib/prism/node.rb#14796 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism/lib/prism/node.rb#14820 + # source://prism/lib/prism/node.rb#14857 + sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism/lib/prism/node.rb#14793 + # source://prism/lib/prism/node.rb#14830 + sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#14772 + # source://prism/lib/prism/node.rb#14809 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#14764 + # source://prism/lib/prism/node.rb#14801 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location) -> SingletonClassNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location) -> SingletonClassNode # - # source://prism/lib/prism/node.rb#14777 + # source://prism/lib/prism/node.rb#14814 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).returns(Prism::SingletonClassNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14759 + # source://prism/lib/prism/node.rb#14796 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: Prism::node?, end_keyword_loc: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location } # - # source://prism/lib/prism/node.rb#14785 + # source://prism/lib/prism/node.rb#14822 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism/lib/prism/node.rb#14830 + # source://prism/lib/prism/node.rb#14867 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism/lib/prism/node.rb#14813 + # source://prism/lib/prism/node.rb#14850 + sig { returns(Prism::Location) } def end_keyword_loc; end # attr_reader expression: Prism::node # - # source://prism/lib/prism/node.rb#14807 + # source://prism/lib/prism/node.rb#14844 + sig { returns(Prism::Node) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27181,35 +30483,38 @@ class Prism::SingletonClassNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#14835 + # source://prism/lib/prism/node.rb#14872 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism/lib/prism/node.rb#14790 + # source://prism/lib/prism/node.rb#14827 + sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#14825 + # source://prism/lib/prism/node.rb#14862 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#14800 + # source://prism/lib/prism/node.rb#14837 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#14840 + # source://prism/lib/prism/node.rb#14877 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#14845 + # source://prism/lib/prism/node.rb#14882 def type; end end end @@ -27224,26 +30529,37 @@ class Prism::Source # # @return [Source] a new instance of Source # - # source://prism/lib/prism/parse_result.rb#30 + # source://prism/lib/prism/parse_result.rb#45 sig { params(source: String, start_line: Integer, offsets: T::Array[Integer]).void } def initialize(source, start_line = T.unsafe(nil), offsets = T.unsafe(nil)); end # Return the column number in characters for the given byte offset. # - # source://prism/lib/prism/parse_result.rb#82 + # source://prism/lib/prism/parse_result.rb#97 sig { params(byte_offset: Integer).returns(Integer) } def character_column(byte_offset); end # Return the character offset for the given byte offset. # - # source://prism/lib/prism/parse_result.rb#77 + # source://prism/lib/prism/parse_result.rb#92 sig { params(byte_offset: Integer).returns(Integer) } def character_offset(byte_offset); end + # Generate a cache that targets a specific encoding for calculating code + # unit offsets. + # + # source://prism/lib/prism/parse_result.rb#125 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + # Returns the column number in code units for the given encoding for the # given byte offset. # - # source://prism/lib/prism/parse_result.rb#104 + # source://prism/lib/prism/parse_result.rb#131 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -27254,71 +30570,77 @@ class Prism::Source # concept of code units that differs from the number of characters in other # encodings, it is not captured here. # - # source://prism/lib/prism/parse_result.rb#92 + # We purposefully replace invalid and undefined characters with replacement + # characters in this conversion. This happens for two reasons. First, it's + # possible that the given byte offset will not occur on a character + # boundary. Second, it's possible that the source code will contain a + # character that has no equivalent in the given encoding. + # + # source://prism/lib/prism/parse_result.rb#113 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_offset(byte_offset, encoding); end # Return the column number for the given byte offset. # - # source://prism/lib/prism/parse_result.rb#72 + # source://prism/lib/prism/parse_result.rb#87 sig { params(byte_offset: Integer).returns(Integer) } def column(byte_offset); end # Returns the encoding of the source code, which is set by parameters to the # parser or by the encoding magic comment. # - # source://prism/lib/prism/parse_result.rb#38 + # source://prism/lib/prism/parse_result.rb#53 sig { returns(Encoding) } def encoding; end # Binary search through the offsets to find the line number for the given # byte offset. # - # source://prism/lib/prism/parse_result.rb#55 + # source://prism/lib/prism/parse_result.rb#70 sig { params(byte_offset: Integer).returns(Integer) } def line(byte_offset); end # Returns the byte offset of the end of the line corresponding to the given # byte offset. # - # source://prism/lib/prism/parse_result.rb#67 + # source://prism/lib/prism/parse_result.rb#82 def line_end(byte_offset); end # Return the byte offset of the start of the line corresponding to the given # byte offset. # - # source://prism/lib/prism/parse_result.rb#61 + # source://prism/lib/prism/parse_result.rb#76 sig { params(byte_offset: Integer).returns(Integer) } def line_start(byte_offset); end # Returns the lines of the source code as an array of strings. # - # source://prism/lib/prism/parse_result.rb#43 + # source://prism/lib/prism/parse_result.rb#58 sig { returns(T::Array[String]) } def lines; end # The list of newline byte offsets in the source code. # - # source://prism/lib/prism/parse_result.rb#27 + # source://prism/lib/prism/parse_result.rb#42 sig { returns(T::Array[Integer]) } def offsets; end # Perform a byteslice on the source code using the given byte offset and # byte length. # - # source://prism/lib/prism/parse_result.rb#49 + # source://prism/lib/prism/parse_result.rb#64 sig { params(byte_offset: Integer, length: Integer).returns(String) } def slice(byte_offset, length); end # The source code that this source object represents. # - # source://prism/lib/prism/parse_result.rb#21 + # source://prism/lib/prism/parse_result.rb#36 sig { returns(String) } def source; end # The line number where this source starts. # - # source://prism/lib/prism/parse_result.rb#24 + # source://prism/lib/prism/parse_result.rb#39 sig { returns(Integer) } def start_line; end @@ -27327,7 +30649,7 @@ class Prism::Source # Binary search through the offsets to find the line number for the given # byte offset. # - # source://prism/lib/prism/parse_result.rb#112 + # source://prism/lib/prism/parse_result.rb#139 def find_line(byte_offset); end class << self @@ -27346,55 +30668,63 @@ end # __ENCODING__ # ^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#14867 +# source://prism/lib/prism/node.rb#14904 class Prism::SourceEncodingNode < ::Prism::Node # Initialize a new SourceEncodingNode node. # # @return [SourceEncodingNode] a new instance of SourceEncodingNode # - # source://prism/lib/prism/node.rb#14869 + # source://prism/lib/prism/node.rb#14906 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#14926 + # source://prism/lib/prism/node.rb#14963 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#14877 + # source://prism/lib/prism/node.rb#14914 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14882 + # source://prism/lib/prism/node.rb#14919 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#14892 + # source://prism/lib/prism/node.rb#14929 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#14887 + # source://prism/lib/prism/node.rb#14924 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceEncodingNode # - # source://prism/lib/prism/node.rb#14897 + # source://prism/lib/prism/node.rb#14934 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceEncodingNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14882 + # source://prism/lib/prism/node.rb#14919 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#14905 + # source://prism/lib/prism/node.rb#14942 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27402,20 +30732,20 @@ class Prism::SourceEncodingNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#14910 + # source://prism/lib/prism/node.rb#14947 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#14915 + # source://prism/lib/prism/node.rb#14952 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#14920 + # source://prism/lib/prism/node.rb#14957 def type; end end end @@ -27425,13 +30755,13 @@ end # __FILE__ # ^^^^^^^^ # -# source://prism/lib/prism/node.rb#14935 +# source://prism/lib/prism/node.rb#14972 class Prism::SourceFileNode < ::Prism::Node # Initialize a new SourceFileNode node. # # @return [SourceFileNode] a new instance of SourceFileNode # - # source://prism/lib/prism/node.rb#14937 + # source://prism/lib/prism/node.rb#14974 sig do params( source: Prism::Source, @@ -27446,36 +30776,36 @@ class Prism::SourceFileNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#15018 + # source://prism/lib/prism/node.rb#15055 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#14946 + # source://prism/lib/prism/node.rb#14983 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14951 + # source://prism/lib/prism/node.rb#14988 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#14961 + # source://prism/lib/prism/node.rb#14998 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#14956 + # source://prism/lib/prism/node.rb#14993 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?filepath: String) -> SourceFileNode # - # source://prism/lib/prism/node.rb#14966 + # source://prism/lib/prism/node.rb#15003 sig do params( node_id: Integer, @@ -27489,13 +30819,13 @@ class Prism::SourceFileNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#14951 + # source://prism/lib/prism/node.rb#14988 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, filepath: String } # - # source://prism/lib/prism/node.rb#14974 + # source://prism/lib/prism/node.rb#15011 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27504,7 +30834,7 @@ class Prism::SourceFileNode < ::Prism::Node # Represents the file path being parsed. This corresponds directly to the `filepath` option given to the various `Prism::parse*` APIs. # - # source://prism/lib/prism/node.rb#14999 + # source://prism/lib/prism/node.rb#15036 sig { returns(String) } def filepath; end @@ -27512,7 +30842,7 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#14984 + # source://prism/lib/prism/node.rb#15021 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -27520,7 +30850,7 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#14979 + # source://prism/lib/prism/node.rb#15016 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -27528,13 +30858,13 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#14989 + # source://prism/lib/prism/node.rb#15026 sig { returns(T::Boolean) } def frozen?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#15002 + # source://prism/lib/prism/node.rb#15039 sig { override.returns(String) } def inspect; end @@ -27542,20 +30872,20 @@ class Prism::SourceFileNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#14994 + # source://prism/lib/prism/node.rb#15031 sig { returns(T::Boolean) } def mutable?; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#15007 + # source://prism/lib/prism/node.rb#15044 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#15012 + # source://prism/lib/prism/node.rb#15049 def type; end end end @@ -27565,55 +30895,63 @@ end # __LINE__ # ^^^^^^^^ # -# source://prism/lib/prism/node.rb#15029 +# source://prism/lib/prism/node.rb#15066 class Prism::SourceLineNode < ::Prism::Node # Initialize a new SourceLineNode node. # # @return [SourceLineNode] a new instance of SourceLineNode # - # source://prism/lib/prism/node.rb#15031 + # source://prism/lib/prism/node.rb#15068 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#15088 + # source://prism/lib/prism/node.rb#15125 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#15039 + # source://prism/lib/prism/node.rb#15076 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15044 + # source://prism/lib/prism/node.rb#15081 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#15054 + # source://prism/lib/prism/node.rb#15091 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#15049 + # source://prism/lib/prism/node.rb#15086 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceLineNode # - # source://prism/lib/prism/node.rb#15059 + # source://prism/lib/prism/node.rb#15096 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceLineNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15044 + # source://prism/lib/prism/node.rb#15081 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#15067 + # source://prism/lib/prism/node.rb#15104 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27621,20 +30959,20 @@ class Prism::SourceLineNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#15072 + # source://prism/lib/prism/node.rb#15109 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#15077 + # source://prism/lib/prism/node.rb#15114 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#15082 + # source://prism/lib/prism/node.rb#15119 def type; end end end @@ -27644,60 +30982,86 @@ end # [*a] # ^^ # -# source://prism/lib/prism/node.rb#15097 +# source://prism/lib/prism/node.rb#15134 class Prism::SplatNode < ::Prism::Node # Initialize a new SplatNode node. # # @return [SplatNode] a new instance of SplatNode # - # source://prism/lib/prism/node.rb#15099 + # source://prism/lib/prism/node.rb#15136 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).void + end def initialize(source, node_id, location, flags, operator_loc, expression); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#15175 + # source://prism/lib/prism/node.rb#15212 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#15109 + # source://prism/lib/prism/node.rb#15146 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15114 + # source://prism/lib/prism/node.rb#15151 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#15126 + # source://prism/lib/prism/node.rb#15163 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#15119 + # source://prism/lib/prism/node.rb#15156 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?expression: Prism::node?) -> SplatNode # - # source://prism/lib/prism/node.rb#15131 + # source://prism/lib/prism/node.rb#15168 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).returns(Prism::SplatNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15114 + # source://prism/lib/prism/node.rb#15151 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, expression: Prism::node? } # - # source://prism/lib/prism/node.rb#15139 + # source://prism/lib/prism/node.rb#15176 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node? # - # source://prism/lib/prism/node.rb#15151 + # source://prism/lib/prism/node.rb#15188 + sig { returns(T.nilable(Prism::Node)) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27705,30 +31069,32 @@ class Prism::SplatNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#15159 + # source://prism/lib/prism/node.rb#15196 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism/lib/prism/node.rb#15154 + # source://prism/lib/prism/node.rb#15191 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism/lib/prism/node.rb#15144 + # source://prism/lib/prism/node.rb#15181 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#15164 + # source://prism/lib/prism/node.rb#15201 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#15169 + # source://prism/lib/prism/node.rb#15206 def type; end end end @@ -27738,60 +31104,84 @@ end # foo; bar; baz # ^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#15186 +# source://prism/lib/prism/node.rb#15223 class Prism::StatementsNode < ::Prism::Node # Initialize a new StatementsNode node. # # @return [StatementsNode] a new instance of StatementsNode # - # source://prism/lib/prism/node.rb#15188 + # source://prism/lib/prism/node.rb#15225 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).void + end def initialize(source, node_id, location, flags, body); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#15249 + # source://prism/lib/prism/node.rb#15286 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#15197 + # source://prism/lib/prism/node.rb#15234 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Array[Prism::node] # - # source://prism/lib/prism/node.rb#15230 + # source://prism/lib/prism/node.rb#15267 + sig { returns(T::Array[Prism::Node]) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15202 + # source://prism/lib/prism/node.rb#15239 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#15212 + # source://prism/lib/prism/node.rb#15249 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#15207 + # source://prism/lib/prism/node.rb#15244 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Array[Prism::node]) -> StatementsNode # - # source://prism/lib/prism/node.rb#15217 + # source://prism/lib/prism/node.rb#15254 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).returns(Prism::StatementsNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15202 + # source://prism/lib/prism/node.rb#15239 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] } # - # source://prism/lib/prism/node.rb#15225 + # source://prism/lib/prism/node.rb#15262 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27799,43 +31189,43 @@ class Prism::StatementsNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#15233 + # source://prism/lib/prism/node.rb#15270 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#15238 + # source://prism/lib/prism/node.rb#15275 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#15243 + # source://prism/lib/prism/node.rb#15280 def type; end end end # Flags for string nodes. # -# source://prism/lib/prism/node.rb#16785 +# source://prism/lib/prism/node.rb#16828 module Prism::StringFlags; end # internal bytes forced the encoding to binary # -# source://prism/lib/prism/node.rb#16790 +# source://prism/lib/prism/node.rb#16833 Prism::StringFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism/lib/prism/node.rb#16787 +# source://prism/lib/prism/node.rb#16830 Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) -# source://prism/lib/prism/node.rb#16793 +# source://prism/lib/prism/node.rb#16836 Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism/lib/prism/node.rb#16796 +# source://prism/lib/prism/node.rb#16839 Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a string literal, a string contained within a `%w` list, or plain string content within an interpolated string. @@ -27849,7 +31239,7 @@ Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # "foo #{bar} baz" # ^^^^ ^^^^ # -# source://prism/lib/prism/node.rb#15266 +# source://prism/lib/prism/node.rb#15303 class Prism::StringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -27857,7 +31247,7 @@ class Prism::StringNode < ::Prism::Node # # @return [StringNode] a new instance of StringNode # - # source://prism/lib/prism/node.rb#15268 + # source://prism/lib/prism/node.rb#15305 sig do params( source: Prism::Source, @@ -27875,60 +31265,60 @@ class Prism::StringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#15400 + # source://prism/lib/prism/node.rb#15437 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#15280 + # source://prism/lib/prism/node.rb#15317 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15285 + # source://prism/lib/prism/node.rb#15322 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism/lib/prism/node.rb#15379 + # source://prism/lib/prism/node.rb#15416 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism/lib/prism/node.rb#15353 + # source://prism/lib/prism/node.rb#15390 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#15295 + # source://prism/lib/prism/node.rb#15332 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#15290 + # source://prism/lib/prism/node.rb#15327 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism/lib/prism/node.rb#15374 + # source://prism/lib/prism/node.rb#15411 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism/lib/prism/node.rb#15346 + # source://prism/lib/prism/node.rb#15383 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String) -> StringNode # - # source://prism/lib/prism/node.rb#15300 + # source://prism/lib/prism/node.rb#15337 sig do params( node_id: Integer, @@ -27945,13 +31335,13 @@ class Prism::StringNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15285 + # source://prism/lib/prism/node.rb#15322 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String } # - # source://prism/lib/prism/node.rb#15308 + # source://prism/lib/prism/node.rb#15345 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27962,7 +31352,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#15318 + # source://prism/lib/prism/node.rb#15355 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -27970,7 +31360,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#15313 + # source://prism/lib/prism/node.rb#15350 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -27978,7 +31368,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#15323 + # source://prism/lib/prism/node.rb#15360 sig { returns(T::Boolean) } def frozen?; end @@ -27987,7 +31377,7 @@ class Prism::StringNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#15384 + # source://prism/lib/prism/node.rb#15421 sig { override.returns(String) } def inspect; end @@ -27995,19 +31385,19 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#15328 + # source://prism/lib/prism/node.rb#15365 sig { returns(T::Boolean) } def mutable?; end # def opening: () -> String? # - # source://prism/lib/prism/node.rb#15369 + # source://prism/lib/prism/node.rb#15406 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism/lib/prism/node.rb#15333 + # source://prism/lib/prism/node.rb#15370 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -28020,20 +31410,20 @@ class Prism::StringNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#15389 + # source://prism/lib/prism/node.rb#15426 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism/lib/prism/node.rb#15366 + # source://prism/lib/prism/node.rb#15403 sig { returns(String) } def unescaped; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#15394 + # source://prism/lib/prism/node.rb#15431 def type; end end end @@ -28046,65 +31436,98 @@ end # super foo, bar # ^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#15417 +# source://prism/lib/prism/node.rb#15454 class Prism::SuperNode < ::Prism::Node # Initialize a new SuperNode node. # # @return [SuperNode] a new instance of SuperNode # - # source://prism/lib/prism/node.rb#15419 + # source://prism/lib/prism/node.rb#15456 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).void + end def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc, block); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#15538 + # source://prism/lib/prism/node.rb#15575 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#15432 + # source://prism/lib/prism/node.rb#15469 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism/lib/prism/node.rb#15488 + # source://prism/lib/prism/node.rb#15525 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end - # attr_reader block: Prism::node? + # attr_reader block: BlockNode | BlockArgumentNode | nil # - # source://prism/lib/prism/node.rb#15504 + # source://prism/lib/prism/node.rb#15541 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15437 + # source://prism/lib/prism/node.rb#15474 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#15450 + # source://prism/lib/prism/node.rb#15487 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#15442 + # source://prism/lib/prism/node.rb#15479 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: Prism::node?) -> SuperNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> SuperNode # - # source://prism/lib/prism/node.rb#15455 + # source://prism/lib/prism/node.rb#15492 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::SuperNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15437 + # source://prism/lib/prism/node.rb#15474 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Prism::node? } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: BlockNode | BlockArgumentNode | nil } # - # source://prism/lib/prism/node.rb#15463 + # source://prism/lib/prism/node.rb#15500 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -28112,72 +31535,78 @@ class Prism::SuperNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#15522 + # source://prism/lib/prism/node.rb#15559 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#15507 + # source://prism/lib/prism/node.rb#15544 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#15468 + # source://prism/lib/prism/node.rb#15505 + sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism/lib/prism/node.rb#15512 + # source://prism/lib/prism/node.rb#15549 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism/lib/prism/node.rb#15475 + # source://prism/lib/prism/node.rb#15512 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism/lib/prism/node.rb#15517 + # source://prism/lib/prism/node.rb#15554 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism/lib/prism/node.rb#15491 + # source://prism/lib/prism/node.rb#15528 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#15527 + # source://prism/lib/prism/node.rb#15564 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#15532 + # source://prism/lib/prism/node.rb#15569 def type; end end end # Flags for symbol nodes. # -# source://prism/lib/prism/node.rb#16800 +# source://prism/lib/prism/node.rb#16843 module Prism::SymbolFlags; end # internal bytes forced the encoding to binary # -# source://prism/lib/prism/node.rb#16805 +# source://prism/lib/prism/node.rb#16848 Prism::SymbolFlags::FORCED_BINARY_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to US-ASCII # -# source://prism/lib/prism/node.rb#16808 +# source://prism/lib/prism/node.rb#16851 Prism::SymbolFlags::FORCED_US_ASCII_ENCODING = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to UTF-8 # -# source://prism/lib/prism/node.rb#16802 +# source://prism/lib/prism/node.rb#16845 Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents a symbol literal or a symbol contained within a `%i` list. @@ -28188,13 +31617,13 @@ Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # %i[foo] # ^^^ # -# source://prism/lib/prism/node.rb#15555 +# source://prism/lib/prism/node.rb#15592 class Prism::SymbolNode < ::Prism::Node # Initialize a new SymbolNode node. # # @return [SymbolNode] a new instance of SymbolNode # - # source://prism/lib/prism/node.rb#15557 + # source://prism/lib/prism/node.rb#15594 sig do params( source: Prism::Source, @@ -28212,48 +31641,48 @@ class Prism::SymbolNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#15690 + # source://prism/lib/prism/node.rb#15727 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#15569 + # source://prism/lib/prism/node.rb#15606 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15574 + # source://prism/lib/prism/node.rb#15611 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism/lib/prism/node.rb#15669 + # source://prism/lib/prism/node.rb#15706 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism/lib/prism/node.rb#15643 + # source://prism/lib/prism/node.rb#15680 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#15584 + # source://prism/lib/prism/node.rb#15621 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#15579 + # source://prism/lib/prism/node.rb#15616 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String) -> SymbolNode # - # source://prism/lib/prism/node.rb#15589 + # source://prism/lib/prism/node.rb#15626 sig do params( node_id: Integer, @@ -28270,13 +31699,13 @@ class Prism::SymbolNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15574 + # source://prism/lib/prism/node.rb#15611 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String } # - # source://prism/lib/prism/node.rb#15597 + # source://prism/lib/prism/node.rb#15634 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28287,7 +31716,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#15607 + # source://prism/lib/prism/node.rb#15644 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -28295,7 +31724,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#15612 + # source://prism/lib/prism/node.rb#15649 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -28303,110 +31732,110 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#15602 + # source://prism/lib/prism/node.rb#15639 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def inspect -> String # - # source://prism/lib/prism/node.rb#15674 + # source://prism/lib/prism/node.rb#15711 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism/lib/prism/node.rb#15659 + # source://prism/lib/prism/node.rb#15696 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism/lib/prism/node.rb#15617 + # source://prism/lib/prism/node.rb#15654 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#15679 + # source://prism/lib/prism/node.rb#15716 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism/lib/prism/node.rb#15656 + # source://prism/lib/prism/node.rb#15693 sig { returns(String) } def unescaped; end # def value: () -> String? # - # source://prism/lib/prism/node.rb#15664 + # source://prism/lib/prism/node.rb#15701 sig { returns(T.nilable(String)) } def value; end # attr_reader value_loc: Location? # - # source://prism/lib/prism/node.rb#15630 + # source://prism/lib/prism/node.rb#15667 sig { returns(T.nilable(Prism::Location)) } def value_loc; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#15684 + # source://prism/lib/prism/node.rb#15721 def type; end end end # This represents a token from the Ruby source. # -# source://prism/lib/prism/parse_result.rb#662 +# source://prism/lib/prism/parse_result.rb#799 class Prism::Token # Create a new token object with the given type, value, and location. # # @return [Token] a new instance of Token # - # source://prism/lib/prism/parse_result.rb#674 + # source://prism/lib/prism/parse_result.rb#811 sig { params(source: Prism::Source, type: Symbol, value: String, location: T.any(Integer, Prism::Location)).void } def initialize(source, type, value, location); end # Returns true if the given other token is equal to this token. # - # source://prism/lib/prism/parse_result.rb#709 + # source://prism/lib/prism/parse_result.rb#846 sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end # Implement the hash pattern matching interface for Token. # - # source://prism/lib/prism/parse_result.rb#682 + # source://prism/lib/prism/parse_result.rb#819 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # Returns a string representation of this token. # - # source://prism/lib/prism/parse_result.rb#716 + # source://prism/lib/prism/parse_result.rb#853 def inspect; end # A Location object representing the location of this token in the source. # - # source://prism/lib/prism/parse_result.rb#687 + # source://prism/lib/prism/parse_result.rb#824 sig { returns(Prism::Location) } def location; end # Implement the pretty print interface for Token. # - # source://prism/lib/prism/parse_result.rb#694 + # source://prism/lib/prism/parse_result.rb#831 sig { params(q: T.untyped).void } def pretty_print(q); end # The type of token that this token is. # - # source://prism/lib/prism/parse_result.rb#668 + # source://prism/lib/prism/parse_result.rb#805 sig { returns(Symbol) } def type; end # A byteslice of the source that this token represents. # - # source://prism/lib/prism/parse_result.rb#671 + # source://prism/lib/prism/parse_result.rb#808 sig { returns(String) } def value; end @@ -28414,7 +31843,7 @@ class Prism::Token # The Source object that represents the source this token came from. # - # source://prism/lib/prism/parse_result.rb#664 + # source://prism/lib/prism/parse_result.rb#801 sig { returns(Prism::Source) } def source; end end @@ -29698,50 +33127,50 @@ class Prism::Translation::Parser::Lexer # # @return [Lexer] a new instance of Lexer # - # source://prism/lib/prism/translation/parser/lexer.rb#204 + # source://prism/lib/prism/translation/parser/lexer.rb#217 def initialize(source_buffer, lexed, offset_cache); end # An array of tuples that contain prism tokens and their associated lex # state when they were lexed. # - # source://prism/lib/prism/translation/parser/lexer.rb#197 + # source://prism/lib/prism/translation/parser/lexer.rb#210 def lexed; end # A hash that maps offsets in bytes to offsets in characters. # - # source://prism/lib/prism/translation/parser/lexer.rb#200 + # source://prism/lib/prism/translation/parser/lexer.rb#213 def offset_cache; end # The Parser::Source::Buffer that the tokens were lexed from. # - # source://prism/lib/prism/translation/parser/lexer.rb#193 + # source://prism/lib/prism/translation/parser/lexer.rb#206 def source_buffer; end # Convert the prism tokens into the expected format for the parser gem. # - # source://prism/lib/prism/translation/parser/lexer.rb#214 + # source://prism/lib/prism/translation/parser/lexer.rb#227 def to_a; end private # Parse a complex from the string representation. # - # source://prism/lib/prism/translation/parser/lexer.rb#387 + # source://prism/lib/prism/translation/parser/lexer.rb#409 def parse_complex(value); end # Parse a float from the string representation. # - # source://prism/lib/prism/translation/parser/lexer.rb#380 + # source://prism/lib/prism/translation/parser/lexer.rb#402 def parse_float(value); end # Parse an integer from the string representation. # - # source://prism/lib/prism/translation/parser/lexer.rb#373 + # source://prism/lib/prism/translation/parser/lexer.rb#395 def parse_integer(value); end # Parse a rational from the string representation. # - # source://prism/lib/prism/translation/parser/lexer.rb#402 + # source://prism/lib/prism/translation/parser/lexer.rb#424 def parse_rational(value); end end @@ -29759,7 +33188,21 @@ Prism::Translation::Parser::Lexer::EXPR_BEG = T.let(T.unsafe(nil), Integer) # source://prism/lib/prism/translation/parser/lexer.rb#188 Prism::Translation::Parser::Lexer::EXPR_LABEL = T.let(T.unsafe(nil), Integer) -# source://prism/lib/prism/translation/parser/lexer.rb#210 +# It is used to determine whether `do` is of the token type `kDO` or `kDO_LAMBDA`. +# +# NOTE: In edge cases like `-> (foo = -> (bar) {}) do end`, please note that `kDO` is still returned +# instead of `kDO_LAMBDA`, which is expected: https://github.com/ruby/prism/pull/3046 +# +# source://prism/lib/prism/translation/parser/lexer.rb#194 +Prism::Translation::Parser::Lexer::LAMBDA_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# The `PARENTHESIS_LEFT` token in Prism is classified as either `tLPAREN` or `tLPAREN2` in the Parser gem. +# The following token types are listed as those classified as `tLPAREN`. +# +# source://prism/lib/prism/translation/parser/lexer.rb#198 +Prism::Translation::Parser::Lexer::LPAREN_CONVERSION_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# source://prism/lib/prism/translation/parser/lexer.rb#223 Prism::Translation::Parser::Lexer::Range = Parser::Source::Range # The direct translating of types between the two lexers. @@ -30838,25 +34281,25 @@ class Prism::Translation::Ripper < ::Prism::Compiler # :stopdoc: # - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def _dispatch_0; end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def _dispatch_1(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def _dispatch_2(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def _dispatch_3(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3393 + # source://prism/lib/prism/translation/ripper.rb#3389 def _dispatch_4(_, _, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3394 + # source://prism/lib/prism/translation/ripper.rb#3390 def _dispatch_5(_, _, _, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3395 + # source://prism/lib/prism/translation/ripper.rb#3391 def _dispatch_7(_, _, _, _, _, _, _); end # This method is responsible for updating lineno and column information @@ -30865,7 +34308,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # This method could be drastically improved with some caching on the start # of every line, but for now it's good enough. # - # source://prism/lib/prism/translation/ripper.rb#3379 + # source://prism/lib/prism/translation/ripper.rb#3375 def bounds(location); end # Returns true if the given node is a command node. @@ -30877,7 +34320,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # This method is called when the parser found syntax error. # - # source://prism/lib/prism/translation/ripper.rb#3417 + # source://prism/lib/prism/translation/ripper.rb#3413 def compile_error(msg); end # This method is provided by the Ripper C extension. It is called when a @@ -30885,577 +34328,577 @@ class Prism::Translation::Ripper < ::Prism::Compiler # that it will modify the string in place and return the number of bytes # that were removed. # - # source://prism/lib/prism/translation/ripper.rb#3432 + # source://prism/lib/prism/translation/ripper.rb#3428 def dedent_string(string, width); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_BEGIN(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_CHAR(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_END(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on___end__(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_alias(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_alias_error(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_aref(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_aref_field(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_arg_ambiguous(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_arg_paren(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_args_add(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_args_add_block(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_args_add_star(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_args_forward; end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_args_new; end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_array(_); end - # source://prism/lib/prism/translation/ripper.rb#3393 + # source://prism/lib/prism/translation/ripper.rb#3389 def on_aryptn(_, _, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_assign(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_assign_error(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_assoc_new(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_assoc_splat(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_assoclist_from_args(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_backref(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_backtick(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_bare_assoc_hash(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_begin(_); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_binary(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_block_var(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_blockarg(_); end - # source://prism/lib/prism/translation/ripper.rb#3393 + # source://prism/lib/prism/translation/ripper.rb#3389 def on_bodystmt(_, _, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_brace_block(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_break(_); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_call(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_case(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_class(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_class_name_error(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_comma(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_command(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3393 + # source://prism/lib/prism/translation/ripper.rb#3389 def on_command_call(_, _, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_comment(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_const(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_const_path_field(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_const_path_ref(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_const_ref(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_cvar(_); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_def(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_defined(_); end - # source://prism/lib/prism/translation/ripper.rb#3394 + # source://prism/lib/prism/translation/ripper.rb#3390 def on_defs(_, _, _, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_do_block(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_dot2(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_dot3(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_dyna_symbol(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_else(_); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_elsif(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_embdoc(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_embdoc_beg(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_embdoc_end(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_embexpr_beg(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_embexpr_end(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_embvar(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_ensure(_); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_excessed_comma; end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_fcall(_); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_field(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_float(_); end - # source://prism/lib/prism/translation/ripper.rb#3393 + # source://prism/lib/prism/translation/ripper.rb#3389 def on_fndptn(_, _, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_for(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_gvar(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_hash(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_heredoc_beg(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_heredoc_dedent(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_heredoc_end(_); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_hshptn(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_ident(_); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_if(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_if_mod(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_ifop(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_ignored_nl(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_ignored_sp(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_imaginary(_); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_in(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_int(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_ivar(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_kw(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_kwrest_param(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_label(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_label_end(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_lambda(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_lbrace(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_lbracket(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_lparen(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_magic_comment(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_massign(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_method_add_arg(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_method_add_block(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_mlhs_add(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_mlhs_add_post(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_mlhs_add_star(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_mlhs_new; end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_mlhs_paren(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_module(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_mrhs_add(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_mrhs_add_star(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_mrhs_new; end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_mrhs_new_from_args(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_next(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_nl(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_nokw_param(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_op(_); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_opassign(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_operator_ambiguous(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_param_error(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3395 + # source://prism/lib/prism/translation/ripper.rb#3391 def on_params(_, _, _, _, _, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_paren(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_parse_error(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_period(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_program(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_qsymbols_add(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_qsymbols_beg(_); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_qsymbols_new; end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_qwords_add(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_qwords_beg(_); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_qwords_new; end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_rational(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_rbrace(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_rbracket(_); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_redo; end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_regexp_add(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_regexp_beg(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_regexp_end(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_regexp_literal(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_regexp_new; end - # source://prism/lib/prism/translation/ripper.rb#3393 + # source://prism/lib/prism/translation/ripper.rb#3389 def on_rescue(_, _, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_rescue_mod(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_rest_param(_); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_retry; end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_return(_); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_return0; end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_rparen(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_sclass(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_semicolon(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_sp(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_stmts_add(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_stmts_new; end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_string_add(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_string_concat(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_string_content; end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_string_dvar(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_string_embexpr(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_string_literal(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_super(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_symbeg(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_symbol(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_symbol_literal(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_symbols_add(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_symbols_beg(_); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_symbols_new; end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_tlambda(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_tlambeg(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_top_const_field(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_top_const_ref(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_tstring_beg(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_tstring_content(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_tstring_end(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_unary(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_undef(_); end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_unless(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_unless_mod(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_until(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_until_mod(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_var_alias(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_var_field(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_var_ref(_); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_vcall(_); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_void_stmt; end - # source://prism/lib/prism/translation/ripper.rb#3392 + # source://prism/lib/prism/translation/ripper.rb#3388 def on_when(_, _, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_while(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_while_mod(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_word_add(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_word_new; end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_words_add(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_words_beg(_); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_words_new; end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_words_sep(_); end - # source://prism/lib/prism/translation/ripper.rb#3391 + # source://prism/lib/prism/translation/ripper.rb#3387 def on_xstring_add(_, _); end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_xstring_literal(_); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_xstring_new; end - # source://prism/lib/prism/translation/ripper.rb#3390 + # source://prism/lib/prism/translation/ripper.rb#3386 def on_yield(_); end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_yield0; end - # source://prism/lib/prism/translation/ripper.rb#3389 + # source://prism/lib/prism/translation/ripper.rb#3385 def on_zsuper; end # Lazily initialize the parse result. @@ -31467,7 +34910,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # # @return [Boolean] # - # source://prism/lib/prism/translation/ripper.rb#3284 + # source://prism/lib/prism/translation/ripper.rb#3280 def trailing_comma?(left, right); end # Visit one side of an alias global variable node. @@ -31539,7 +34982,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # Visit a node that represents a number. We need to explicitly handle the # unary - operator. # - # source://prism/lib/prism/translation/ripper.rb#3323 + # source://prism/lib/prism/translation/ripper.rb#3319 def visit_number_node(node); end # Visit a pattern within a pattern match. This is used to bypass the @@ -31564,7 +35007,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # Visit the string content of a particular node. This method is used to # split into the various token types. # - # source://prism/lib/prism/translation/ripper.rb#3296 + # source://prism/lib/prism/translation/ripper.rb#3292 def visit_token(token, allow_keywords = T.unsafe(nil)); end # Dispatch a words_sep event that contains the space between the elements @@ -31576,26 +35019,26 @@ class Prism::Translation::Ripper < ::Prism::Compiler # Visit a node that represents a write value. This is used to handle the # special case of an implicit array that is generated without brackets. # - # source://prism/lib/prism/translation/ripper.rb#3341 + # source://prism/lib/prism/translation/ripper.rb#3337 def visit_write_value(node); end # Returns true if there is a semicolon between the two locations. # # @return [Boolean] # - # source://prism/lib/prism/translation/ripper.rb#3289 + # source://prism/lib/prism/translation/ripper.rb#3285 def void_stmt?(left, right, allow_newline); end # This method is called when weak warning is produced by the parser. # +fmt+ and +args+ is printf style. # - # source://prism/lib/prism/translation/ripper.rb#3408 + # source://prism/lib/prism/translation/ripper.rb#3404 def warn(fmt, *args); end # This method is called when strong warning is produced by the parser. # +fmt+ and +args+ is printf style. # - # source://prism/lib/prism/translation/ripper.rb#3413 + # source://prism/lib/prism/translation/ripper.rb#3409 def warning(fmt, *args); end class << self @@ -32412,13 +35855,13 @@ class Prism::Translation::RubyParser # Parse the given source and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism/lib/prism/translation/ruby_parser.rb#1592 + # source://prism/lib/prism/translation/ruby_parser.rb#1598 def parse(source, filepath = T.unsafe(nil)); end # Parse the given file and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism/lib/prism/translation/ruby_parser.rb#1598 + # source://prism/lib/prism/translation/ruby_parser.rb#1604 def parse_file(filepath); end private @@ -32426,20 +35869,20 @@ class Prism::Translation::RubyParser # Translate the given parse result and filepath into the # seattlerb/ruby_parser gem's Sexp format. # - # source://prism/lib/prism/translation/ruby_parser.rb#1620 + # source://prism/lib/prism/translation/ruby_parser.rb#1626 def translate(result, filepath); end class << self # Parse the given source and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism/lib/prism/translation/ruby_parser.rb#1605 + # source://prism/lib/prism/translation/ruby_parser.rb#1611 def parse(source, filepath = T.unsafe(nil)); end # Parse the given file and translate it into the seattlerb/ruby_parser # gem's Sexp format. # - # source://prism/lib/prism/translation/ruby_parser.rb#1611 + # source://prism/lib/prism/translation/ruby_parser.rb#1617 def parse_file(filepath); end end end @@ -33370,25 +36813,25 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # super(foo) # ^^^^^^^^^^ # - # source://prism/lib/prism/translation/ruby_parser.rb#1436 + # source://prism/lib/prism/translation/ruby_parser.rb#1442 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism/lib/prism/translation/ruby_parser.rb#1450 + # source://prism/lib/prism/translation/ruby_parser.rb#1456 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism/lib/prism/translation/ruby_parser.rb#1456 + # source://prism/lib/prism/translation/ruby_parser.rb#1462 def visit_true_node(node); end # undef foo # ^^^^^^^^^ # - # source://prism/lib/prism/translation/ruby_parser.rb#1462 + # source://prism/lib/prism/translation/ruby_parser.rb#1468 def visit_undef_node(node); end # unless foo; bar end @@ -33397,7 +36840,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # bar unless foo # ^^^^^^^^^^^^^^ # - # source://prism/lib/prism/translation/ruby_parser.rb#1472 + # source://prism/lib/prism/translation/ruby_parser.rb#1478 def visit_unless_node(node); end # until foo; bar end @@ -33406,13 +36849,13 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # bar until foo # ^^^^^^^^^^^^^ # - # source://prism/lib/prism/translation/ruby_parser.rb#1481 + # source://prism/lib/prism/translation/ruby_parser.rb#1487 def visit_until_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^ # - # source://prism/lib/prism/translation/ruby_parser.rb#1487 + # source://prism/lib/prism/translation/ruby_parser.rb#1493 def visit_when_node(node); end # while foo; bar end @@ -33421,13 +36864,13 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # bar while foo # ^^^^^^^^^^^^^ # - # source://prism/lib/prism/translation/ruby_parser.rb#1496 + # source://prism/lib/prism/translation/ruby_parser.rb#1502 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism/lib/prism/translation/ruby_parser.rb#1502 + # source://prism/lib/prism/translation/ruby_parser.rb#1508 def visit_x_string_node(node); end # yield @@ -33436,7 +36879,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # yield 1 # ^^^^^^^ # - # source://prism/lib/prism/translation/ruby_parser.rb#1518 + # source://prism/lib/prism/translation/ruby_parser.rb#1524 def visit_yield_node(node); end private @@ -33449,7 +36892,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # Create a new compiler with the given options. # - # source://prism/lib/prism/translation/ruby_parser.rb#1525 + # source://prism/lib/prism/translation/ruby_parser.rb#1531 def copy_compiler(in_def: T.unsafe(nil), in_pattern: T.unsafe(nil)); end # Call nodes with operators following them will either be op_asgn or @@ -33469,13 +36912,13 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # Create a new Sexp object from the given prism node and arguments. # - # source://prism/lib/prism/translation/ruby_parser.rb#1530 + # source://prism/lib/prism/translation/ruby_parser.rb#1536 def s(node, *arguments); end # Visit a block node, which will modify the AST by wrapping the given # visited node in an iter node. # - # source://prism/lib/prism/translation/ruby_parser.rb#1540 + # source://prism/lib/prism/translation/ruby_parser.rb#1546 def visit_block(node, sexp, block); end # def foo((bar, baz)); end @@ -33491,7 +36934,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # Pattern constants get wrapped in another layer of :const. # - # source://prism/lib/prism/translation/ruby_parser.rb#1561 + # source://prism/lib/prism/translation/ruby_parser.rb#1567 def visit_pattern_constant(node); end # If the bounds of a range node are empty parentheses, then they do not @@ -33504,7 +36947,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # a write operator. Because implicit arrays can have splats, those could # potentially be wrapped in an svalue node. # - # source://prism/lib/prism/translation/ruby_parser.rb#1575 + # source://prism/lib/prism/translation/ruby_parser.rb#1581 def visit_write_value(node); end end @@ -33513,55 +36956,63 @@ end # true # ^^^^ # -# source://prism/lib/prism/node.rb#15704 +# source://prism/lib/prism/node.rb#15741 class Prism::TrueNode < ::Prism::Node # Initialize a new TrueNode node. # # @return [TrueNode] a new instance of TrueNode # - # source://prism/lib/prism/node.rb#15706 + # source://prism/lib/prism/node.rb#15743 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#15763 + # source://prism/lib/prism/node.rb#15800 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#15714 + # source://prism/lib/prism/node.rb#15751 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15719 + # source://prism/lib/prism/node.rb#15756 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#15729 + # source://prism/lib/prism/node.rb#15766 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#15724 + # source://prism/lib/prism/node.rb#15761 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> TrueNode # - # source://prism/lib/prism/node.rb#15734 + # source://prism/lib/prism/node.rb#15771 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::TrueNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15719 + # source://prism/lib/prism/node.rb#15756 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism/lib/prism/node.rb#15742 + # source://prism/lib/prism/node.rb#15779 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -33569,20 +37020,20 @@ class Prism::TrueNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#15747 + # source://prism/lib/prism/node.rb#15784 sig { override.returns(String) } def inspect; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#15752 + # source://prism/lib/prism/node.rb#15789 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#15757 + # source://prism/lib/prism/node.rb#15794 def type; end end end @@ -33592,55 +37043,80 @@ end # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#15772 +# source://prism/lib/prism/node.rb#15809 class Prism::UndefNode < ::Prism::Node # Initialize a new UndefNode node. # # @return [UndefNode] a new instance of UndefNode # - # source://prism/lib/prism/node.rb#15774 + # source://prism/lib/prism/node.rb#15811 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, names, keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#15848 + # source://prism/lib/prism/node.rb#15885 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#15784 + # source://prism/lib/prism/node.rb#15821 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15789 + # source://prism/lib/prism/node.rb#15826 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#15799 + # source://prism/lib/prism/node.rb#15836 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#15794 + # source://prism/lib/prism/node.rb#15831 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location) -> UndefNode # - # source://prism/lib/prism/node.rb#15804 + # source://prism/lib/prism/node.rb#15841 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).returns(Prism::UndefNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15789 + # source://prism/lib/prism/node.rb#15826 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location } # - # source://prism/lib/prism/node.rb#15812 + # source://prism/lib/prism/node.rb#15849 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -33648,35 +37124,38 @@ class Prism::UndefNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#15832 + # source://prism/lib/prism/node.rb#15869 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#15827 + # source://prism/lib/prism/node.rb#15864 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#15820 + # source://prism/lib/prism/node.rb#15857 + sig { returns(Prism::Location) } def keyword_loc; end # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] # - # source://prism/lib/prism/node.rb#15817 + # source://prism/lib/prism/node.rb#15854 + sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } def names; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#15837 + # source://prism/lib/prism/node.rb#15874 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#15842 + # source://prism/lib/prism/node.rb#15879 def type; end end end @@ -33689,39 +37168,57 @@ end # unless foo then bar end # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#15863 +# source://prism/lib/prism/node.rb#15900 class Prism::UnlessNode < ::Prism::Node # Initialize a new UnlessNode node. # # @return [UnlessNode] a new instance of UnlessNode # - # source://prism/lib/prism/node.rb#15865 + # source://prism/lib/prism/node.rb#15902 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, keyword_loc, predicate, then_keyword_loc, statements, else_clause, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#16014 + # source://prism/lib/prism/node.rb#16051 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#15879 + # source://prism/lib/prism/node.rb#15916 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15884 + # source://prism/lib/prism/node.rb#15921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#15898 + # source://prism/lib/prism/node.rb#15935 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#15889 + # source://prism/lib/prism/node.rb#15926 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns the else clause of the unless node. This method is deprecated in @@ -33732,18 +37229,33 @@ class Prism::UnlessNode < ::Prism::Node # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?else_clause: ElseNode?, ?end_keyword_loc: Location?) -> UnlessNode # - # source://prism/lib/prism/node.rb#15903 + # source://prism/lib/prism/node.rb#15940 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::UnlessNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#15884 + # source://prism/lib/prism/node.rb#15921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, else_clause: ElseNode?, end_keyword_loc: Location? } # - # source://prism/lib/prism/node.rb#15911 + # source://prism/lib/prism/node.rb#15948 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The else clause of the unless expression, if present. @@ -33751,12 +37263,14 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar else baz end # ^^^^^^^^ # - # source://prism/lib/prism/node.rb#15964 + # source://prism/lib/prism/node.rb#16001 + sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism/lib/prism/node.rb#15993 + # source://prism/lib/prism/node.rb#16030 + sig { returns(T.nilable(String)) } def end_keyword; end # The location of the `end` keyword, if present. @@ -33764,7 +37278,8 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism/lib/prism/node.rb#15970 + # source://prism/lib/prism/node.rb#16007 + sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -33772,13 +37287,14 @@ class Prism::UnlessNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#15998 + # source://prism/lib/prism/node.rb#16035 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#15983 + # source://prism/lib/prism/node.rb#16020 + sig { returns(String) } def keyword; end # The location of the `unless` keyword. @@ -33789,7 +37305,8 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^^^ # - # source://prism/lib/prism/node.rb#15922 + # source://prism/lib/prism/node.rb#15959 + sig { returns(Prism::Location) } def keyword_loc; end # source://prism/lib/prism/parse_result/newlines.rb#97 @@ -33803,7 +37320,8 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^ # - # source://prism/lib/prism/node.rb#15935 + # source://prism/lib/prism/node.rb#15972 + sig { returns(Prism::Node) } def predicate; end # The body of statements that will executed if the unless condition is @@ -33812,12 +37330,14 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism/lib/prism/node.rb#15958 + # source://prism/lib/prism/node.rb#15995 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism/lib/prism/node.rb#15988 + # source://prism/lib/prism/node.rb#16025 + sig { returns(T.nilable(String)) } def then_keyword; end # The location of the `then` keyword, if present. @@ -33825,19 +37345,20 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^^ # - # source://prism/lib/prism/node.rb#15941 + # source://prism/lib/prism/node.rb#15978 + sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#16003 + # source://prism/lib/prism/node.rb#16040 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#16008 + # source://prism/lib/prism/node.rb#16045 def type; end end end @@ -33850,13 +37371,13 @@ end # until foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#16032 +# source://prism/lib/prism/node.rb#16069 class Prism::UntilNode < ::Prism::Node # Initialize a new UntilNode node. # # @return [UntilNode] a new instance of UntilNode # - # source://prism/lib/prism/node.rb#16034 + # source://prism/lib/prism/node.rb#16071 sig do params( source: Prism::Source, @@ -33874,12 +37395,12 @@ class Prism::UntilNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#16139 + # source://prism/lib/prism/node.rb#16176 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#16046 + # source://prism/lib/prism/node.rb#16083 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -33887,43 +37408,43 @@ class Prism::UntilNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#16082 + # source://prism/lib/prism/node.rb#16119 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#16051 + # source://prism/lib/prism/node.rb#16088 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism/lib/prism/node.rb#16118 + # source://prism/lib/prism/node.rb#16155 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism/lib/prism/node.rb#16094 + # source://prism/lib/prism/node.rb#16131 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#16064 + # source://prism/lib/prism/node.rb#16101 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#16056 + # source://prism/lib/prism/node.rb#16093 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> UntilNode # - # source://prism/lib/prism/node.rb#16069 + # source://prism/lib/prism/node.rb#16106 sig do params( node_id: Integer, @@ -33940,13 +37461,13 @@ class Prism::UntilNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#16051 + # source://prism/lib/prism/node.rb#16088 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } # - # source://prism/lib/prism/node.rb#16077 + # source://prism/lib/prism/node.rb#16114 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -33955,19 +37476,19 @@ class Prism::UntilNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#16123 + # source://prism/lib/prism/node.rb#16160 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#16113 + # source://prism/lib/prism/node.rb#16150 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#16087 + # source://prism/lib/prism/node.rb#16124 sig { returns(Prism::Location) } def keyword_loc; end @@ -33976,26 +37497,26 @@ class Prism::UntilNode < ::Prism::Node # attr_reader predicate: Prism::node # - # source://prism/lib/prism/node.rb#16107 + # source://prism/lib/prism/node.rb#16144 sig { returns(Prism::Node) } def predicate; end # attr_reader statements: StatementsNode? # - # source://prism/lib/prism/node.rb#16110 + # source://prism/lib/prism/node.rb#16147 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#16128 + # source://prism/lib/prism/node.rb#16165 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#16133 + # source://prism/lib/prism/node.rb#16170 def type; end end end @@ -34938,60 +38459,90 @@ end # ^^^^^^^^^ # end # -# source://prism/lib/prism/node.rb#16155 +# source://prism/lib/prism/node.rb#16192 class Prism::WhenNode < ::Prism::Node # Initialize a new WhenNode node. # # @return [WhenNode] a new instance of WhenNode # - # source://prism/lib/prism/node.rb#16157 + # source://prism/lib/prism/node.rb#16194 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).void + end def initialize(source, node_id, location, flags, keyword_loc, conditions, then_keyword_loc, statements); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#16257 + # source://prism/lib/prism/node.rb#16294 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#16169 + # source://prism/lib/prism/node.rb#16206 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#16174 + # source://prism/lib/prism/node.rb#16211 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#16187 + # source://prism/lib/prism/node.rb#16224 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#16179 + # source://prism/lib/prism/node.rb#16216 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism/lib/prism/node.rb#16212 + # source://prism/lib/prism/node.rb#16249 + sig { returns(T::Array[Prism::Node]) } def conditions; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?) -> WhenNode # - # source://prism/lib/prism/node.rb#16192 + # source://prism/lib/prism/node.rb#16229 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhenNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#16174 + # source://prism/lib/prism/node.rb#16211 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode? } # - # source://prism/lib/prism/node.rb#16200 + # source://prism/lib/prism/node.rb#16237 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -34999,45 +38550,50 @@ class Prism::WhenNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#16241 + # source://prism/lib/prism/node.rb#16278 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#16231 + # source://prism/lib/prism/node.rb#16268 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#16205 + # source://prism/lib/prism/node.rb#16242 + sig { returns(Prism::Location) } def keyword_loc; end # attr_reader statements: StatementsNode? # - # source://prism/lib/prism/node.rb#16228 + # source://prism/lib/prism/node.rb#16265 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism/lib/prism/node.rb#16236 + # source://prism/lib/prism/node.rb#16273 + sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism/lib/prism/node.rb#16215 + # source://prism/lib/prism/node.rb#16252 + sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#16246 + # source://prism/lib/prism/node.rb#16283 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#16251 + # source://prism/lib/prism/node.rb#16288 def type; end end end @@ -35050,13 +38606,13 @@ end # while foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism/lib/prism/node.rb#16274 +# source://prism/lib/prism/node.rb#16311 class Prism::WhileNode < ::Prism::Node # Initialize a new WhileNode node. # # @return [WhileNode] a new instance of WhileNode # - # source://prism/lib/prism/node.rb#16276 + # source://prism/lib/prism/node.rb#16313 sig do params( source: Prism::Source, @@ -35074,12 +38630,12 @@ class Prism::WhileNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#16381 + # source://prism/lib/prism/node.rb#16418 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#16288 + # source://prism/lib/prism/node.rb#16325 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -35087,43 +38643,43 @@ class Prism::WhileNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#16324 + # source://prism/lib/prism/node.rb#16361 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#16293 + # source://prism/lib/prism/node.rb#16330 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism/lib/prism/node.rb#16360 + # source://prism/lib/prism/node.rb#16397 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism/lib/prism/node.rb#16336 + # source://prism/lib/prism/node.rb#16373 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#16306 + # source://prism/lib/prism/node.rb#16343 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#16298 + # source://prism/lib/prism/node.rb#16335 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> WhileNode # - # source://prism/lib/prism/node.rb#16311 + # source://prism/lib/prism/node.rb#16348 sig do params( node_id: Integer, @@ -35140,13 +38696,13 @@ class Prism::WhileNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#16293 + # source://prism/lib/prism/node.rb#16330 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } # - # source://prism/lib/prism/node.rb#16319 + # source://prism/lib/prism/node.rb#16356 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -35155,19 +38711,19 @@ class Prism::WhileNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#16365 + # source://prism/lib/prism/node.rb#16402 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#16355 + # source://prism/lib/prism/node.rb#16392 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#16329 + # source://prism/lib/prism/node.rb#16366 sig { returns(Prism::Location) } def keyword_loc; end @@ -35176,26 +38732,26 @@ class Prism::WhileNode < ::Prism::Node # attr_reader predicate: Prism::node # - # source://prism/lib/prism/node.rb#16349 + # source://prism/lib/prism/node.rb#16386 sig { returns(Prism::Node) } def predicate; end # attr_reader statements: StatementsNode? # - # source://prism/lib/prism/node.rb#16352 + # source://prism/lib/prism/node.rb#16389 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#16370 + # source://prism/lib/prism/node.rb#16407 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#16375 + # source://prism/lib/prism/node.rb#16412 def type; end end end @@ -35205,7 +38761,7 @@ end # `foo` # ^^^^^ # -# source://prism/lib/prism/node.rb#16395 +# source://prism/lib/prism/node.rb#16432 class Prism::XStringNode < ::Prism::Node include ::Prism::HeredocQuery @@ -35213,7 +38769,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [XStringNode] a new instance of XStringNode # - # source://prism/lib/prism/node.rb#16397 + # source://prism/lib/prism/node.rb#16434 sig do params( source: Prism::Source, @@ -35231,60 +38787,60 @@ class Prism::XStringNode < ::Prism::Node # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#16507 + # source://prism/lib/prism/node.rb#16544 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#16409 + # source://prism/lib/prism/node.rb#16446 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#16414 + # source://prism/lib/prism/node.rb#16451 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism/lib/prism/node.rb#16486 + # source://prism/lib/prism/node.rb#16523 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism/lib/prism/node.rb#16466 + # source://prism/lib/prism/node.rb#16503 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#16424 + # source://prism/lib/prism/node.rb#16461 sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#16419 + # source://prism/lib/prism/node.rb#16456 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism/lib/prism/node.rb#16481 + # source://prism/lib/prism/node.rb#16518 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism/lib/prism/node.rb#16459 + # source://prism/lib/prism/node.rb#16496 sig { returns(Prism::Location) } def content_loc; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String) -> XStringNode # - # source://prism/lib/prism/node.rb#16429 + # source://prism/lib/prism/node.rb#16466 sig do params( node_id: Integer, @@ -35301,13 +38857,13 @@ class Prism::XStringNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#16414 + # source://prism/lib/prism/node.rb#16451 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String } # - # source://prism/lib/prism/node.rb#16437 + # source://prism/lib/prism/node.rb#16474 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -35318,7 +38874,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#16447 + # source://prism/lib/prism/node.rb#16484 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -35326,7 +38882,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism/lib/prism/node.rb#16442 + # source://prism/lib/prism/node.rb#16479 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -35335,19 +38891,19 @@ class Prism::XStringNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#16491 + # source://prism/lib/prism/node.rb#16528 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism/lib/prism/node.rb#16476 + # source://prism/lib/prism/node.rb#16513 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism/lib/prism/node.rb#16452 + # source://prism/lib/prism/node.rb#16489 sig { returns(Prism::Location) } def opening_loc; end @@ -35360,20 +38916,20 @@ class Prism::XStringNode < ::Prism::Node # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#16496 + # source://prism/lib/prism/node.rb#16533 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism/lib/prism/node.rb#16473 + # source://prism/lib/prism/node.rb#16510 sig { returns(String) } def unescaped; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#16501 + # source://prism/lib/prism/node.rb#16538 def type; end end end @@ -35383,60 +38939,90 @@ end # yield 1 # ^^^^^^^ # -# source://prism/lib/prism/node.rb#16521 +# source://prism/lib/prism/node.rb#16558 class Prism::YieldNode < ::Prism::Node # Initialize a new YieldNode node. # # @return [YieldNode] a new instance of YieldNode # - # source://prism/lib/prism/node.rb#16523 + # source://prism/lib/prism/node.rb#16560 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc); end # Implements case-equality for the node. This is effectively == but without # comparing the value of locations. Locations are checked only for presence. # - # source://prism/lib/prism/node.rb#16637 + # source://prism/lib/prism/node.rb#16674 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism/lib/prism/node.rb#16535 + # source://prism/lib/prism/node.rb#16572 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism/lib/prism/node.rb#16590 + # source://prism/lib/prism/node.rb#16627 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#16540 + # source://prism/lib/prism/node.rb#16577 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # - # source://prism/lib/prism/node.rb#16552 + # source://prism/lib/prism/node.rb#16589 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # - # source://prism/lib/prism/node.rb#16545 + # source://prism/lib/prism/node.rb#16582 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?) -> YieldNode # - # source://prism/lib/prism/node.rb#16557 + # source://prism/lib/prism/node.rb#16594 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::YieldNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism/lib/prism/node.rb#16540 + # source://prism/lib/prism/node.rb#16577 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location? } # - # source://prism/lib/prism/node.rb#16565 + # source://prism/lib/prism/node.rb#16602 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -35444,50 +39030,56 @@ class Prism::YieldNode < ::Prism::Node # def inspect -> String # - # source://prism/lib/prism/node.rb#16621 + # source://prism/lib/prism/node.rb#16658 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism/lib/prism/node.rb#16606 + # source://prism/lib/prism/node.rb#16643 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism/lib/prism/node.rb#16570 + # source://prism/lib/prism/node.rb#16607 + sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism/lib/prism/node.rb#16611 + # source://prism/lib/prism/node.rb#16648 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism/lib/prism/node.rb#16577 + # source://prism/lib/prism/node.rb#16614 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism/lib/prism/node.rb#16616 + # source://prism/lib/prism/node.rb#16653 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism/lib/prism/node.rb#16593 + # source://prism/lib/prism/node.rb#16630 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Return a symbol representation of this node type. See `Node#type`. # - # source://prism/lib/prism/node.rb#16626 + # source://prism/lib/prism/node.rb#16663 sig { override.returns(Symbol) } def type; end class << self # Return a symbol representation of this node type. See `Node::type`. # - # source://prism/lib/prism/node.rb#16631 + # source://prism/lib/prism/node.rb#16668 def type; end end end diff --git a/sorbet/rbi/gems/rbs@3.6.0.rbi b/sorbet/rbi/gems/rbs@3.6.1.rbi similarity index 100% rename from sorbet/rbi/gems/rbs@3.6.0.rbi rename to sorbet/rbi/gems/rbs@3.6.1.rbi diff --git a/sorbet/rbi/gems/ruby-lsp@0.19.0.rbi b/sorbet/rbi/gems/ruby-lsp@0.20.0.rbi similarity index 92% rename from sorbet/rbi/gems/ruby-lsp@0.19.0.rbi rename to sorbet/rbi/gems/ruby-lsp@0.20.0.rbi index a2535538..41e29688 100644 --- a/sorbet/rbi/gems/ruby-lsp@0.19.0.rbi +++ b/sorbet/rbi/gems/ruby-lsp@0.20.0.rbi @@ -74,113 +74,133 @@ class RubyIndexer::DeclarationListener sig { returns(T::Array[::String]) } def indexing_errors; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#411 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#439 sig { params(node: ::Prism::AliasMethodNode).void } def on_alias_method_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#288 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#293 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#320 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#325 sig { params(node: ::Prism::CallNode).void } def on_call_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#78 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#87 sig { params(node: ::Prism::ClassNode).void } def on_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#122 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#130 sig { params(node: ::Prism::ClassNode).void } def on_class_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#276 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#281 sig { params(node: ::Prism::ConstantAndWriteNode).void } def on_constant_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#282 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#287 sig { params(node: ::Prism::ConstantOperatorWriteNode).void } def on_constant_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#270 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#275 sig { params(node: ::Prism::ConstantOrWriteNode).void } def on_constant_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#254 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#259 sig { params(node: ::Prism::ConstantPathAndWriteNode).void } def on_constant_path_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#244 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#249 sig { params(node: ::Prism::ConstantPathOperatorWriteNode).void } def on_constant_path_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#234 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#239 sig { params(node: ::Prism::ConstantPathOrWriteNode).void } def on_constant_path_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#224 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#229 sig { params(node: ::Prism::ConstantPathWriteNode).void } def on_constant_path_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#264 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#269 sig { params(node: ::Prism::ConstantWriteNode).void } def on_constant_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#333 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#338 sig { params(node: ::Prism::DefNode).void } def on_def_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#376 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#379 sig { params(node: ::Prism::DefNode).void } def on_def_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#391 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#389 + sig { params(node: ::Prism::GlobalVariableAndWriteNode).void } + def on_global_variable_and_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#394 + sig { params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def on_global_variable_operator_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#399 + sig { params(node: ::Prism::GlobalVariableOrWriteNode).void } + def on_global_variable_or_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#404 + sig { params(node: ::Prism::GlobalVariableTargetNode).void } + def on_global_variable_target_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#409 + sig { params(node: ::Prism::GlobalVariableWriteNode).void } + def on_global_variable_write_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#419 sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } def on_instance_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#396 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#424 sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } def on_instance_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#401 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#429 sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } def on_instance_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#406 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#434 sig { params(node: ::Prism::InstanceVariableTargetNode).void } def on_instance_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#386 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#414 sig { params(node: ::Prism::InstanceVariableWriteNode).void } def on_instance_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#129 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#137 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#151 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#158 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#204 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#209 sig { params(node: ::Prism::MultiWriteNode).void } def on_multi_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#158 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#165 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#197 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#202 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_leave(node); end private - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#798 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#847 sig { params(name: ::String).returns(T::Array[::String]) } def actual_nesting(name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#546 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#595 sig do params( node: T.any(::Prism::ConstantAndWriteNode, ::Prism::ConstantOperatorWriteNode, ::Prism::ConstantOrWriteNode, ::Prism::ConstantPathAndWriteNode, ::Prism::ConstantPathOperatorWriteNode, ::Prism::ConstantPathOrWriteNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantPathWriteNode, ::Prism::ConstantTargetNode, ::Prism::ConstantWriteNode), @@ -190,27 +210,36 @@ class RubyIndexer::DeclarationListener end def add_constant(node, name, value = T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#595 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#646 sig { params(node: ::Prism::Node).returns(T.nilable(::String)) } def collect_comments(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#706 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#755 sig { returns(::RubyIndexer::Entry::Visibility) } def current_visibility; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#624 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#675 sig { params(name: ::String).returns(::String) } def fully_qualify_name(name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#489 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#539 sig { params(node: ::Prism::CallNode).void } def handle_alias_method(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#633 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#684 sig { params(node: ::Prism::CallNode, reader: T::Boolean, writer: T::Boolean).void } def handle_attribute(node, reader:, writer:); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#441 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#468 + sig do + params( + node: T.any(::Prism::GlobalVariableAndWriteNode, ::Prism::GlobalVariableOperatorWriteNode, ::Prism::GlobalVariableOrWriteNode, ::Prism::GlobalVariableTargetNode, ::Prism::GlobalVariableWriteNode), + loc: ::Prism::Location + ).void + end + def handle_global_variable(node, loc); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#492 sig do params( node: T.any(::Prism::InstanceVariableAndWriteNode, ::Prism::InstanceVariableOperatorWriteNode, ::Prism::InstanceVariableOrWriteNode, ::Prism::InstanceVariableTargetNode, ::Prism::InstanceVariableWriteNode), @@ -219,15 +248,15 @@ class RubyIndexer::DeclarationListener end def handle_instance_variable(node, loc); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#678 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#727 sig { params(node: ::Prism::CallNode, operation: ::Symbol).void } def handle_module_operation(node, operation); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#464 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#514 sig { params(node: ::Prism::CallNode).void } def handle_private_constant(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#711 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#760 sig do params( parameters_node: T.nilable(::Prism::ParametersNode) @@ -235,7 +264,7 @@ class RubyIndexer::DeclarationListener end def list_params(parameters_node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#773 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/declaration_listener.rb#822 sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::Symbol)) } def parameter_name(node); end end @@ -260,38 +289,38 @@ module RubyIndexer::Enhancement # # @abstract # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#24 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/enhancement.rb#28 sig do abstract .params( index: ::RubyIndexer::Index, owner: T.nilable(::RubyIndexer::Entry::Namespace), node: ::Prism::CallNode, - file_path: ::String + file_path: ::String, + code_units_cache: T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer)) ).void end - def on_call_node(index, owner, node, file_path); end + def on_call_node(index, owner, node, file_path, code_units_cache); end end # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#5 class RubyIndexer::Entry - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#39 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#38 sig do params( name: ::String, file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), - comments: T.nilable(::String), - encoding: ::Encoding + location: ::RubyIndexer::Location, + comments: T.nilable(::String) ).void end - def initialize(name, file_path, location, comments, encoding); end + def initialize(name, file_path, location, comments); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#81 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#67 sig { returns(::String) } def comments; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#76 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#62 sig { returns(::String) } def file_name; end @@ -312,15 +341,15 @@ class RubyIndexer::Entry # source://sorbet-runtime/0.5.11577lib/types/private/methods/_methods.rb#257 def name_location(*args, **_arg1, &blk); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#71 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#57 sig { returns(T::Boolean) } def private?; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#66 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#52 sig { returns(T::Boolean) } def protected?; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#61 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#47 sig { returns(T::Boolean) } def public?; end @@ -334,281 +363,274 @@ class RubyIndexer::Entry def visibility=(_arg0); end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#410 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#373 class RubyIndexer::Entry::Accessor < ::RubyIndexer::Entry::Member - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#414 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#377 sig { override.returns(T::Array[::RubyIndexer::Entry::Signature]) } def signatures; end end # A block method parameter, e.g. `def foo(&block)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#331 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#295 class RubyIndexer::Entry::BlockParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#343 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#307 sig { override.returns(::Symbol) } def decorated_name; end class << self - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#337 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#301 sig { returns(::RubyIndexer::Entry::BlockParameter) } def anonymous; end end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#332 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#296 RubyIndexer::Entry::BlockParameter::DEFAULT_NAME = T.let(T.unsafe(nil), Symbol) -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#201 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#178 class RubyIndexer::Entry::Class < ::RubyIndexer::Entry::Namespace - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#220 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#196 sig do params( nesting: T::Array[::String], file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), - name_location: T.any(::Prism::Location, ::RubyIndexer::Location), + location: ::RubyIndexer::Location, + name_location: ::RubyIndexer::Location, comments: T.nilable(::String), - encoding: ::Encoding, parent_class: T.nilable(::String) ).void end - def initialize(nesting, file_path, location, name_location, comments, encoding, parent_class); end + def initialize(nesting, file_path, location, name_location, comments, parent_class); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#226 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#202 sig { override.returns(::Integer) } def ancestor_hash; end # The unresolved name of the parent class. This may return `nil`, which indicates the lack of an explicit parent # and therefore ::Object is the correct parent class # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#207 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#184 sig { returns(T.nilable(::String)) } def parent_class; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#260 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#224 class RubyIndexer::Entry::Constant < ::RubyIndexer::Entry; end # Alias represents a resolved alias, which points to an existing constant target # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#507 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#456 class RubyIndexer::Entry::ConstantAlias < ::RubyIndexer::Entry - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#514 - sig do - params( - target: ::String, - unresolved_alias: ::RubyIndexer::Entry::UnresolvedConstantAlias, - encoding: ::Encoding - ).void - end - def initialize(target, unresolved_alias, encoding); end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#463 + sig { params(target: ::String, unresolved_alias: ::RubyIndexer::Entry::UnresolvedConstantAlias).void } + def initialize(target, unresolved_alias); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#511 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#460 sig { returns(::String) } def target; end end # A forwarding method parameter, e.g. `def foo(...)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#349 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#313 class RubyIndexer::Entry::ForwardingParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#353 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#317 sig { void } def initialize; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#131 +# Represents a global variable e.g.: $DEBUG +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#477 +class RubyIndexer::Entry::GlobalVariable < ::RubyIndexer::Entry; end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#121 class RubyIndexer::Entry::Include < ::RubyIndexer::Entry::ModuleOperation; end # Represents an instance variable e.g.: @a = 1 # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#529 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#480 class RubyIndexer::Entry::InstanceVariable < ::RubyIndexer::Entry - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#543 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#493 sig do params( name: ::String, file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), + location: ::RubyIndexer::Location, comments: T.nilable(::String), - encoding: ::Encoding, owner: T.nilable(::RubyIndexer::Entry::Namespace) ).void end - def initialize(name, file_path, location, comments, encoding, owner); end + def initialize(name, file_path, location, comments, owner); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#531 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#482 sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } def owner; end end # An required keyword method parameter, e.g. `def foo(a:)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#295 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#259 class RubyIndexer::Entry::KeywordParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#297 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#261 sig { override.returns(::Symbol) } def decorated_name; end end # A keyword rest method parameter, e.g. `def foo(**a)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#321 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#285 class RubyIndexer::Entry::KeywordRestParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#325 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#289 sig { override.returns(::Symbol) } def decorated_name; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#322 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#286 RubyIndexer::Entry::KeywordRestParameter::DEFAULT_NAME = T.let(T.unsafe(nil), Symbol) # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#359 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#323 class RubyIndexer::Entry::Member < ::RubyIndexer::Entry abstract! - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#379 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#342 sig do params( name: ::String, file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), + location: ::RubyIndexer::Location, comments: T.nilable(::String), - encoding: ::Encoding, visibility: ::RubyIndexer::Entry::Visibility, owner: T.nilable(::RubyIndexer::Entry::Namespace) ).void end - def initialize(name, file_path, location, comments, encoding, visibility, owner); end + def initialize(name, file_path, location, comments, visibility, owner); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#389 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#352 sig { returns(::String) } def decorated_parameters; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#397 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#360 sig { returns(::String) } def formatted_signatures; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#366 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#330 sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } def owner; end # @abstract # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#386 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#349 sig { abstract.returns(T::Array[::RubyIndexer::Entry::Signature]) } def signatures; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#426 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#389 class RubyIndexer::Entry::Method < ::RubyIndexer::Entry::Member - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#449 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#411 sig do params( name: ::String, file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), - name_location: T.any(::Prism::Location, ::RubyIndexer::Location), + location: ::RubyIndexer::Location, + name_location: ::RubyIndexer::Location, comments: T.nilable(::String), - encoding: ::Encoding, signatures: T::Array[::RubyIndexer::Entry::Signature], visibility: ::RubyIndexer::Entry::Visibility, owner: T.nilable(::RubyIndexer::Entry::Namespace) ).void end - def initialize(name, file_path, location, name_location, comments, encoding, signatures, visibility, owner); end + def initialize(name, file_path, location, name_location, comments, signatures, visibility, owner); end # Returns the location of the method name, excluding parameters or the body # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#434 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#397 sig { returns(::RubyIndexer::Location) } def name_location; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#430 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#393 sig { override.returns(T::Array[::RubyIndexer::Entry::Signature]) } def signatures; end end # A method alias is a resolved alias entry that points to the exact method target it refers to # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#582 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#531 class RubyIndexer::Entry::MethodAlias < ::RubyIndexer::Entry - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#594 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#543 sig do params( target: T.any(::RubyIndexer::Entry::Member, ::RubyIndexer::Entry::MethodAlias), - unresolved_alias: ::RubyIndexer::Entry::UnresolvedMethodAlias, - encoding: ::Encoding + unresolved_alias: ::RubyIndexer::Entry::UnresolvedMethodAlias ).void end - def initialize(target, unresolved_alias, encoding); end + def initialize(target, unresolved_alias); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#612 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#560 sig { returns(::String) } def decorated_parameters; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#617 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#565 sig { returns(::String) } def formatted_signatures; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#589 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#538 sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } def owner; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#622 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#570 sig { returns(T::Array[::RubyIndexer::Entry::Signature]) } def signatures; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#586 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#535 sig { returns(T.any(::RubyIndexer::Entry::Member, ::RubyIndexer::Entry::MethodAlias)) } def target; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#198 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#175 class RubyIndexer::Entry::Module < ::RubyIndexer::Entry::Namespace; end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#116 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#106 class RubyIndexer::Entry::ModuleOperation abstract! - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#126 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#116 sig { params(module_name: ::String).void } def initialize(module_name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#123 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#113 sig { returns(::String) } def module_name; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#134 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#124 class RubyIndexer::Entry::Namespace < ::RubyIndexer::Entry abstract! - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#157 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#146 sig do params( nesting: T::Array[::String], file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), - name_location: T.any(::Prism::Location, ::RubyIndexer::Location), - comments: T.nilable(::String), - encoding: ::Encoding + location: ::RubyIndexer::Location, + name_location: ::RubyIndexer::Location, + comments: T.nilable(::String) ).void end - def initialize(nesting, file_path, location, name_location, comments, encoding); end + def initialize(nesting, file_path, location, name_location, comments); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#193 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#170 sig { returns(::Integer) } def ancestor_hash; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#180 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#157 sig { returns(T::Array[::String]) } def mixin_operation_module_names; end @@ -616,46 +638,46 @@ class RubyIndexer::Entry::Namespace < ::RubyIndexer::Entry # code. Maintaining the order is essential to linearize ancestors the right way when a module is both included # and prepended # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#188 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#165 sig { returns(T::Array[::RubyIndexer::Entry::ModuleOperation]) } def mixin_operations; end # Returns the location of the constant name, excluding the parent class or the body # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#145 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#135 sig { returns(::RubyIndexer::Location) } def name_location; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#141 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#131 sig { returns(T::Array[::String]) } def nesting; end end # An optional keyword method parameter, e.g. `def foo(a: 123)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#303 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#267 class RubyIndexer::Entry::OptionalKeywordParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#305 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#269 sig { override.returns(::Symbol) } def decorated_name; end end # An optional method parameter, e.g. `def foo(a = 123)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#287 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#251 class RubyIndexer::Entry::OptionalParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#289 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#253 sig { override.returns(::Symbol) } def decorated_name; end end # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#263 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#227 class RubyIndexer::Entry::Parameter abstract! - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#277 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#241 sig { params(name: ::Symbol).void } def initialize(name:); end @@ -669,48 +691,48 @@ class RubyIndexer::Entry::Parameter # Name includes just the name of the parameter, excluding symbols like splats # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#271 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#235 sig { returns(::Symbol) } def name; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#132 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#122 class RubyIndexer::Entry::Prepend < ::RubyIndexer::Entry::ModuleOperation; end # A required method parameter, e.g. `def foo(a)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#283 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#247 class RubyIndexer::Entry::RequiredParameter < ::RubyIndexer::Entry::Parameter; end # A rest method parameter, e.g. `def foo(*a)` # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#311 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#275 class RubyIndexer::Entry::RestParameter < ::RubyIndexer::Entry::Parameter - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#315 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#279 sig { override.returns(::Symbol) } def decorated_name; end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#312 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#276 RubyIndexer::Entry::RestParameter::DEFAULT_NAME = T.let(T.unsafe(nil), Symbol) # Ruby doesn't support method overloading, so a method will have only one signature. # However RBS can represent the concept of method overloading, with different return types based on the arguments # passed, so we need to store all the signatures. # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#630 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#578 class RubyIndexer::Entry::Signature - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#637 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#585 sig { params(parameters: T::Array[::RubyIndexer::Entry::Parameter]).void } def initialize(parameters); end # Returns a string with the decorated names of the parameters of this member. E.g.: `(a, b = 1, c: 2)` # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#643 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#591 sig { returns(::String) } def format; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#735 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#683 sig { params(args: T.nilable(T::Array[::Prism::Node]), names: T::Array[::Symbol]).returns(T::Boolean) } def keyword_arguments_match?(args, names); end @@ -730,15 +752,15 @@ class RubyIndexer::Entry::Signature # foo(1, 2) # ``` # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#663 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#611 sig { params(arguments: T::Array[::Prism::Node]).returns(T::Boolean) } def matches?(arguments); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#634 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#582 sig { returns(T::Array[::RubyIndexer::Entry::Parameter]) } def parameters; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#722 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#670 sig do params( positional_args: T::Array[::Prism::Node], @@ -751,18 +773,17 @@ class RubyIndexer::Entry::Signature def positional_arguments_match?(positional_args, forwarding_arguments, keyword_args, min_pos, max_pos); end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#231 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#207 class RubyIndexer::Entry::SingletonClass < ::RubyIndexer::Entry::Class - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#242 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#217 sig do params( - location: ::Prism::Location, - name_location: ::Prism::Location, - comments: T.nilable(::String), - encoding: ::Encoding + location: ::RubyIndexer::Location, + name_location: ::RubyIndexer::Location, + comments: T.nilable(::String) ).void end - def update_singleton_information(location, name_location, comments, encoding); end + def update_singleton_information(location, name_location, comments); end end # An UnresolvedAlias points to a constant alias with a right hand side that has not yet been resolved. For @@ -776,27 +797,26 @@ end # target in [rdoc-ref:Index#resolve]. If the right hand side contains a constant that doesn't exist, then it's not # possible to resolve the alias and it will remain an UnresolvedAlias until the right hand side constant exists # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#478 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#428 class RubyIndexer::Entry::UnresolvedConstantAlias < ::RubyIndexer::Entry - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#498 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#447 sig do params( target: ::String, nesting: T::Array[::String], name: ::String, file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), - comments: T.nilable(::String), - encoding: ::Encoding + location: ::RubyIndexer::Location, + comments: T.nilable(::String) ).void end - def initialize(target, nesting, name, file_path, location, comments, encoding); end + def initialize(target, nesting, name, file_path, location, comments); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#485 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#435 sig { returns(T::Array[::String]) } def nesting; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#482 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#432 sig { returns(::String) } def target; end end @@ -805,32 +825,31 @@ end # example, if we have `alias a b`, we create an unresolved alias for `a` because we aren't sure immediate what `b` # is referring to # -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#552 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#502 class RubyIndexer::Entry::UnresolvedMethodAlias < ::RubyIndexer::Entry - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#572 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#521 sig do params( new_name: ::String, old_name: ::String, owner: T.nilable(::RubyIndexer::Entry::Namespace), file_path: ::String, - location: T.any(::Prism::Location, ::RubyIndexer::Location), - comments: T.nilable(::String), - encoding: ::Encoding + location: ::RubyIndexer::Location, + comments: T.nilable(::String) ).void end - def initialize(new_name, old_name, owner, file_path, location, comments, encoding); end + def initialize(new_name, old_name, owner, file_path, location, comments); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#556 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#506 sig { returns(::String) } def new_name; end # @return [String] # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#556 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#506 def old_name; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#559 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/entry.rb#509 sig { returns(T.nilable(::RubyIndexer::Entry::Namespace)) } def owner; end end @@ -879,15 +898,15 @@ class RubyIndexer::Index sig { returns(T::Boolean) } def empty?; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#683 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#682 sig do type_parameters(:T) .params( path: ::String, - type: T::Class[T.all(::RubyIndexer::Entry, T.type_parameter(:T))] - ).returns(T.nilable(T::Array[T.type_parameter(:T)])) + type: T.nilable(T::Class[T.all(::RubyIndexer::Entry, T.type_parameter(:T))]) + ).returns(T.nilable(T.any(T::Array[::RubyIndexer::Entry], T::Array[T.type_parameter(:T)]))) end - def entries_for(path, type); end + def entries_for(path, type = T.unsafe(nil)); end # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#654 sig { params(name: ::String).returns(::RubyIndexer::Entry::SingletonClass) } @@ -1094,11 +1113,11 @@ class RubyIndexer::Index # `A::B::A::B::Foo`. This method will remove any redundant parts from the final name based on the reference and the # nesting # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#981 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#982 sig { params(name: ::String, nesting: T::Array[::String]).returns(::String) } def build_non_redundant_full_name(name, nesting); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1019 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1020 sig do params( full_name: ::String, @@ -1107,7 +1126,7 @@ class RubyIndexer::Index end def direct_or_aliased_constant(full_name, seen_names); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#942 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#943 sig do params( name: T.nilable(::String), @@ -1119,7 +1138,7 @@ class RubyIndexer::Index # Linearize mixins for an array of namespace entries. This method will mutate the `ancestors` array with the # linearized ancestors of the mixins # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#727 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#728 sig do params( ancestors: T::Array[::String], @@ -1132,7 +1151,7 @@ class RubyIndexer::Index # Linearize the superclass of a given namespace (including modules with the implicit `Module` superclass). This # method will mutate the `ancestors` array with the linearized ancestors of the superclass # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#777 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#778 sig do params( ancestors: T::Array[::String], @@ -1145,7 +1164,7 @@ class RubyIndexer::Index end def linearize_superclass(ancestors, attached_class_name, fully_qualified_name, namespace_entries, nesting, singleton_levels); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#912 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#913 sig do params( name: ::String, @@ -1155,7 +1174,7 @@ class RubyIndexer::Index end def lookup_ancestor_chain(name, nesting, seen_names); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#883 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#884 sig do params( name: ::String, @@ -1168,7 +1187,7 @@ class RubyIndexer::Index # Attempts to resolve an UnresolvedAlias into a resolved Alias. If the unresolved alias is pointing to a constant # that doesn't exist, then we return the same UnresolvedAlias # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#850 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#851 sig do params( entry: ::RubyIndexer::Entry::UnresolvedConstantAlias, @@ -1180,7 +1199,7 @@ class RubyIndexer::Index # Attempt to resolve a given unresolved method alias. This method returns the resolved alias if we managed to # identify the target or the same unresolved alias entry if we couldn't # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1041 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#1042 sig do params( entry: ::RubyIndexer::Entry::UnresolvedMethodAlias, @@ -1192,7 +1211,7 @@ class RubyIndexer::Index # Runs the registered included hooks # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#692 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/index.rb#693 sig { params(fully_qualified_name: ::String, nesting: T::Array[::String]).void } def run_included_hooks(fully_qualified_name, nesting); end end @@ -1232,28 +1251,39 @@ end # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#5 class RubyIndexer::Location - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#19 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#41 sig { params(start_line: ::Integer, end_line: ::Integer, start_column: ::Integer, end_column: ::Integer).void } def initialize(start_line, end_line, start_column, end_column); end # @return [Integer] # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#9 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#31 def end_column; end # @return [Integer] # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#9 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#31 def end_line; end # @return [Integer] # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#9 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#31 def start_column; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#9 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#31 sig { returns(::Integer) } def start_line; end + + class << self + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/location.rb#20 + sig do + params( + prism_location: ::Prism::Location, + code_units_cache: T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer)) + ).returns(T.attached_class) + end + def from_prism_location(prism_location, code_units_cache); end + end end # A PrefixTree is a data structure that allows searching for partial strings fast. The tree is similar to a nested @@ -1389,7 +1419,7 @@ class RubyIndexer::RBSIndexer private - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#98 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#100 sig do params( declaration: T.any(::RBS::AST::Declarations::Class, ::RBS::AST::Declarations::Module), @@ -1398,15 +1428,15 @@ class RubyIndexer::RBSIndexer end def add_declaration_mixins_to_entry(declaration, entry); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#301 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#316 sig do params( - declaration: T.any(::RBS::AST::Declarations::Class, ::RBS::AST::Declarations::Constant, ::RBS::AST::Declarations::Module, ::RBS::AST::Members::Alias, ::RBS::AST::Members::MethodDefinition) + declaration: T.any(::RBS::AST::Declarations::Class, ::RBS::AST::Declarations::Constant, ::RBS::AST::Declarations::Global, ::RBS::AST::Declarations::Module, ::RBS::AST::Members::Alias, ::RBS::AST::Members::MethodDefinition) ).returns(T.nilable(::String)) end def comments_to_string(declaration); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#55 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#57 sig do params( declaration: T.any(::RBS::AST::Declarations::Class, ::RBS::AST::Declarations::Module), @@ -1430,7 +1460,7 @@ class RubyIndexer::RBSIndexer # # And we need to handle their nesting differently. # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#263 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#264 sig do params( declaration: ::RBS::AST::Declarations::Constant, @@ -1440,15 +1470,19 @@ class RubyIndexer::RBSIndexer end def handle_constant(declaration, nesting, file_path); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#114 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#275 + sig { params(declaration: ::RBS::AST::Declarations::Global, pathname: ::Pathname).void } + def handle_global_variable(declaration, pathname); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#116 sig { params(member: ::RBS::AST::Members::MethodDefinition, owner: ::RubyIndexer::Entry::Namespace).void } def handle_method(member, owner); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#275 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#290 sig { params(member: ::RBS::AST::Members::Alias, owner_entry: ::RubyIndexer::Entry::Namespace).void } def handle_signature_alias(member, owner_entry); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#174 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#175 sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::Parameter]) } def parse_arguments(function); end @@ -1456,11 +1490,11 @@ class RubyIndexer::RBSIndexer sig { params(declaration: ::RBS::AST::Declarations::Base, pathname: ::Pathname).void } def process_declaration(declaration, pathname); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#233 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#234 sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::OptionalKeywordParameter]) } def process_optional_keywords(function); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#153 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#154 sig do params( overload: ::RBS::AST::Members::MethodDefinition::Overload @@ -1468,31 +1502,31 @@ class RubyIndexer::RBSIndexer end def process_overload(overload); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#186 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#187 sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::RequiredParameter]) } def process_required_and_optional_positionals(function); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#226 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#227 sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::KeywordParameter]) } def process_required_keywords(function); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#240 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#241 sig { params(function: ::RBS::Types::Function).returns(::RubyIndexer::Entry::KeywordRestParameter) } def process_rest_keywords(function); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#217 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#218 sig { params(function: ::RBS::Types::Function).returns(::RubyIndexer::Entry::RestParameter) } def process_rest_positionals(function); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#210 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#211 sig { params(function: ::RBS::Types::Function).returns(T::Array[::RubyIndexer::Entry::OptionalParameter]) } def process_trailing_positionals(function); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#145 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#146 sig { params(member: ::RBS::AST::Members::MethodDefinition).returns(T::Array[::RubyIndexer::Entry::Signature]) } def signatures(member); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#83 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/rbs_indexer.rb#85 sig { params(rbs_location: ::RBS::Location).returns(::RubyIndexer::Location) } def to_ruby_indexer_location(rbs_location); end end @@ -1502,101 +1536,112 @@ RubyIndexer::RBSIndexer::HAS_UNTYPED_FUNCTION = T.let(T.unsafe(nil), TrueClass) # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#5 class RubyIndexer::ReferenceFinder - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#34 - sig { params(fully_qualified_name: ::String, index: ::RubyIndexer::Index, dispatcher: ::Prism::Dispatcher).void } - def initialize(fully_qualified_name, index, dispatcher); end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#68 + sig do + params( + target: ::RubyIndexer::ReferenceFinder::Target, + index: ::RubyIndexer::Index, + dispatcher: ::Prism::Dispatcher, + include_declarations: T::Boolean + ).void + end + def initialize(target, index, dispatcher, include_declarations: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#66 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#266 + sig { params(node: ::Prism::CallNode).void } + def on_call_node_enter(node); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#109 sig { params(node: ::Prism::ClassNode).void } def on_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#79 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#122 sig { params(node: ::Prism::ClassNode).void } def on_class_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#195 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#238 sig { params(node: ::Prism::ConstantAndWriteNode).void } def on_constant_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#200 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#243 sig { params(node: ::Prism::ConstantOperatorWriteNode).void } def on_constant_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#190 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#233 sig { params(node: ::Prism::ConstantOrWriteNode).void } def on_constant_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#174 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#217 sig { params(node: ::Prism::ConstantPathAndWriteNode).void } def on_constant_path_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#115 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#158 sig { params(node: ::Prism::ConstantPathNode).void } def on_constant_path_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#163 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#206 sig { params(node: ::Prism::ConstantPathOperatorWriteNode).void } def on_constant_path_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#152 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#195 sig { params(node: ::Prism::ConstantPathOrWriteNode).void } def on_constant_path_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#141 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#184 sig { params(node: ::Prism::ConstantPathWriteNode).void } def on_constant_path_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#123 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#166 sig { params(node: ::Prism::ConstantReadNode).void } def on_constant_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#185 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#228 sig { params(node: ::Prism::ConstantWriteNode).void } def on_constant_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#205 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#248 sig { params(node: ::Prism::DefNode).void } def on_def_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#212 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#259 sig { params(node: ::Prism::DefNode).void } def on_def_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#84 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#127 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#97 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#140 sig { params(node: ::Prism::ModuleNode).void } def on_module_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#131 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#174 sig { params(node: ::Prism::MultiWriteNode).void } def on_multi_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#102 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#145 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_enter(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#110 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#153 sig { params(node: ::Prism::SingletonClassNode).void } def on_singleton_class_node_leave(node); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#25 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#102 sig { returns(T::Array[::RubyIndexer::ReferenceFinder::Reference]) } def references; end private - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#221 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#275 sig { params(name: ::String).returns(T::Array[::String]) } def actual_nesting(name); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#235 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#289 sig { params(name: ::String, location: ::Prism::Location).void } def collect_constant_references(name, location); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#255 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#317 sig do params( node: T.any(::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode) @@ -1605,21 +1650,54 @@ class RubyIndexer::ReferenceFinder def constant_name(node); end end -# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#8 -class RubyIndexer::ReferenceFinder::Reference +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#14 +class RubyIndexer::ReferenceFinder::ConstTarget < ::RubyIndexer::ReferenceFinder::Target + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#21 + sig { params(fully_qualified_name: ::String).void } + def initialize(fully_qualified_name); end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#18 - sig { params(name: ::String, location: ::Prism::Location).void } - def initialize(name, location); end + sig { returns(::String) } + def fully_qualified_name; end +end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#15 +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#27 +class RubyIndexer::ReferenceFinder::MethodTarget < ::RubyIndexer::ReferenceFinder::Target + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#34 + sig { params(method_name: ::String).void } + def initialize(method_name); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#31 + sig { returns(::String) } + def method_name; end +end + +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#40 +class RubyIndexer::ReferenceFinder::Reference + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#53 + sig { params(name: ::String, location: ::Prism::Location, declaration: T::Boolean).void } + def initialize(name, location, declaration:); end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#50 + sig { returns(T::Boolean) } + def declaration; end + + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#47 sig { returns(::Prism::Location) } def location; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#12 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#44 sig { returns(::String) } def name; end end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/reference_finder.rb#8 +class RubyIndexer::ReferenceFinder::Target + abstract! +end + # source://ruby-lsp/lib/ruby-lsp.rb#4 module RubyLsp; end @@ -2089,23 +2167,27 @@ class RubyLsp::ERBDocument < ::RubyLsp::Document ParseResultType = type_member { { fixed: Prism::ParseResult } } - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#15 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#23 sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, encoding: ::Encoding).void } def initialize(source:, version:, uri:, encoding: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#10 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#20 + sig { returns(T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer))) } + def code_units_cache; end + + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#12 sig { returns(::String) } def host_language_source; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#57 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#75 sig { params(char_position: ::Integer).returns(T.nilable(T::Boolean)) } def inside_host_language?(char_position); end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#42 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#55 sig { override.returns(::RubyLsp::Document::LanguageId) } def language_id; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#52 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#65 sig do params( position: T::Hash[::Symbol, T.untyped], @@ -2114,45 +2196,45 @@ class RubyLsp::ERBDocument < ::RubyLsp::Document end def locate_node(position, node_types: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#23 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#35 sig { override.returns(T::Boolean) } def parse!; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#37 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#50 sig { override.returns(T::Boolean) } def syntax_error?; end end -# source://ruby-lsp/lib/ruby_lsp/erb_document.rb#62 +# source://ruby-lsp/lib/ruby_lsp/erb_document.rb#80 class RubyLsp::ERBDocument::ERBScanner - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#69 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#87 sig { params(source: ::String).void } def initialize(source); end # @return [String] # - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#66 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#84 def host_language; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#66 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#84 sig { returns(::String) } def ruby; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#78 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#96 sig { void } def scan; end private - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#154 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#172 sig { returns(::String) } def next_char; end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#143 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#161 sig { params(char: ::String).void } def push_char(char); end - # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#88 + # source://ruby-lsp/lib/ruby_lsp/erb_document.rb#106 sig { void } def scan_char; end end @@ -2554,77 +2636,81 @@ class RubyLsp::Listeners::Definition end def initialize(response_builder, global_state, language_id, uri, node_context, dispatcher, sorbet_level); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#97 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#98 sig { params(node: ::Prism::BlockArgumentNode).void } def on_block_argument_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#56 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#57 sig { params(node: ::Prism::CallNode).void } def on_call_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#108 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#109 sig { params(node: ::Prism::ConstantPathNode).void } def on_constant_path_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#116 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#117 sig { params(node: ::Prism::ConstantReadNode).void } def on_constant_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#159 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#179 sig { params(node: ::Prism::ForwardingSuperNode).void } def on_forwarding_super_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#134 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#125 + sig { params(node: ::Prism::GlobalVariableReadNode).void } + def on_global_variable_read_node_enter(node); end + + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#154 sig { params(node: ::Prism::InstanceVariableAndWriteNode).void } def on_instance_variable_and_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#139 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#159 sig { params(node: ::Prism::InstanceVariableOperatorWriteNode).void } def on_instance_variable_operator_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#144 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#164 sig { params(node: ::Prism::InstanceVariableOrWriteNode).void } def on_instance_variable_or_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#124 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#144 sig { params(node: ::Prism::InstanceVariableReadNode).void } def on_instance_variable_read_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#149 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#169 sig { params(node: ::Prism::InstanceVariableTargetNode).void } def on_instance_variable_target_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#129 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#149 sig { params(node: ::Prism::InstanceVariableWriteNode).void } def on_instance_variable_write_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#75 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#76 sig { params(node: ::Prism::StringNode).void } def on_string_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#154 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#174 sig { params(node: ::Prism::SuperNode).void } def on_super_node_enter(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#86 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#87 sig { params(node: ::Prism::SymbolNode).void } def on_symbol_node_enter(node); end private - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#281 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#301 sig { params(value: ::String).void } def find_in_index(value); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#270 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#290 sig { params(node: ::Prism::CallNode).void } def handle_autoload_definition(node); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#181 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#201 sig { params(name: ::String).void } def handle_instance_variable_definition(name); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#208 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#228 sig do params( message: ::String, @@ -2634,11 +2720,11 @@ class RubyLsp::Listeners::Definition end def handle_method_definition(message, receiver_type, inherited_only: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#235 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#255 sig { params(node: ::Prism::StringNode, message: ::Symbol).void } def handle_require_definition(node, message); end - # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#166 + # source://ruby-lsp/lib/ruby_lsp/listeners/definition.rb#186 sig { void } def handle_super_node_definition; end end @@ -3708,10 +3794,16 @@ class RubyLsp::Requests::CodeActionResolve < ::RubyLsp::Requests::Request include ::RubyLsp::Requests::Support::Common # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#27 - sig { params(document: RubyLsp::RubyDocument, code_action: T::Hash[::Symbol, T.untyped]).void } - def initialize(document, code_action); end + sig do + params( + document: RubyLsp::RubyDocument, + global_state: ::RubyLsp::GlobalState, + code_action: T::Hash[::Symbol, T.untyped] + ).void + end + def initialize(document, global_state, code_action); end - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#34 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#35 sig do override .returns(T.any(::LanguageServer::Protocol::Interface::CodeAction, ::RubyLsp::Requests::CodeActionResolve::Error)) @@ -3720,7 +3812,7 @@ class RubyLsp::Requests::CodeActionResolve < ::RubyLsp::Requests::Request private - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#253 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#265 sig do params( range: T::Hash[::Symbol, T.untyped], @@ -3729,27 +3821,27 @@ class RubyLsp::Requests::CodeActionResolve < ::RubyLsp::Requests::Request end def create_text_edit(range, new_text); end - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#264 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#276 sig { params(node: ::Prism::BlockNode, indentation: T.nilable(::String)).returns(::String) } def recursively_switch_nested_block_styles(node, indentation); end - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#184 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#191 sig do returns(T.any(::LanguageServer::Protocol::Interface::CodeAction, ::RubyLsp::Requests::CodeActionResolve::Error)) end def refactor_method; end - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#90 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#91 sig do returns(T.any(::LanguageServer::Protocol::Interface::CodeAction, ::RubyLsp::Requests::CodeActionResolve::Error)) end def refactor_variable; end - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#293 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#305 sig { params(body: ::Prism::Node, indentation: T.nilable(::String)).returns(::String) } def switch_block_body(body, indentation); end - # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#52 + # source://ruby-lsp/lib/ruby_lsp/requests/code_action_resolve.rb#53 sig do returns(T.any(::LanguageServer::Protocol::Interface::CodeAction, ::RubyLsp::Requests::CodeActionResolve::Error)) end @@ -3848,7 +3940,7 @@ class RubyLsp::Requests::Completion < ::RubyLsp::Requests::Request end def initialize(document, global_state, params, sorbet_level, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#92 + # source://ruby-lsp/lib/ruby_lsp/requests/completion.rb#93 sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::CompletionItem]) } def perform; end @@ -3913,7 +4005,7 @@ class RubyLsp::Requests::Definition < ::RubyLsp::Requests::Request end def initialize(document, global_state, position, dispatcher, sorbet_level); end - # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#104 + # source://ruby-lsp/lib/ruby_lsp/requests/definition.rb#106 sig do override .returns(T::Array[T.any(::LanguageServer::Protocol::Interface::Location, ::LanguageServer::Protocol::Interface::LocationLink)]) @@ -3976,7 +4068,7 @@ class RubyLsp::Requests::DocumentHighlight < ::RubyLsp::Requests::Request end def initialize(global_state, document, position, dispatcher); end - # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#41 + # source://ruby-lsp/lib/ruby_lsp/requests/document_highlight.rb#45 sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::DocumentHighlight]) } def perform; end end @@ -4091,7 +4183,7 @@ class RubyLsp::Requests::Hover < ::RubyLsp::Requests::Request end def initialize(document, global_state, position, dispatcher, sorbet_level); end - # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#77 + # source://ruby-lsp/lib/ruby_lsp/requests/hover.rb#78 sig { override.returns(ResponseType) } def perform; end @@ -4228,6 +4320,71 @@ class RubyLsp::Requests::PrepareTypeHierarchy < ::RubyLsp::Requests::Request end end +# The [range formatting](https://microsoft.github.io/language-server-protocol/specification#textDocument_rangeFormatting) +# is used to format a selection or to format on paste. +# +# source://ruby-lsp/lib/ruby_lsp/requests/range_formatting.rb#8 +class RubyLsp::Requests::RangeFormatting < ::RubyLsp::Requests::Request + # source://ruby-lsp/lib/ruby_lsp/requests/range_formatting.rb#12 + sig do + params( + global_state: ::RubyLsp::GlobalState, + document: RubyLsp::RubyDocument, + params: T::Hash[::Symbol, T.untyped] + ).void + end + def initialize(global_state, document, params); end + + # source://ruby-lsp/lib/ruby_lsp/requests/range_formatting.rb#21 + sig { override.returns(T.nilable(T::Array[::LanguageServer::Protocol::Interface::TextEdit])) } + def perform; end +end + +# The +# [references](https://microsoft.github.io/language-server-protocol/specification#textDocument_references) +# request finds all references for the selected symbol. +# +# source://ruby-lsp/lib/ruby_lsp/requests/references.rb#9 +class RubyLsp::Requests::References < ::RubyLsp::Requests::Request + include ::RubyLsp::Requests::Support::Common + + # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#21 + sig do + params( + global_state: ::RubyLsp::GlobalState, + store: ::RubyLsp::Store, + document: T.any(RubyLsp::ERBDocument, RubyLsp::RubyDocument), + params: T::Hash[::Symbol, T.untyped] + ).void + end + def initialize(global_state, store, document, params); end + + # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#31 + sig { override.returns(T::Array[::LanguageServer::Protocol::Interface::Location]) } + def perform; end + + private + + # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#127 + sig do + params( + target: ::RubyIndexer::ReferenceFinder::Target, + parse_result: ::Prism::ParseResult, + uri: ::URI::Generic + ).void + end + def collect_references(target, parse_result, uri); end + + # source://ruby-lsp/lib/ruby_lsp/requests/references.rb#104 + sig do + params( + target_node: T.any(::Prism::CallNode, ::Prism::ConstantPathNode, ::Prism::ConstantPathTargetNode, ::Prism::ConstantReadNode, ::Prism::DefNode), + node_context: ::RubyLsp::NodeContext + ).returns(T.nilable(::RubyIndexer::ReferenceFinder::Target)) + end + def create_reference_target(target_node, node_context); end +end + # The # [rename](https://microsoft.github.io/language-server-protocol/specification#textDocument_rename) # request renames all instances of a symbol in a document. @@ -4253,7 +4410,7 @@ class RubyLsp::Requests::Rename < ::RubyLsp::Requests::Request private - # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#172 + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#179 sig do params( name: ::String, @@ -4262,18 +4419,18 @@ class RubyLsp::Requests::Rename < ::RubyLsp::Requests::Request end def adjust_reference_for_edit(name, reference); end - # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#161 + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#168 sig do params( - fully_qualified_name: ::String, + target: ::RubyIndexer::ReferenceFinder::Target, parse_result: ::Prism::ParseResult, name: ::String, uri: ::URI::Generic ).returns(T::Array[::LanguageServer::Protocol::Interface::TextEdit]) end - def collect_changes(fully_qualified_name, parse_result, name, uri); end + def collect_changes(target, parse_result, name, uri); end - # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#98 + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#100 sig do params( fully_qualified_name: ::String, @@ -4282,16 +4439,16 @@ class RubyLsp::Requests::Rename < ::RubyLsp::Requests::Request end def collect_file_renames(fully_qualified_name, document_changes); end - # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#131 + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#138 sig do params( - fully_qualified_name: ::String, + target: ::RubyIndexer::ReferenceFinder::Target, name: ::String ).returns(T::Hash[::String, T::Array[::LanguageServer::Protocol::Interface::TextEdit]]) end - def collect_text_edits(fully_qualified_name, name); end + def collect_text_edits(target, name); end - # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#182 + # source://ruby-lsp/lib/ruby_lsp/requests/rename.rb#189 sig { params(constant_name: ::String).returns(::String) } def file_from_constant_name(constant_name); end end @@ -4473,7 +4630,7 @@ class RubyLsp::Requests::SignatureHelp < ::RubyLsp::Requests::Request end def initialize(document, global_state, position, context, dispatcher, sorbet_level); end - # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#53 + # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#58 sig { override.returns(T.nilable(::LanguageServer::Protocol::Interface::SignatureHelp)) } def perform; end @@ -4486,7 +4643,7 @@ class RubyLsp::Requests::SignatureHelp < ::RubyLsp::Requests::Request # # In that case, we want to provide signature help for `foo` and not `another_method_call`. # - # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#75 + # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#80 sig do params( target: T.nilable(::Prism::Node), @@ -4496,7 +4653,7 @@ class RubyLsp::Requests::SignatureHelp < ::RubyLsp::Requests::Request end def adjust_for_nested_target(target, parent, position); end - # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#91 + # source://ruby-lsp/lib/ruby_lsp/requests/signature_help.rb#96 sig { params(node: ::Prism::Node, position: T::Hash[::Symbol, T.untyped]).returns(T::Boolean) } def node_covers?(node, position); end @@ -4625,7 +4782,7 @@ module RubyLsp::Requests::Support::Formatter # @abstract # - # source://ruby-lsp/lib/ruby_lsp/requests/support/formatter.rb#22 + # source://ruby-lsp/lib/ruby_lsp/requests/support/formatter.rb#25 sig do abstract .params( @@ -4640,6 +4797,19 @@ module RubyLsp::Requests::Support::Formatter # source://ruby-lsp/lib/ruby_lsp/requests/support/formatter.rb#14 sig { abstract.params(uri: ::URI::Generic, document: RubyLsp::RubyDocument).returns(T.nilable(::String)) } def run_formatting(uri, document); end + + # @abstract + # + # source://ruby-lsp/lib/ruby_lsp/requests/support/formatter.rb#17 + sig do + abstract + .params( + uri: ::URI::Generic, + source: ::String, + base_indentation: ::Integer + ).returns(T.nilable(::String)) + end + def run_range_formatting(uri, source, base_indentation); end end # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#23 @@ -4726,7 +4896,7 @@ class RubyLsp::Requests::Support::RuboCopFormatter sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_formatter.rb#37 + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_formatter.rb#43 sig do override .params( @@ -4739,6 +4909,19 @@ class RubyLsp::Requests::Support::RuboCopFormatter # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_formatter.rb#23 sig { override.params(uri: ::URI::Generic, document: RubyLsp::RubyDocument).returns(T.nilable(::String)) } def run_formatting(uri, document); end + + # RuboCop does not support range formatting + # + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_formatter.rb#33 + sig do + override + .params( + uri: ::URI::Generic, + source: ::String, + base_indentation: ::Integer + ).returns(T.nilable(::String)) + end + def run_range_formatting(uri, source, base_indentation); end end # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#45 @@ -4747,7 +4930,7 @@ class RubyLsp::Requests::Support::RuboCopRunner < ::RuboCop::Runner sig { params(args: ::String).void } def initialize(*args); end - # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#54 + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#64 sig { returns(::RuboCop::Config) } def config_for_working_directory; end @@ -4755,7 +4938,7 @@ class RubyLsp::Requests::Support::RuboCopRunner < ::RuboCop::Runner sig { returns(::String) } def formatted_source; end - # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#51 + # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#61 sig { returns(T::Array[::RuboCop::Cop::Offense]) } def offenses; end @@ -4785,7 +4968,7 @@ end # source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#48 class RubyLsp::Requests::Support::RuboCopRunner::ConfigurationError < ::StandardError; end -# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#56 +# source://ruby-lsp/lib/ruby_lsp/requests/support/rubocop_runner.rb#50 RubyLsp::Requests::Support::RuboCopRunner::DEFAULT_ARGS = T.let(T.unsafe(nil), Array) # source://ruby-lsp/lib/ruby_lsp/requests/support/selection_range.rb#7 @@ -4901,13 +5084,13 @@ class RubyLsp::ResponseBuilders::DocumentSymbol < ::RubyLsp::ResponseBuilders::R def response; end end -# source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#9 +# source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#11 class RubyLsp::ResponseBuilders::DocumentSymbol::SymbolHierarchyRoot - # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#16 + # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#18 sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#13 + # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#15 sig { returns(T::Array[::LanguageServer::Protocol::Interface::DocumentSymbol]) } def children; end end @@ -4954,30 +5137,34 @@ class RubyLsp::ResponseBuilders::SemanticHighlighting < ::RubyLsp::ResponseBuild ResponseType = type_member { { fixed: LanguageServer::Protocol::Interface::SemanticTokens } } - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#59 - sig { params(encoding: ::Encoding).void } - def initialize(encoding); end + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#64 + sig do + params( + code_units_cache: T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer)) + ).void + end + def initialize(code_units_cache); end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#66 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#71 sig { params(location: ::Prism::Location, type: ::Symbol, modifiers: T::Array[::Symbol]).void } def add_token(location, type, modifiers = T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#90 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#96 sig { returns(T.nilable(::RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken)) } def last; end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#81 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#87 sig { params(location: ::Prism::Location).returns(T::Boolean) } def last_token_matches?(location); end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#95 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#101 sig { override.returns(T::Array[::RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken]) } def response; end end -# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#99 +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#105 class RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#126 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#132 sig do params( start_line: ::Integer, @@ -4989,51 +5176,51 @@ class RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken end def initialize(start_line:, start_code_unit_column:, length:, type:, modifier:); end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#109 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#115 sig { returns(::Integer) } def length; end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#115 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#121 sig { returns(T::Array[::Integer]) } def modifier; end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#143 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#149 sig { params(modifier_symbols: T::Array[::Symbol]).void } def replace_modifier(modifier_symbols); end # @raise [UndefinedTokenType] # - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#135 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#141 sig { params(type_symbol: ::Symbol).void } def replace_type(type_symbol); end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#106 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#112 sig { returns(::Integer) } def start_code_unit_column; end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#103 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#109 sig { returns(::Integer) } def start_line; end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#112 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#118 sig { returns(::Integer) } def type; end end -# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#153 +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#159 class RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticTokenEncoder - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#157 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#163 sig { void } def initialize; end # For more information on how each number is calculated, read: # https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_semanticTokens # - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#192 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#198 sig { params(token: ::RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken).returns(T::Array[::Integer]) } def compute_delta(token); end - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#167 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#173 sig do params( tokens: T::Array[::RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticToken] @@ -5046,15 +5233,15 @@ class RubyLsp::ResponseBuilders::SemanticHighlighting::SemanticTokenEncoder # 0b1000000000, as :default_library is the 10th bit according # to the token modifiers index map. # - # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#214 + # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#220 sig { params(modifiers: T::Array[::Integer]).returns(::Integer) } def encode_modifiers(modifiers); end end -# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#38 +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#40 RubyLsp::ResponseBuilders::SemanticHighlighting::TOKEN_MODIFIERS = T.let(T.unsafe(nil), Hash) -# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#9 +# source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#11 RubyLsp::ResponseBuilders::SemanticHighlighting::TOKEN_TYPES = T.let(T.unsafe(nil), Hash) # source://ruby-lsp/lib/ruby_lsp/response_builders/semantic_highlighting.rb#7 @@ -5106,11 +5293,19 @@ class RubyLsp::RubyDocument < ::RubyLsp::Document ParseResultType = type_member { { fixed: Prism::ParseResult } } - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#139 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#146 + sig { params(source: ::String, version: ::Integer, uri: ::URI::Generic, encoding: ::Encoding).void } + def initialize(source:, version:, uri:, encoding: T.unsafe(nil)); end + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#143 + sig { returns(T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer))) } + def code_units_cache; end + + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#170 sig { override.returns(::RubyLsp::Document::LanguageId) } def language_id; end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#169 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#200 sig do params( range: T::Hash[::Symbol, T.untyped], @@ -5119,7 +5314,7 @@ class RubyLsp::RubyDocument < ::RubyLsp::Document end def locate_first_within_range(range, node_types: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#203 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#234 sig do params( position: T::Hash[::Symbol, T.untyped], @@ -5128,28 +5323,29 @@ class RubyLsp::RubyDocument < ::RubyLsp::Document end def locate_node(position, node_types: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#125 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#155 sig { override.returns(T::Boolean) } def parse!; end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#144 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#175 sig { returns(::RubyLsp::RubyDocument::SorbetLevel) } def sorbet_level; end - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#134 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#165 sig { override.returns(T::Boolean) } def syntax_error?; end class << self - # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#31 + # source://ruby-lsp/lib/ruby_lsp/ruby_document.rb#35 sig do params( node: ::Prism::Node, char_position: ::Integer, + code_units_cache: T.any(::Prism::CodeUnitsCache, T.proc.params(arg0: ::Integer).returns(::Integer)), node_types: T::Array[T.class_of(Prism::Node)] ).returns(::RubyLsp::NodeContext) end - def locate(node, char_position, node_types: T.unsafe(nil)); end + def locate(node, char_position, code_units_cache:, node_types: T.unsafe(nil)); end end end @@ -5209,7 +5405,7 @@ class RubyLsp::Server < ::RubyLsp::BaseServer sig { returns(::RubyLsp::GlobalState) } def global_state; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#129 + # source://ruby-lsp/lib/ruby_lsp/server.rb#142 sig { params(include_project_addons: T::Boolean).void } def load_addons(include_project_addons: T.unsafe(nil)); end @@ -5219,55 +5415,55 @@ class RubyLsp::Server < ::RubyLsp::BaseServer private - # source://ruby-lsp/lib/ruby_lsp/server.rb#1018 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1079 sig { params(id: ::String, title: ::String, percentage: ::Integer).void } def begin_progress(id, title, percentage: T.unsafe(nil)); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1079 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1140 sig { void } def check_formatter_is_available; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#704 + # source://ruby-lsp/lib/ruby_lsp/server.rb#765 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def code_action_resolve(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1061 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1122 sig { params(id: ::String).void } def end_progress(id); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#986 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1047 sig { void } def perform_initial_indexing; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1097 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1158 sig { params(indexing_options: T.nilable(T::Hash[::Symbol, T.untyped])).void } def process_indexing_configuration(indexing_options); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#1042 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1103 sig { params(id: ::String, percentage: ::Integer).void } def progress(id, percentage); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#398 + # source://ruby-lsp/lib/ruby_lsp/server.rb#413 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def run_combined_requests(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#164 + # source://ruby-lsp/lib/ruby_lsp/server.rb#177 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def run_initialize(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#281 + # source://ruby-lsp/lib/ruby_lsp/server.rb#296 sig { void } def run_initialized; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#981 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1042 sig { override.void } def shutdown; end - # source://ruby-lsp/lib/ruby_lsp/server.rb#640 + # source://ruby-lsp/lib/ruby_lsp/server.rb#701 sig { params(document: RubyLsp::Document[T.untyped]).returns(::RubyLsp::RubyDocument::SorbetLevel) } def sorbet_level(document); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#682 + # source://ruby-lsp/lib/ruby_lsp/server.rb#743 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_code_action(message); end @@ -5277,35 +5473,35 @@ class RubyLsp::Server < ::RubyLsp::BaseServer # source://sorbet-runtime/0.5.11577lib/types/private/methods/_methods.rb#257 def text_document_code_lens(*args, **_arg1, &blk); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#769 + # source://ruby-lsp/lib/ruby_lsp/server.rb#830 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_completion(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#794 + # source://ruby-lsp/lib/ruby_lsp/server.rb#855 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_completion_item_resolve(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#839 + # source://ruby-lsp/lib/ruby_lsp/server.rb#900 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_definition(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#729 + # source://ruby-lsp/lib/ruby_lsp/server.rb#790 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_diagnostic(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#362 + # source://ruby-lsp/lib/ruby_lsp/server.rb#377 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_change(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#346 + # source://ruby-lsp/lib/ruby_lsp/server.rb#361 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_close(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#306 + # source://ruby-lsp/lib/ruby_lsp/server.rb#321 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_did_open(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#556 + # source://ruby-lsp/lib/ruby_lsp/server.rb#599 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_document_highlight(message); end @@ -5327,71 +5523,79 @@ class RubyLsp::Server < ::RubyLsp::BaseServer # source://sorbet-runtime/0.5.11577lib/types/private/methods/_methods.rb#257 def text_document_folding_range(*args, **_arg1, &blk); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#517 + # source://ruby-lsp/lib/ruby_lsp/server.rb#560 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_formatting(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#595 + # source://ruby-lsp/lib/ruby_lsp/server.rb#638 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_hover(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#648 + # source://ruby-lsp/lib/ruby_lsp/server.rb#709 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_inlay_hint(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#572 + # source://ruby-lsp/lib/ruby_lsp/server.rb#615 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_on_type_formatting(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#923 + # source://ruby-lsp/lib/ruby_lsp/server.rb#984 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_prepare_type_hierarchy(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#620 + # source://ruby-lsp/lib/ruby_lsp/server.rb#532 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_range_formatting(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#683 + sig { params(message: T::Hash[::Symbol, T.untyped]).void } + def text_document_references(message); end + + # source://ruby-lsp/lib/ruby_lsp/server.rb#663 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_rename(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#372 + # source://ruby-lsp/lib/ruby_lsp/server.rb#387 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_selection_range(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#463 + # source://ruby-lsp/lib/ruby_lsp/server.rb#478 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_delta(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#442 + # source://ruby-lsp/lib/ruby_lsp/server.rb#457 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_full(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#488 + # source://ruby-lsp/lib/ruby_lsp/server.rb#503 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_semantic_tokens_range(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#904 + # source://ruby-lsp/lib/ruby_lsp/server.rb#965 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_show_syntax_tree(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#813 + # source://ruby-lsp/lib/ruby_lsp/server.rb#874 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def text_document_signature_help(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#951 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1012 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def type_hierarchy_subtypes(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#942 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1003 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def type_hierarchy_supertypes(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#958 + # source://ruby-lsp/lib/ruby_lsp/server.rb#1019 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_dependencies(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#864 + # source://ruby-lsp/lib/ruby_lsp/server.rb#925 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_did_change_watched_files(message); end - # source://ruby-lsp/lib/ruby_lsp/server.rb#891 + # source://ruby-lsp/lib/ruby_lsp/server.rb#952 sig { params(message: T::Hash[::Symbol, T.untyped]).void } def workspace_symbol(message); end end @@ -5566,7 +5770,7 @@ end # This condition must remain even after support for 3.4 has been dropped for users that have # `uri` in their lockfile, decoupling it from the ruby version. # -# source://ruby-lsp/lib/core_ext/uri.rb#9 +# source://ruby-lsp/lib/core_ext/uri.rb#11 URI::Generic::PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) # Must be kept in sync with the one in Tapioca From 499d1343bdee83dd5b4a188322954dc85d927f4b Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Fri, 11 Oct 2024 09:24:06 -0400 Subject: [PATCH 3/3] Fix breaking change for indexing enhancements --- .../ruby_lsp_rails/indexing_enhancement.rb | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb b/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb index f50c521b..1cfa301f 100644 --- a/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb +++ b/lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb @@ -13,9 +13,13 @@ class IndexingEnhancement owner: T.nilable(RubyIndexer::Entry::Namespace), node: Prism::CallNode, file_path: String, + code_units_cache: T.any( + T.proc.params(arg0: Integer).returns(Integer), + Prism::CodeUnitsCache, + ), ).void end - def on_call_node(index, owner, node, file_path) + def on_call_node(index, owner, node, file_path, code_units_cache) return unless owner name = node.name @@ -24,7 +28,7 @@ def on_call_node(index, owner, node, file_path) when :extend handle_concern_extend(index, owner, node) when :has_one, :has_many, :belongs_to, :has_and_belongs_to_many - handle_association(index, owner, node, file_path) + handle_association(index, owner, node, file_path, code_units_cache) end end @@ -36,9 +40,13 @@ def on_call_node(index, owner, node, file_path) owner: RubyIndexer::Entry::Namespace, node: Prism::CallNode, file_path: String, + code_units_cache: T.any( + T.proc.params(arg0: Integer).returns(Integer), + Prism::CodeUnitsCache, + ), ).void end - def handle_association(index, owner, node, file_path) + def handle_association(index, owner, node, file_path, code_units_cache) arguments = node.arguments&.arguments return unless arguments @@ -53,14 +61,15 @@ def handle_association(index, owner, node, file_path) return unless name + loc = RubyIndexer::Location.from_prism_location(name_arg.location, code_units_cache) + # Reader index.add(RubyIndexer::Entry::Method.new( name, file_path, - name_arg.location, - name_arg.location, + loc, + loc, nil, - index.configuration.encoding, [RubyIndexer::Entry::Signature.new([])], RubyIndexer::Entry::Visibility::PUBLIC, owner, @@ -70,10 +79,9 @@ def handle_association(index, owner, node, file_path) index.add(RubyIndexer::Entry::Method.new( "#{name}=", file_path, - name_arg.location, - name_arg.location, + loc, + loc, nil, - index.configuration.encoding, [RubyIndexer::Entry::Signature.new([RubyIndexer::Entry::RequiredParameter.new(name: name.to_sym)])], RubyIndexer::Entry::Visibility::PUBLIC, owner,