diff --git a/Gemfile.lock b/Gemfile.lock index 56c04c6..3a7910e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: ruby-lsp-rspec (0.1.15) - ruby-lsp (~> 0.19.0) + ruby-lsp (~> 0.20.1) GEM remote: https://rubygems.org/ @@ -25,13 +25,13 @@ GEM parser (3.3.5.0) ast (~> 2.4.1) racc - prism (1.1.0) + prism (1.2.0) psych (5.1.2) stringio racc (1.8.1) rainbow (3.1.1) rake (13.2.1) - rbi (0.2.0) + rbi (0.2.1) prism (~> 1.0) sorbet-runtime (>= 0.5.9204) rbs (3.6.1) @@ -50,11 +50,11 @@ GEM rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.1) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-support (3.13.1) - rubocop (1.66.1) + rubocop (1.67.0) json (~> 2.3) language_server-protocol (>= 3.17.0) parallel (~> 1.10) @@ -70,29 +70,29 @@ GEM rubocop (~> 1.0) rubocop-shopify (2.15.1) rubocop (~> 1.51) - rubocop-sorbet (0.8.5) + rubocop-sorbet (0.8.6) rubocop (>= 1) - ruby-lsp (0.19.0) + ruby-lsp (0.20.1) 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) - sorbet (0.5.11581) - sorbet-static (= 0.5.11581) - sorbet-runtime (0.5.11581) - sorbet-static (0.5.11581-universal-darwin) - sorbet-static (0.5.11581-x86_64-linux) - sorbet-static-and-runtime (0.5.11581) - sorbet (= 0.5.11581) - sorbet-runtime (= 0.5.11581) - spoom (1.4.2) + sorbet (0.5.11604) + sorbet-static (= 0.5.11604) + sorbet-runtime (0.5.11604) + sorbet-static (0.5.11604-universal-darwin) + sorbet-static (0.5.11604-x86_64-linux) + sorbet-static-and-runtime (0.5.11604) + sorbet (= 0.5.11604) + sorbet-runtime (= 0.5.11604) + spoom (1.5.0) erubi (>= 1.10.0) prism (>= 0.28.0) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) stringio (3.1.1) - tapioca (0.16.2) + tapioca (0.16.3) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) diff --git a/lib/ruby_lsp/ruby_lsp_rspec/indexing_enhancement.rb b/lib/ruby_lsp/ruby_lsp_rspec/indexing_enhancement.rb index 8d86b40..29fefc4 100644 --- a/lib/ruby_lsp/ruby_lsp_rspec/indexing_enhancement.rb +++ b/lib/ruby_lsp/ruby_lsp_rspec/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 if node.receiver name = node.name @@ -44,10 +48,9 @@ def on_call_node(index, owner, node, file_path) index.add(RubyIndexer::Entry::Method.new( method_name, file_path, - block_node.location, - block_node.location, + RubyIndexer::Location.from_prism_location(block_node.location, code_units_cache), + RubyIndexer::Location.from_prism_location(block_node.location, code_units_cache), nil, - index.configuration.encoding, [RubyIndexer::Entry::Signature.new([])], RubyIndexer::Entry::Visibility::PUBLIC, owner, @@ -78,10 +81,9 @@ def on_call_node(index, owner, node, file_path) index.add(RubyIndexer::Entry::Method.new( method_name, file_path, - block_node.location, - block_node.location, + RubyIndexer::Location.from_prism_location(block_node.location, code_units_cache), + RubyIndexer::Location.from_prism_location(block_node.location, code_units_cache), nil, - index.configuration.encoding, [RubyIndexer::Entry::Signature.new([])], RubyIndexer::Entry::Visibility::PUBLIC, owner, diff --git a/ruby-lsp-rspec.gemspec b/ruby-lsp-rspec.gemspec index 922e933..11dce4a 100644 --- a/ruby-lsp-rspec.gemspec +++ b/ruby-lsp-rspec.gemspec @@ -41,5 +41,5 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.add_dependency "ruby-lsp", "~> 0.19.0" + spec.add_dependency "ruby-lsp", "~> 0.20.1" end diff --git a/sorbet/rbi/gems/prism@1.1.0.rbi b/sorbet/rbi/gems/prism@1.2.0.rbi similarity index 86% rename from sorbet/rbi/gems/prism@1.1.0.rbi rename to sorbet/rbi/gems/prism@1.2.0.rbi index 79d789e..24560b1 100644 --- a/sorbet/rbi/gems/prism@1.1.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 # 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,6 +343,17 @@ 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 @@ -305,37 +365,53 @@ class Prism::AliasMethodNode < ::Prism::Node # 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]) } @@ -350,11 +426,13 @@ class Prism::AliasMethodNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#405 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism/lib/prism/node.rb#398 + sig { returns(Prism::Location) } def keyword_loc; end # Represents the new name of the method that will be aliased. @@ -369,6 +447,7 @@ class Prism::AliasMethodNode < ::Prism::Node # ^^^^^^^^^ # # source://prism/lib/prism/node.rb#383 + sig { returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)) } def new_name; end # Represents the old name of the method that will be aliased. @@ -383,6 +462,9 @@ class Prism::AliasMethodNode < ::Prism::Node # ^^^^^^^^^ # # 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`. @@ -411,6 +493,17 @@ class Prism::AlternationPatternNode < ::Prism::Node # @return [AlternationPatternNode] a new instance of AlternationPatternNode # # source://prism/lib/prism/node.rb#440 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, left, right, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -422,37 +515,53 @@ class Prism::AlternationPatternNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#451 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#466 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#461 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AlternationPatternNode # # source://prism/lib/prism/node.rb#471 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AlternationPatternNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # # source://prism/lib/prism/node.rb#479 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -470,11 +579,13 @@ class Prism::AlternationPatternNode < ::Prism::Node # ^^^ # # source://prism/lib/prism/node.rb#487 + sig { returns(Prism::Node) } def left; end # def operator: () -> String # # source://prism/lib/prism/node.rb#506 + sig { returns(String) } def operator; end # Represents the alternation operator location. @@ -483,6 +594,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # ^ # # source://prism/lib/prism/node.rb#499 + sig { returns(Prism::Location) } def operator_loc; end # Represents the right side of the expression. @@ -491,6 +603,7 @@ class Prism::AlternationPatternNode < ::Prism::Node # ^^^ # # 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`. @@ -519,6 +632,17 @@ class Prism::AndNode < ::Prism::Node # @return [AndNode] a new instance of AndNode # # source://prism/lib/prism/node.rb#541 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, left, right, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -530,37 +654,53 @@ class Prism::AndNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#552 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#557 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#567 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#562 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> AndNode # # source://prism/lib/prism/node.rb#572 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::AndNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#557 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # # source://prism/lib/prism/node.rb#580 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -581,11 +721,13 @@ class Prism::AndNode < ::Prism::Node # ^ # # source://prism/lib/prism/node.rb#591 + sig { returns(Prism::Node) } def left; end # def operator: () -> String # # source://prism/lib/prism/node.rb#613 + sig { returns(String) } def operator; end # The location of the `and` keyword or the `&&` operator. @@ -594,6 +736,7 @@ class Prism::AndNode < ::Prism::Node # ^^^ # # source://prism/lib/prism/node.rb#606 + sig { returns(Prism::Location) } def operator_loc; end # Represents the right side of the expression. @@ -605,6 +748,7 @@ class Prism::AndNode < ::Prism::Node # ^ # # 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`. @@ -987,6 +1131,20 @@ class Prism::ArrayPatternNode < ::Prism::Node # @return [ArrayPatternNode] a new instance of ArrayPatternNode # # source://prism/lib/prism/node.rb#890 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, constant, requireds, rest, posts, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without @@ -998,52 +1156,74 @@ class Prism::ArrayPatternNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#904 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#909 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism/lib/prism/node.rb#985 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism/lib/prism/node.rb#967 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#924 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#914 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant: ConstantReadNode | ConstantPathNode | nil # # source://prism/lib/prism/node.rb#942 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } def constant; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?) -> ArrayPatternNode # # source://prism/lib/prism/node.rb#929 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::ArrayPatternNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#909 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location? } # # source://prism/lib/prism/node.rb#937 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1058,26 +1238,31 @@ class Prism::ArrayPatternNode < ::Prism::Node # def opening: () -> String? # # source://prism/lib/prism/node.rb#980 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism/lib/prism/node.rb#954 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader posts: Array[Prism::node] # # source://prism/lib/prism/node.rb#951 + sig { returns(T::Array[Prism::Node]) } def posts; end # attr_reader requireds: Array[Prism::node] # # source://prism/lib/prism/node.rb#945 + sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader rest: Prism::node? # # source://prism/lib/prism/node.rb#948 + sig { returns(T.nilable(Prism::Node)) } def rest; end # Return a symbol representation of this node type. See `Node#type`. @@ -1106,6 +1291,17 @@ class Prism::AssocNode < ::Prism::Node # @return [AssocNode] a new instance of AssocNode # # source://prism/lib/prism/node.rb#1025 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, key, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -1117,37 +1313,53 @@ class Prism::AssocNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#1036 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1041 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#1051 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#1046 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?) -> AssocNode # # source://prism/lib/prism/node.rb#1056 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + operator_loc: T.nilable(Prism::Location) + ).returns(Prism::AssocNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1041 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, key: Prism::node, value: Prism::node, operator_loc: Location? } # # source://prism/lib/prism/node.rb#1064 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1171,11 +1383,13 @@ class Prism::AssocNode < ::Prism::Node # ^^^^^^^^^^ # # source://prism/lib/prism/node.rb#1078 + sig { returns(Prism::Node) } def key; end # def operator: () -> String? # # source://prism/lib/prism/node.rb#1106 + sig { returns(T.nilable(String)) } def operator; end # The location of the `=>` operator, if present. @@ -1184,6 +1398,7 @@ class Prism::AssocNode < ::Prism::Node # ^^ # # 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`. @@ -1201,6 +1416,7 @@ class Prism::AssocNode < ::Prism::Node # ^ # # source://prism/lib/prism/node.rb#1087 + sig { returns(Prism::Node) } def value; end class << self @@ -1223,6 +1439,16 @@ class Prism::AssocSplatNode < ::Prism::Node # @return [AssocSplatNode] a new instance of AssocSplatNode # # source://prism/lib/prism/node.rb#1141 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -1234,37 +1460,52 @@ class Prism::AssocSplatNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#1151 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#1168 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#1161 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node?, ?operator_loc: Location) -> AssocSplatNode # # source://prism/lib/prism/node.rb#1173 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::AssocSplatNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node?, operator_loc: Location } # # source://prism/lib/prism/node.rb#1181 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1279,6 +1520,7 @@ class Prism::AssocSplatNode < ::Prism::Node # def operator: () -> String # # source://prism/lib/prism/node.rb#1202 + sig { returns(String) } def operator; end # The location of the `**` operator. @@ -1287,6 +1529,7 @@ class Prism::AssocSplatNode < ::Prism::Node # ^^ # # 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`. @@ -1301,6 +1544,7 @@ class Prism::AssocSplatNode < ::Prism::Node # ^^^ # # source://prism/lib/prism/node.rb#1189 + sig { returns(T.nilable(Prism::Node)) } def value; end class << self @@ -1328,6 +1572,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode # # source://prism/lib/prism/node.rb#1236 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without @@ -1339,37 +1584,51 @@ class Prism::BackReferenceReadNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#1245 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1250 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#1260 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#1255 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BackReferenceReadNode # # source://prism/lib/prism/node.rb#1265 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::BackReferenceReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1250 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # # source://prism/lib/prism/node.rb#1273 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1388,6 +1647,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # $+ # name `:$+` # # source://prism/lib/prism/node.rb#1282 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. @@ -1445,6 +1705,20 @@ class Prism::BeginNode < ::Prism::Node # @return [BeginNode] a new instance of BeginNode # # source://prism/lib/prism/node.rb#1315 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -1456,67 +1730,92 @@ class Prism::BeginNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#1329 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_keyword: () -> String? # # source://prism/lib/prism/node.rb#1405 + sig { returns(T.nilable(String)) } def begin_keyword; end # attr_reader begin_keyword_loc: Location? # # source://prism/lib/prism/node.rb#1367 + sig { returns(T.nilable(Prism::Location)) } def begin_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1334 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#1349 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#1339 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?) -> BeginNode # # source://prism/lib/prism/node.rb#1354 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::BeginNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), begin_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1334 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location? } # # source://prism/lib/prism/node.rb#1362 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader else_clause: ElseNode? # # source://prism/lib/prism/node.rb#1386 + sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # # source://prism/lib/prism/node.rb#1410 + sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # # source://prism/lib/prism/node.rb#1392 + sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # attr_reader ensure_clause: EnsureNode? # # source://prism/lib/prism/node.rb#1389 + sig { returns(T.nilable(Prism::EnsureNode)) } def ensure_clause; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1534,11 +1833,13 @@ class Prism::BeginNode < ::Prism::Node # attr_reader rescue_clause: RescueNode? # # source://prism/lib/prism/node.rb#1383 + sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end # attr_reader statements: StatementsNode? # # source://prism/lib/prism/node.rb#1380 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. @@ -1567,6 +1868,16 @@ class Prism::BlockArgumentNode < ::Prism::Node # @return [BlockArgumentNode] a new instance of BlockArgumentNode # # source://prism/lib/prism/node.rb#1448 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, expression, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -1578,42 +1889,58 @@ class Prism::BlockArgumentNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#1458 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1463 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#1475 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#1468 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node?, ?operator_loc: Location) -> BlockArgumentNode # # source://prism/lib/prism/node.rb#1480 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + operator_loc: Prism::Location + ).returns(Prism::BlockArgumentNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1463 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node?, operator_loc: Location } # # source://prism/lib/prism/node.rb#1488 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node? # # source://prism/lib/prism/node.rb#1493 + sig { returns(T.nilable(Prism::Node)) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1628,11 +1955,13 @@ class Prism::BlockArgumentNode < ::Prism::Node # def operator: () -> String # # source://prism/lib/prism/node.rb#1503 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#1496 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -1769,6 +2098,19 @@ class Prism::BlockNode < ::Prism::Node # @return [BlockNode] a new instance of BlockNode # # source://prism/lib/prism/node.rb#1616 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, locals, parameters, body, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without @@ -1780,52 +2122,73 @@ class Prism::BlockNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#1629 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # # source://prism/lib/prism/node.rb#1671 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1634 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism/lib/prism/node.rb#1693 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism/lib/prism/node.rb#1681 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#1647 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#1639 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil, ?opening_loc: Location, ?closing_loc: Location) -> BlockNode # # source://prism/lib/prism/node.rb#1652 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::BlockNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1634 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil, opening_loc: Location, closing_loc: Location } # # source://prism/lib/prism/node.rb#1660 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -1840,21 +2203,25 @@ class Prism::BlockNode < ::Prism::Node # attr_reader locals: Array[Symbol] # # source://prism/lib/prism/node.rb#1665 + sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # # source://prism/lib/prism/node.rb#1688 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism/lib/prism/node.rb#1674 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil # # source://prism/lib/prism/node.rb#1668 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end # Return a symbol representation of this node type. See `Node#type`. @@ -2026,6 +2393,18 @@ class Prism::BlockParametersNode < ::Prism::Node # @return [BlockParametersNode] a new instance of BlockParametersNode # # source://prism/lib/prism/node.rb#1844 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, parameters, locals, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without @@ -2037,47 +2416,66 @@ class Prism::BlockParametersNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#1856 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1861 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism/lib/prism/node.rb#1929 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism/lib/prism/node.rb#1911 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#1874 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#1866 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?) -> BlockParametersNode # # source://prism/lib/prism/node.rb#1879 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::BlockParametersNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1861 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location? } # # source://prism/lib/prism/node.rb#1887 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -2092,21 +2490,25 @@ class Prism::BlockParametersNode < ::Prism::Node # attr_reader locals: Array[BlockLocalVariableNode] # # source://prism/lib/prism/node.rb#1895 + sig { returns(T::Array[Prism::BlockLocalVariableNode]) } def locals; end # def opening: () -> String? # # source://prism/lib/prism/node.rb#1924 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism/lib/prism/node.rb#1898 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parameters: ParametersNode? # # source://prism/lib/prism/node.rb#1892 + sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # Return a symbol representation of this node type. See `Node#type`. @@ -2135,6 +2537,16 @@ class Prism::BreakNode < ::Prism::Node # @return [BreakNode] a new instance of BreakNode # # source://prism/lib/prism/node.rb#1966 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, arguments, keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -2146,6 +2558,7 @@ class Prism::BreakNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#1976 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # The arguments to the break statement, if present. These can be any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). @@ -2154,37 +2567,52 @@ class Prism::BreakNode < ::Prism::Node # ^^^ # # source://prism/lib/prism/node.rb#2014 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1981 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#1993 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#1986 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> BreakNode # # source://prism/lib/prism/node.rb#1998 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::BreakNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#1981 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # # source://prism/lib/prism/node.rb#2006 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -2199,6 +2627,7 @@ class Prism::BreakNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#2027 + sig { returns(String) } def keyword; end # The location of the `break` keyword. @@ -2207,6 +2636,7 @@ class Prism::BreakNode < ::Prism::Node # ^^^^^ # # 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`. @@ -3334,6 +3764,17 @@ class Prism::CapturePatternNode < ::Prism::Node # @return [CapturePatternNode] a new instance of CapturePatternNode # # source://prism/lib/prism/node.rb#2911 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, value, target, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -3345,37 +3786,53 @@ class Prism::CapturePatternNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#2922 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#2927 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#2937 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#2932 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: LocalVariableTargetNode, ?operator_loc: Location) -> CapturePatternNode # # source://prism/lib/prism/node.rb#2942 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location + ).returns(Prism::CapturePatternNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#2927 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, target: LocalVariableTargetNode, operator_loc: Location } # # source://prism/lib/prism/node.rb#2950 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -3390,16 +3847,19 @@ class Prism::CapturePatternNode < ::Prism::Node # def operator: () -> String # # source://prism/lib/prism/node.rb#2968 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#2961 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: LocalVariableTargetNode # # source://prism/lib/prism/node.rb#2958 + sig { returns(Prism::LocalVariableTargetNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. @@ -3411,6 +3871,7 @@ class Prism::CapturePatternNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#2955 + sig { returns(Prism::Node) } def value; end class << self @@ -3435,6 +3896,19 @@ class Prism::CaseMatchNode < ::Prism::Node # @return [CaseMatchNode] a new instance of CaseMatchNode # # source://prism/lib/prism/node.rb#3005 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -3446,36 +3920,43 @@ class Prism::CaseMatchNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#3018 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # # source://prism/lib/prism/node.rb#3078 + sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # # source://prism/lib/prism/node.rb#3064 + sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3023 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#3037 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#3028 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[InNode] # # source://prism/lib/prism/node.rb#3058 + sig { returns(T::Array[Prism::InNode]) } def conditions; end # Returns the else clause of the case match node. This method is deprecated @@ -3487,32 +3968,49 @@ class Prism::CaseMatchNode < ::Prism::Node # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[InNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseMatchNode # # source://prism/lib/prism/node.rb#3042 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseMatchNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3023 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[InNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } # # source://prism/lib/prism/node.rb#3050 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader else_clause: ElseNode? # # source://prism/lib/prism/node.rb#3061 + sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String # # source://prism/lib/prism/node.rb#3083 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # # source://prism/lib/prism/node.rb#3071 + sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -3527,6 +4025,7 @@ class Prism::CaseMatchNode < ::Prism::Node # attr_reader predicate: Prism::node? # # source://prism/lib/prism/node.rb#3055 + sig { returns(T.nilable(Prism::Node)) } def predicate; end # Return a symbol representation of this node type. See `Node#type`. @@ -3557,6 +4056,19 @@ class Prism::CaseNode < ::Prism::Node # @return [CaseNode] a new instance of CaseNode # # source://prism/lib/prism/node.rb#3123 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -3568,36 +4080,43 @@ class Prism::CaseNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#3136 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # # source://prism/lib/prism/node.rb#3196 + sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # # source://prism/lib/prism/node.rb#3182 + sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3141 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#3155 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#3146 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[WhenNode] # # source://prism/lib/prism/node.rb#3176 + sig { returns(T::Array[Prism::WhenNode]) } def conditions; end # Returns the else clause of the case node. This method is deprecated in @@ -3609,32 +4128,49 @@ class Prism::CaseNode < ::Prism::Node # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?predicate: Prism::node?, ?conditions: Array[WhenNode], ?else_clause: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location) -> CaseNode # # source://prism/lib/prism/node.rb#3160 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + end_keyword_loc: Prism::Location + ).returns(Prism::CaseNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), predicate: T.unsafe(nil), conditions: T.unsafe(nil), else_clause: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3141 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, predicate: Prism::node?, conditions: Array[WhenNode], else_clause: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location } # # source://prism/lib/prism/node.rb#3168 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader else_clause: ElseNode? # # source://prism/lib/prism/node.rb#3179 + sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String # # source://prism/lib/prism/node.rb#3201 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # # source://prism/lib/prism/node.rb#3189 + sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -3649,6 +4185,7 @@ class Prism::CaseNode < ::Prism::Node # attr_reader predicate: Prism::node? # # source://prism/lib/prism/node.rb#3173 + sig { returns(T.nilable(Prism::Node)) } def predicate; end # Return a symbol representation of this node type. See `Node#type`. @@ -3677,6 +4214,22 @@ class Prism::ClassNode < ::Prism::Node # @return [ClassNode] a new instance of ClassNode # # source://prism/lib/prism/node.rb#3239 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).void + end def initialize(source, node_id, location, flags, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name); end # Implements case-equality for the node. This is effectively == but without @@ -3688,67 +4241,94 @@ class Prism::ClassNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#3255 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # # source://prism/lib/prism/node.rb#3321 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3260 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # # source://prism/lib/prism/node.rb#3334 + sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # # source://prism/lib/prism/node.rb#3295 + sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#3274 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#3265 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode # # source://prism/lib/prism/node.rb#3302 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode)) } def constant_path; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | CallNode, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ClassNode # # source://prism/lib/prism/node.rb#3279 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ClassNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), inheritance_operator_loc: T.unsafe(nil), superclass: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3260 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | CallNode, inheritance_operator_loc: Location?, superclass: Prism::node?, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } # # source://prism/lib/prism/node.rb#3287 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # # source://prism/lib/prism/node.rb#3344 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # # source://prism/lib/prism/node.rb#3324 + sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -3757,11 +4337,13 @@ class Prism::ClassNode < ::Prism::Node # def inheritance_operator: () -> String? # # source://prism/lib/prism/node.rb#3339 + sig { returns(T.nilable(String)) } def inheritance_operator; end # attr_reader inheritance_operator_loc: Location? # # source://prism/lib/prism/node.rb#3305 + sig { returns(T.nilable(Prism::Location)) } def inheritance_operator_loc; end # def inspect -> String @@ -3773,16 +4355,19 @@ class Prism::ClassNode < ::Prism::Node # attr_reader locals: Array[Symbol] # # source://prism/lib/prism/node.rb#3292 + sig { returns(T::Array[Symbol]) } def locals; end # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#3331 + sig { returns(Symbol) } def name; end # attr_reader superclass: Prism::node? # # source://prism/lib/prism/node.rb#3318 + sig { returns(T.nilable(Prism::Node)) } def superclass; end # Return a symbol representation of this node type. See `Node#type`. @@ -3811,6 +4396,18 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode # # source://prism/lib/prism/node.rb#3385 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without @@ -3822,37 +4419,54 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#3397 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3402 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#3412 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#3407 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableAndWriteNode # # source://prism/lib/prism/node.rb#3417 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableAndWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3402 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # # source://prism/lib/prism/node.rb#3425 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#164 @@ -3870,21 +4484,25 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#3430 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#3433 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#3450 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#3440 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -3896,6 +4514,7 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#3447 + sig { returns(Prism::Node) } def value; end class << self @@ -3918,6 +4537,19 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode # # source://prism/lib/prism/node.rb#3486 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without @@ -3929,47 +4561,67 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#3499 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # # source://prism/lib/prism/node.rb#3552 + sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # # source://prism/lib/prism/node.rb#3542 + sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3504 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#3514 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#3509 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ClassVariableOperatorWriteNode # # source://prism/lib/prism/node.rb#3519 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ClassVariableOperatorWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3504 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # # source://prism/lib/prism/node.rb#3527 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#176 @@ -3987,11 +4639,13 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#3532 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#3535 + sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is @@ -4015,6 +4669,7 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#3549 + sig { returns(Prism::Node) } def value; end class << self @@ -4037,6 +4692,18 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode # # source://prism/lib/prism/node.rb#3587 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without @@ -4048,37 +4715,54 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#3599 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3604 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#3614 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#3609 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ClassVariableOrWriteNode # # source://prism/lib/prism/node.rb#3619 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ClassVariableOrWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3604 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # # source://prism/lib/prism/node.rb#3627 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#170 @@ -4096,21 +4780,25 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#3632 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#3635 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#3652 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#3642 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -4122,6 +4810,7 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#3649 + sig { returns(Prism::Node) } def value; end class << self @@ -4144,6 +4833,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode # # source://prism/lib/prism/node.rb#3688 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without @@ -4155,37 +4845,51 @@ class Prism::ClassVariableReadNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#3697 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3702 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#3712 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#3707 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableReadNode # # source://prism/lib/prism/node.rb#3717 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3702 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # # source://prism/lib/prism/node.rb#3725 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4204,6 +4908,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # @@_test # name `:@@_test` # # source://prism/lib/prism/node.rb#3734 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. @@ -4232,6 +4937,7 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode # # source://prism/lib/prism/node.rb#3765 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without @@ -4243,37 +4949,51 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#3774 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3779 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#3789 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#3784 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableTargetNode # # source://prism/lib/prism/node.rb#3794 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ClassVariableTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3779 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # # source://prism/lib/prism/node.rb#3802 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4288,6 +5008,7 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#3807 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. @@ -4316,6 +5037,18 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode # # source://prism/lib/prism/node.rb#3838 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -4327,37 +5060,54 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#3850 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3855 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#3865 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#3860 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ClassVariableWriteNode # # source://prism/lib/prism/node.rb#3870 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ClassVariableWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3855 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # # source://prism/lib/prism/node.rb#3878 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4376,6 +5126,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@_test = :test # name `@@_test` # # source://prism/lib/prism/node.rb#3887 + sig { returns(Symbol) } def name; end # The location of the variable name. @@ -4384,11 +5135,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # ^^^^^ # # source://prism/lib/prism/node.rb#3893 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#3919 + sig { returns(String) } def operator; end # The location of the `=` operator. @@ -4397,6 +5150,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # ^ # # 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`. @@ -4414,6 +5168,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # ^^^ # # source://prism/lib/prism/node.rb#3906 + sig { returns(Prism::Node) } def value; end class << self @@ -4424,10 +5179,63 @@ class Prism::ClassVariableWriteNode < ::Prism::Node 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! @@ -4435,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 @@ -5417,6 +6225,18 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode # # source://prism/lib/prism/node.rb#3955 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without @@ -5428,37 +6248,54 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#3967 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3972 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#3982 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#3977 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantAndWriteNode # # source://prism/lib/prism/node.rb#3987 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantAndWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#3972 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # # source://prism/lib/prism/node.rb#3995 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#182 @@ -5476,21 +6313,25 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#4000 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#4003 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#4020 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#4010 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -5502,6 +6343,7 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#4017 + sig { returns(Prism::Node) } def value; end class << self @@ -5524,6 +6366,19 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode # # source://prism/lib/prism/node.rb#4056 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without @@ -5535,47 +6390,67 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#4069 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # # source://prism/lib/prism/node.rb#4122 + sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # # source://prism/lib/prism/node.rb#4112 + sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4074 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#4084 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#4079 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantOperatorWriteNode # # source://prism/lib/prism/node.rb#4089 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantOperatorWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4074 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # # source://prism/lib/prism/node.rb#4097 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#194 @@ -5593,11 +6468,13 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#4102 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#4105 + sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is @@ -5621,6 +6498,7 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#4119 + sig { returns(Prism::Node) } def value; end class << self @@ -5643,6 +6521,18 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode # # source://prism/lib/prism/node.rb#4157 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without @@ -5654,37 +6544,54 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#4169 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4174 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#4184 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#4179 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> ConstantOrWriteNode # # source://prism/lib/prism/node.rb#4189 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantOrWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4174 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # # source://prism/lib/prism/node.rb#4197 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#188 @@ -5702,21 +6609,25 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#4202 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#4205 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#4222 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#4212 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -5728,6 +6639,7 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#4219 + sig { returns(Prism::Node) } def value; end class << self @@ -5750,6 +6662,17 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode # # source://prism/lib/prism/node.rb#4258 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, target, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without @@ -5761,37 +6684,53 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#4269 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4274 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#4284 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#4279 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathAndWriteNode # # source://prism/lib/prism/node.rb#4289 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathAndWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4274 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # # source://prism/lib/prism/node.rb#4297 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5806,16 +6745,19 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # def operator: () -> String # # source://prism/lib/prism/node.rb#4315 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#4305 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # # source://prism/lib/prism/node.rb#4302 + sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. @@ -5827,6 +6769,7 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#4312 + sig { returns(Prism::Node) } def value; end class << self @@ -5849,6 +6792,18 @@ class Prism::ConstantPathNode < ::Prism::Node # @return [ConstantPathNode] a new instance of ConstantPathNode # # source://prism/lib/prism/node.rb#4350 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end # Implements case-equality for the node. This is effectively == but without @@ -5860,6 +6815,7 @@ class Prism::ConstantPathNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#4362 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # Previously, we had a child node on this class that contained either a @@ -5872,37 +6828,54 @@ class Prism::ConstantPathNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4367 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#4379 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#4372 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathNode # # source://prism/lib/prism/node.rb#4384 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4367 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } # # source://prism/lib/prism/node.rb#4392 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def delimiter: () -> String # # source://prism/lib/prism/node.rb#4438 + sig { returns(String) } def delimiter; end # The location of the `::` delimiter. @@ -5914,6 +6887,7 @@ class Prism::ConstantPathNode < ::Prism::Node # ^^ # # source://prism/lib/prism/node.rb#4418 + sig { returns(Prism::Location) } def delimiter_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5941,6 +6915,7 @@ class Prism::ConstantPathNode < ::Prism::Node # The name of the constant being accessed. This could be `nil` in the event of a syntax error. # # source://prism/lib/prism/node.rb#4409 + sig { returns(T.nilable(Symbol)) } def name; end # The location of the name of the constant. @@ -5952,6 +6927,7 @@ class Prism::ConstantPathNode < ::Prism::Node # ^^^ # # 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. @@ -5966,6 +6942,7 @@ class Prism::ConstantPathNode < ::Prism::Node # ^^^ # # 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`. @@ -6011,6 +6988,18 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode # # source://prism/lib/prism/node.rb#4474 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end def initialize(source, node_id, location, flags, target, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without @@ -6022,47 +7011,66 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#4486 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # # source://prism/lib/prism/node.rb#4532 + sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # # source://prism/lib/prism/node.rb#4522 + sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4491 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#4501 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#4496 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> ConstantPathOperatorWriteNode # # source://prism/lib/prism/node.rb#4506 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::ConstantPathOperatorWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4491 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # # source://prism/lib/prism/node.rb#4514 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6089,6 +7097,7 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # attr_reader target: ConstantPathNode # # source://prism/lib/prism/node.rb#4519 + sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. @@ -6100,6 +7109,7 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#4529 + sig { returns(Prism::Node) } def value; end class << self @@ -6122,6 +7132,17 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode # # source://prism/lib/prism/node.rb#4566 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, target, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without @@ -6133,37 +7154,53 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#4577 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4582 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#4592 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#4587 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathOrWriteNode # # source://prism/lib/prism/node.rb#4597 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathOrWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4582 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # # source://prism/lib/prism/node.rb#4605 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6178,16 +7215,19 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # def operator: () -> String # # source://prism/lib/prism/node.rb#4623 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#4613 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # # source://prism/lib/prism/node.rb#4610 + sig { returns(Prism::ConstantPathNode) } def target; end # Return a symbol representation of this node type. See `Node#type`. @@ -6199,6 +7239,7 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#4620 + sig { returns(Prism::Node) } def value; end class << self @@ -6221,6 +7262,18 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode # # source://prism/lib/prism/node.rb#4658 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); end # Implements case-equality for the node. This is effectively == but without @@ -6232,6 +7285,7 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#4670 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # Previously, we had a child node on this class that contained either a @@ -6244,42 +7298,60 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4675 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#4687 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#4680 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location) -> ConstantPathTargetNode # # source://prism/lib/prism/node.rb#4692 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + name_loc: Prism::Location + ).returns(Prism::ConstantPathTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4675 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location } # # source://prism/lib/prism/node.rb#4700 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def delimiter: () -> String # # source://prism/lib/prism/node.rb#4725 + sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # # source://prism/lib/prism/node.rb#4711 + sig { returns(Prism::Location) } def delimiter_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6307,16 +7379,19 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # attr_reader name: Symbol? # # source://prism/lib/prism/node.rb#4708 + sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#4718 + sig { returns(Prism::Location) } def name_loc; end # attr_reader parent: Prism::node? # # source://prism/lib/prism/node.rb#4705 + sig { returns(T.nilable(Prism::Node)) } def parent; end # Return a symbol representation of this node type. See `Node#type`. @@ -6351,6 +7426,17 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode # # source://prism/lib/prism/node.rb#4767 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, target, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without @@ -6362,37 +7448,53 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#4778 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4783 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#4793 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#4788 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathWriteNode # # source://prism/lib/prism/node.rb#4798 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::ConstantPathWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4783 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, target: ConstantPathNode, operator_loc: Location, value: Prism::node } # # source://prism/lib/prism/node.rb#4806 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6407,6 +7509,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # def operator: () -> String # # source://prism/lib/prism/node.rb#4836 + sig { returns(String) } def operator; end # The location of the `=` operator. @@ -6415,6 +7518,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ^ # # source://prism/lib/prism/node.rb#4823 + sig { returns(Prism::Location) } def operator_loc; end # A node representing the constant path being written to. @@ -6426,6 +7530,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ^^^^^ # # 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`. @@ -6440,6 +7545,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ^^^^ # # source://prism/lib/prism/node.rb#4833 + sig { returns(Prism::Node) } def value; end class << self @@ -6462,6 +7568,7 @@ class Prism::ConstantReadNode < ::Prism::Node # @return [ConstantReadNode] a new instance of ConstantReadNode # # source://prism/lib/prism/node.rb#4871 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without @@ -6473,37 +7580,51 @@ class Prism::ConstantReadNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#4880 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4885 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#4895 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#4890 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantReadNode # # source://prism/lib/prism/node.rb#4900 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4885 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # # source://prism/lib/prism/node.rb#4908 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6535,6 +7656,7 @@ class Prism::ConstantReadNode < ::Prism::Node # SOME_CONSTANT # name `:SOME_CONSTANT` # # source://prism/lib/prism/node.rb#4917 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. @@ -6563,6 +7685,7 @@ class Prism::ConstantTargetNode < ::Prism::Node # @return [ConstantTargetNode] a new instance of ConstantTargetNode # # source://prism/lib/prism/node.rb#4948 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without @@ -6574,37 +7697,51 @@ class Prism::ConstantTargetNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#4957 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4962 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#4972 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#4967 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantTargetNode # # source://prism/lib/prism/node.rb#4977 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#4962 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # # source://prism/lib/prism/node.rb#4985 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6632,6 +7769,7 @@ class Prism::ConstantTargetNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#4990 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. @@ -6660,6 +7798,18 @@ class Prism::ConstantWriteNode < ::Prism::Node # @return [ConstantWriteNode] a new instance of ConstantWriteNode # # source://prism/lib/prism/node.rb#5021 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -6671,37 +7821,54 @@ class Prism::ConstantWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#5033 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5038 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#5048 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#5043 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> ConstantWriteNode # # source://prism/lib/prism/node.rb#5053 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::ConstantWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5038 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # # source://prism/lib/prism/node.rb#5061 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6733,6 +7900,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # XYZ = 1 # name `:XYZ` # # source://prism/lib/prism/node.rb#5070 + sig { returns(Symbol) } def name; end # The location of the constant name. @@ -6741,11 +7909,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # ^^^ # # source://prism/lib/prism/node.rb#5076 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#5102 + sig { returns(String) } def operator; end # The location of the `=` operator. @@ -6754,6 +7924,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # ^ # # 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`. @@ -6771,6 +7942,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # ^^^^^^^^^ # # source://prism/lib/prism/node.rb#5089 + sig { returns(Prism::Node) } def value; end class << self @@ -9432,6 +10604,26 @@ class Prism::DefNode < ::Prism::Node # @return [DefNode] a new instance of DefNode # # source://prism/lib/prism/node.rb#5139 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -9443,72 +10635,104 @@ class Prism::DefNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#5159 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # # source://prism/lib/prism/node.rb#5212 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5164 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#5178 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#5169 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: StatementsNode | BeginNode | nil, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?) -> DefNode # # source://prism/lib/prism/node.rb#5183 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::DefNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), receiver: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), locals: T.unsafe(nil), def_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), equal_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5164 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: StatementsNode | BeginNode | nil, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location? } # # source://prism/lib/prism/node.rb#5191 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def def_keyword: () -> String # # source://prism/lib/prism/node.rb#5290 + sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # # source://prism/lib/prism/node.rb#5218 + sig { returns(Prism::Location) } def def_keyword_loc; end # def end_keyword: () -> String? # # source://prism/lib/prism/node.rb#5315 + sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # # source://prism/lib/prism/node.rb#5277 + sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # # source://prism/lib/prism/node.rb#5310 + sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # # source://prism/lib/prism/node.rb#5264 + sig { returns(T.nilable(Prism::Location)) } def equal_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -9523,56 +10747,67 @@ class Prism::DefNode < ::Prism::Node # attr_reader locals: Array[Symbol] # # source://prism/lib/prism/node.rb#5215 + sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # # source://prism/lib/prism/node.rb#5300 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # # source://prism/lib/prism/node.rb#5238 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#5196 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#5199 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # # source://prism/lib/prism/node.rb#5295 + sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # # source://prism/lib/prism/node.rb#5225 + sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # # source://prism/lib/prism/node.rb#5209 + sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # attr_reader receiver: Prism::node? # # source://prism/lib/prism/node.rb#5206 + sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # # source://prism/lib/prism/node.rb#5305 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # # source://prism/lib/prism/node.rb#5251 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -9601,6 +10836,18 @@ class Prism::DefinedNode < ::Prism::Node # @return [DefinedNode] a new instance of DefinedNode # # source://prism/lib/prism/node.rb#5360 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, lparen_loc, value, rparen_loc, keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -9612,37 +10859,54 @@ class Prism::DefinedNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#5372 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5377 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#5387 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#5382 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location) -> DefinedNode # # source://prism/lib/prism/node.rb#5392 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + keyword_loc: Prism::Location + ).returns(Prism::DefinedNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5377 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location } # # source://prism/lib/prism/node.rb#5400 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -9657,31 +10921,37 @@ class Prism::DefinedNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#5451 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism/lib/prism/node.rb#5434 + sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # # source://prism/lib/prism/node.rb#5441 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # # source://prism/lib/prism/node.rb#5405 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # # source://prism/lib/prism/node.rb#5446 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # # source://prism/lib/prism/node.rb#5421 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -9693,6 +10963,7 @@ class Prism::DefinedNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#5418 + sig { returns(Prism::Node) } def value; end class << self @@ -12705,6 +13976,17 @@ class Prism::ElseNode < ::Prism::Node # @return [ElseNode] a new instance of ElseNode # # source://prism/lib/prism/node.rb#5487 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, else_keyword_loc, statements, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -12716,57 +13998,77 @@ class Prism::ElseNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#5498 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5503 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#5515 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#5508 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?) -> ElseNode # # source://prism/lib/prism/node.rb#5520 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::ElseNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5503 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location? } # # source://prism/lib/prism/node.rb#5528 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def else_keyword: () -> String # # source://prism/lib/prism/node.rb#5556 + sig { returns(String) } def else_keyword; end # attr_reader else_keyword_loc: Location # # source://prism/lib/prism/node.rb#5533 + sig { returns(Prism::Location) } def else_keyword_loc; end # def end_keyword: () -> String? # # source://prism/lib/prism/node.rb#5561 + sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # # source://prism/lib/prism/node.rb#5543 + sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -12781,6 +14083,7 @@ class Prism::ElseNode < ::Prism::Node # attr_reader statements: StatementsNode? # # source://prism/lib/prism/node.rb#5540 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. @@ -12800,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 @@ -12812,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 @@ -12829,6 +14132,17 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode # # source://prism/lib/prism/node.rb#5596 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, opening_loc, statements, closing_loc); end # Implements case-equality for the node. This is effectively == but without @@ -12840,47 +14154,65 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#5607 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5612 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism/lib/prism/node.rb#5664 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism/lib/prism/node.rb#5652 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#5624 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#5617 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location) -> EmbeddedStatementsNode # # source://prism/lib/prism/node.rb#5629 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + closing_loc: Prism::Location + ).returns(Prism::EmbeddedStatementsNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5612 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, statements: StatementsNode?, closing_loc: Location } # # source://prism/lib/prism/node.rb#5637 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -12895,16 +14227,19 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # def opening: () -> String # # source://prism/lib/prism/node.rb#5659 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism/lib/prism/node.rb#5642 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # # source://prism/lib/prism/node.rb#5649 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. @@ -12933,6 +14268,16 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode # # source://prism/lib/prism/node.rb#5699 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).void + end def initialize(source, node_id, location, flags, operator_loc, variable); end # Implements case-equality for the node. This is effectively == but without @@ -12944,37 +14289,52 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#5709 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#5724 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#5719 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode) -> EmbeddedVariableNode # # source://prism/lib/prism/node.rb#5729 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) + ).returns(Prism::EmbeddedVariableNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), variable: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5714 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode } # # source://prism/lib/prism/node.rb#5737 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -12989,11 +14349,13 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # def operator: () -> String # # source://prism/lib/prism/node.rb#5752 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#5742 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -13005,6 +14367,9 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # attr_reader variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode # # source://prism/lib/prism/node.rb#5749 + sig do + returns(T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) + end def variable; end class << self @@ -13046,6 +14411,17 @@ class Prism::EnsureNode < ::Prism::Node # @return [EnsureNode] a new instance of EnsureNode # # source://prism/lib/prism/node.rb#5790 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, ensure_keyword_loc, statements, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -13057,57 +14433,77 @@ class Prism::EnsureNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#5801 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5806 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#5818 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#5811 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location) -> EnsureNode # # source://prism/lib/prism/node.rb#5823 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + end_keyword_loc: Prism::Location + ).returns(Prism::EnsureNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5806 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location } # # source://prism/lib/prism/node.rb#5831 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # # source://prism/lib/prism/node.rb#5858 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # # source://prism/lib/prism/node.rb#5846 + sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # # source://prism/lib/prism/node.rb#5853 + sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # # source://prism/lib/prism/node.rb#5836 + sig { returns(Prism::Location) } def ensure_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13122,6 +14518,7 @@ class Prism::EnsureNode < ::Prism::Node # attr_reader statements: StatementsNode? # # source://prism/lib/prism/node.rb#5843 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. @@ -13150,6 +14547,7 @@ class Prism::FalseNode < ::Prism::Node # @return [FalseNode] a new instance of FalseNode # # source://prism/lib/prism/node.rb#5893 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -13161,37 +14559,44 @@ class Prism::FalseNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#5901 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5906 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#5916 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#5911 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> FalseNode # # source://prism/lib/prism/node.rb#5921 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::FalseNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5906 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#5929 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13235,6 +14640,20 @@ class Prism::FindPatternNode < ::Prism::Node # @return [FindPatternNode] a new instance of FindPatternNode # # source://prism/lib/prism/node.rb#5967 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, constant, left, requireds, right, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without @@ -13246,52 +14665,74 @@ class Prism::FindPatternNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#5981 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5986 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism/lib/prism/node.rb#6062 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism/lib/prism/node.rb#6044 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#6001 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#5991 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant: ConstantReadNode | ConstantPathNode | nil # # source://prism/lib/prism/node.rb#6019 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } def constant; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?left: SplatNode, ?requireds: Array[Prism::node], ?right: SplatNode | MissingNode, ?opening_loc: Location?, ?closing_loc: Location?) -> FindPatternNode # # source://prism/lib/prism/node.rb#6006 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::FindPatternNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), left: T.unsafe(nil), requireds: T.unsafe(nil), right: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#5986 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, left: SplatNode, requireds: Array[Prism::node], right: SplatNode | MissingNode, opening_loc: Location?, closing_loc: Location? } # # source://prism/lib/prism/node.rb#6014 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13306,26 +14747,31 @@ class Prism::FindPatternNode < ::Prism::Node # attr_reader left: SplatNode # # source://prism/lib/prism/node.rb#6022 + sig { returns(Prism::SplatNode) } def left; end # def opening: () -> String? # # source://prism/lib/prism/node.rb#6057 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism/lib/prism/node.rb#6031 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader requireds: Array[Prism::node] # # source://prism/lib/prism/node.rb#6025 + sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader right: SplatNode | MissingNode # # source://prism/lib/prism/node.rb#6028 + sig { returns(T.any(Prism::SplatNode, Prism::MissingNode)) } def right; end # Return a symbol representation of this node type. See `Node#type`. @@ -13492,6 +14938,7 @@ class Prism::FloatNode < ::Prism::Node # @return [FloatNode] a new instance of FloatNode # # source://prism/lib/prism/node.rb#6202 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, value: Float).void } def initialize(source, node_id, location, flags, value); end # Implements case-equality for the node. This is effectively == but without @@ -13503,37 +14950,44 @@ class Prism::FloatNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#6211 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6216 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#6226 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#6221 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Float) -> FloatNode # # source://prism/lib/prism/node.rb#6231 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer, value: Float).returns(Prism::FloatNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6216 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float } # # source://prism/lib/prism/node.rb#6239 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13554,6 +15008,7 @@ class Prism::FloatNode < ::Prism::Node # The value of the floating point number as a Float. # # source://prism/lib/prism/node.rb#6244 + sig { returns(Float) } def value; end class << self @@ -13576,6 +15031,21 @@ class Prism::ForNode < ::Prism::Node # @return [ForNode] a new instance of ForNode # # source://prism/lib/prism/node.rb#6275 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -13587,11 +15057,13 @@ class Prism::ForNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#6290 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6295 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # The collection to iterate over. @@ -13600,37 +15072,57 @@ class Prism::ForNode < ::Prism::Node # ^ # # source://prism/lib/prism/node.rb#6336 + sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#6309 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#6300 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location) -> ForNode # # source://prism/lib/prism/node.rb#6314 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + end_keyword_loc: Prism::Location + ).returns(Prism::ForNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), for_keyword_loc: T.unsafe(nil), in_keyword_loc: T.unsafe(nil), do_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6295 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, index: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location } # # source://prism/lib/prism/node.rb#6322 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def do_keyword: () -> String? # # source://prism/lib/prism/node.rb#6403 + sig { returns(T.nilable(String)) } def do_keyword; end # The location of the `do` keyword, if present. @@ -13639,11 +15131,13 @@ class Prism::ForNode < ::Prism::Node # ^^ # # source://prism/lib/prism/node.rb#6370 + sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def end_keyword: () -> String # # source://prism/lib/prism/node.rb#6408 + sig { returns(String) } def end_keyword; end # The location of the `end` keyword. @@ -13652,6 +15146,7 @@ class Prism::ForNode < ::Prism::Node # ^^^ # # source://prism/lib/prism/node.rb#6386 + sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13660,6 +15155,7 @@ class Prism::ForNode < ::Prism::Node # def for_keyword: () -> String # # source://prism/lib/prism/node.rb#6393 + sig { returns(String) } def for_keyword; end # The location of the `for` keyword. @@ -13668,11 +15164,13 @@ class Prism::ForNode < ::Prism::Node # ^^^ # # source://prism/lib/prism/node.rb#6350 + sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # # source://prism/lib/prism/node.rb#6398 + sig { returns(String) } def in_keyword; end # The location of the `in` keyword. @@ -13681,6 +15179,7 @@ class Prism::ForNode < ::Prism::Node # ^^ # # source://prism/lib/prism/node.rb#6360 + sig { returns(Prism::Location) } def in_keyword_loc; end # The index expression for `for` loops. @@ -13689,6 +15188,9 @@ class Prism::ForNode < ::Prism::Node # ^ # # 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 @@ -13705,6 +15207,7 @@ class Prism::ForNode < ::Prism::Node # end # # source://prism/lib/prism/node.rb#6344 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. @@ -13735,6 +15238,7 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode # # source://prism/lib/prism/node.rb#6449 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -13746,37 +15250,44 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#6457 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6462 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#6472 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#6467 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingArgumentsNode # # source://prism/lib/prism/node.rb#6477 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingArgumentsNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6462 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#6485 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13815,6 +15326,7 @@ class Prism::ForwardingParameterNode < ::Prism::Node # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode # # source://prism/lib/prism/node.rb#6518 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -13826,37 +15338,44 @@ class Prism::ForwardingParameterNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#6526 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6531 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#6541 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#6536 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingParameterNode # # source://prism/lib/prism/node.rb#6546 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ForwardingParameterNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6531 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#6554 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13894,6 +15413,15 @@ class Prism::ForwardingSuperNode < ::Prism::Node # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode # # source://prism/lib/prism/node.rb#6586 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).void + end def initialize(source, node_id, location, flags, block); end # Implements case-equality for the node. This is effectively == but without @@ -13905,42 +15433,57 @@ class Prism::ForwardingSuperNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#6595 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockNode? # # source://prism/lib/prism/node.rb#6630 + sig { returns(T.nilable(Prism::BlockNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6600 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#6612 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#6605 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?block: BlockNode?) -> ForwardingSuperNode # # source://prism/lib/prism/node.rb#6617 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).returns(Prism::ForwardingSuperNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), block: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6600 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? } # # source://prism/lib/prism/node.rb#6625 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -13978,6 +15521,18 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode # # source://prism/lib/prism/node.rb#6661 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without @@ -13989,37 +15544,54 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#6673 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6678 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#6688 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#6683 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableAndWriteNode # # source://prism/lib/prism/node.rb#6693 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableAndWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6678 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # # source://prism/lib/prism/node.rb#6701 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#200 @@ -14037,21 +15609,25 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#6706 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#6709 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#6726 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#6716 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -14063,6 +15639,7 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#6723 + sig { returns(Prism::Node) } def value; end class << self @@ -14085,6 +15662,19 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode # # source://prism/lib/prism/node.rb#6762 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without @@ -14096,47 +15686,67 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#6775 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # # source://prism/lib/prism/node.rb#6828 + sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # # source://prism/lib/prism/node.rb#6818 + sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6780 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#6790 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#6785 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> GlobalVariableOperatorWriteNode # # source://prism/lib/prism/node.rb#6795 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::GlobalVariableOperatorWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6780 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # # source://prism/lib/prism/node.rb#6803 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#212 @@ -14154,11 +15764,13 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#6808 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#6811 + sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is @@ -14182,6 +15794,7 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#6825 + sig { returns(Prism::Node) } def value; end class << self @@ -14204,6 +15817,18 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode # # source://prism/lib/prism/node.rb#6863 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without @@ -14215,37 +15840,54 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#6875 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6880 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#6890 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#6885 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> GlobalVariableOrWriteNode # # source://prism/lib/prism/node.rb#6895 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::GlobalVariableOrWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6880 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # # source://prism/lib/prism/node.rb#6903 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#206 @@ -14263,21 +15905,25 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#6908 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#6911 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#6928 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#6918 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -14289,6 +15935,7 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#6925 + sig { returns(Prism::Node) } def value; end class << self @@ -14311,6 +15958,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode # # source://prism/lib/prism/node.rb#6964 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without @@ -14322,37 +15970,51 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#6973 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6978 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#6988 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#6983 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableReadNode # # source://prism/lib/prism/node.rb#6993 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#6978 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # # source://prism/lib/prism/node.rb#7001 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14371,6 +16033,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # $_Test # name `:$_Test` # # source://prism/lib/prism/node.rb#7010 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. @@ -14399,6 +16062,7 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode # # source://prism/lib/prism/node.rb#7041 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without @@ -14410,37 +16074,51 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#7050 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7055 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#7065 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#7060 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableTargetNode # # source://prism/lib/prism/node.rb#7070 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::GlobalVariableTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7055 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # # source://prism/lib/prism/node.rb#7078 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14455,6 +16133,7 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#7083 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. @@ -14483,6 +16162,18 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode # # source://prism/lib/prism/node.rb#7114 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -14494,37 +16185,54 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#7126 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7131 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#7141 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#7136 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> GlobalVariableWriteNode # # source://prism/lib/prism/node.rb#7146 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::GlobalVariableWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7131 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # # source://prism/lib/prism/node.rb#7154 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14543,6 +16251,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $_Test = 123 # name `:$_Test` # # source://prism/lib/prism/node.rb#7163 + sig { returns(Symbol) } def name; end # The location of the global variable's name. @@ -14551,11 +16260,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # ^^^^ # # source://prism/lib/prism/node.rb#7169 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#7195 + sig { returns(String) } def operator; end # The location of the `=` operator. @@ -14564,6 +16275,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # ^ # # 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`. @@ -14581,6 +16293,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # ^^^ # # source://prism/lib/prism/node.rb#7182 + sig { returns(Prism::Node) } def value; end class << self @@ -14603,6 +16316,17 @@ class Prism::HashNode < ::Prism::Node # @return [HashNode] a new instance of HashNode # # source://prism/lib/prism/node.rb#7231 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, opening_loc, elements, closing_loc); end # Implements case-equality for the node. This is effectively == but without @@ -14614,16 +16338,19 @@ class Prism::HashNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#7242 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7247 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism/lib/prism/node.rb#7309 + sig { returns(String) } def closing; end # The location of the closing brace. @@ -14632,32 +16359,47 @@ class Prism::HashNode < ::Prism::Node # ^ # # source://prism/lib/prism/node.rb#7297 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#7257 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#7252 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location) -> HashNode # # source://prism/lib/prism/node.rb#7262 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + closing_loc: Prism::Location + ).returns(Prism::HashNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7247 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location } # # source://prism/lib/prism/node.rb#7270 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The elements of the hash. These can be either `AssocNode`s or `AssocSplatNode`s. @@ -14669,6 +16411,7 @@ class Prism::HashNode < ::Prism::Node # ^^^^^ # # 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]) } @@ -14683,6 +16426,7 @@ class Prism::HashNode < ::Prism::Node # def opening: () -> String # # source://prism/lib/prism/node.rb#7304 + sig { returns(String) } def opening; end # The location of the opening brace. @@ -14691,6 +16435,7 @@ class Prism::HashNode < ::Prism::Node # ^ # # 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`. @@ -14722,6 +16467,19 @@ class Prism::HashPatternNode < ::Prism::Node # @return [HashPatternNode] a new instance of HashPatternNode # # source://prism/lib/prism/node.rb#7348 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, constant, elements, rest, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without @@ -14733,57 +16491,79 @@ class Prism::HashPatternNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#7361 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7366 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism/lib/prism/node.rb#7438 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism/lib/prism/node.rb#7420 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#7380 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#7371 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant: ConstantReadNode | ConstantPathNode | nil # # source://prism/lib/prism/node.rb#7398 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } def constant; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?constant: ConstantReadNode | ConstantPathNode | nil, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?) -> HashPatternNode # # source://prism/lib/prism/node.rb#7385 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + elements: T::Array[Prism::AssocNode], + rest: T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode)), + opening_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::HashPatternNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7366 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, constant: ConstantReadNode | ConstantPathNode | nil, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location? } # # source://prism/lib/prism/node.rb#7393 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader elements: Array[AssocNode] # # source://prism/lib/prism/node.rb#7401 + sig { returns(T::Array[Prism::AssocNode]) } def elements; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14798,16 +16578,19 @@ class Prism::HashPatternNode < ::Prism::Node # def opening: () -> String? # # source://prism/lib/prism/node.rb#7433 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism/lib/prism/node.rb#7407 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil # # source://prism/lib/prism/node.rb#7404 + sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } def rest; end # Return a symbol representation of this node type. See `Node#type`. @@ -14852,6 +16635,20 @@ class Prism::IfNode < ::Prism::Node # @return [IfNode] a new instance of IfNode # # source://prism/lib/prism/node.rb#7482 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, if_keyword_loc, predicate, then_keyword_loc, statements, subsequent, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -14863,21 +16660,25 @@ class Prism::IfNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#7496 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7501 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#7515 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#7506 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns the subsequent if/elsif/else clause of the if node. This method is @@ -14889,22 +16690,38 @@ 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#7520 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::IfNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7501 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, subsequent: ElseNode | IfNode | nil, end_keyword_loc: Location? } # # source://prism/lib/prism/node.rb#7528 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String? # # source://prism/lib/prism/node.rb#7637 + sig { returns(T.nilable(String)) } def end_keyword; end # The location of the `end` keyword if present, `nil` otherwise. @@ -14915,6 +16732,7 @@ class Prism::IfNode < ::Prism::Node # ^^^ # # 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]) } @@ -14923,6 +16741,7 @@ class Prism::IfNode < ::Prism::Node # def if_keyword: () -> String? # # source://prism/lib/prism/node.rb#7627 + sig { returns(T.nilable(String)) } def if_keyword; end # The location of the `if` keyword if present. @@ -14933,6 +16752,7 @@ 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#7538 + sig { returns(T.nilable(Prism::Location)) } def if_keyword_loc; end # def inspect -> String @@ -14958,6 +16778,7 @@ class Prism::IfNode < ::Prism::Node # ^^^ # # 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. @@ -14970,6 +16791,7 @@ class Prism::IfNode < ::Prism::Node # end # # source://prism/lib/prism/node.rb#7591 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. @@ -14987,11 +16809,13 @@ class Prism::IfNode < ::Prism::Node # ^^^^^^^^^^^^ # # source://prism/lib/prism/node.rb#7606 + sig { returns(T.nilable(T.any(Prism::ElseNode, Prism::IfNode))) } def subsequent; end # def then_keyword: () -> String? # # source://prism/lib/prism/node.rb#7632 + sig { returns(T.nilable(String)) } def then_keyword; end # The location of the `then` keyword (if present) or the `?` in a ternary expression, `nil` otherwise. @@ -15003,6 +16827,7 @@ class Prism::IfNode < ::Prism::Node # ^ # # 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`. @@ -15031,6 +16856,15 @@ class Prism::ImaginaryNode < ::Prism::Node # @return [ImaginaryNode] a new instance of ImaginaryNode # # source://prism/lib/prism/node.rb#7675 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).void + end def initialize(source, node_id, location, flags, numeric); end # Implements case-equality for the node. This is effectively == but without @@ -15042,37 +16876,51 @@ class Prism::ImaginaryNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#7684 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7689 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#7699 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#7694 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numeric: FloatNode | IntegerNode | RationalNode) -> ImaginaryNode # # source://prism/lib/prism/node.rb#7704 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) + ).returns(Prism::ImaginaryNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7689 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode } # # source://prism/lib/prism/node.rb#7712 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15087,6 +16935,7 @@ class Prism::ImaginaryNode < ::Prism::Node # attr_reader numeric: FloatNode | IntegerNode | RationalNode # # source://prism/lib/prism/node.rb#7717 + sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } def numeric; end # Return a symbol representation of this node type. See `Node#type`. @@ -15127,6 +16976,15 @@ class Prism::ImplicitNode < ::Prism::Node # @return [ImplicitNode] a new instance of ImplicitNode # # source://prism/lib/prism/node.rb#7754 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).void + end def initialize(source, node_id, location, flags, value); end # Implements case-equality for the node. This is effectively == but without @@ -15138,37 +16996,51 @@ class Prism::ImplicitNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#7763 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7768 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#7778 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#7773 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode) -> ImplicitNode # # source://prism/lib/prism/node.rb#7783 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).returns(Prism::ImplicitNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7768 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode } # # source://prism/lib/prism/node.rb#7791 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15189,6 +17061,9 @@ class Prism::ImplicitNode < ::Prism::Node # attr_reader value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode # # source://prism/lib/prism/node.rb#7796 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode)) + end def value; end class << self @@ -15220,6 +17095,7 @@ class Prism::ImplicitRestNode < ::Prism::Node # @return [ImplicitRestNode] a new instance of ImplicitRestNode # # source://prism/lib/prism/node.rb#7836 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -15231,37 +17107,44 @@ class Prism::ImplicitRestNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#7844 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7849 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#7859 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#7854 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ImplicitRestNode # # source://prism/lib/prism/node.rb#7864 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ImplicitRestNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7849 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#7872 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15299,6 +17182,18 @@ class Prism::InNode < ::Prism::Node # @return [InNode] a new instance of InNode # # source://prism/lib/prism/node.rb#7904 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, pattern, statements, in_loc, then_loc); end # Implements case-equality for the node. This is effectively == but without @@ -15310,37 +17205,54 @@ class Prism::InNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#7916 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#7934 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#7926 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?) -> InNode # # source://prism/lib/prism/node.rb#7939 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + then_loc: T.nilable(Prism::Location) + ).returns(Prism::InNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#7921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location? } # # source://prism/lib/prism/node.rb#7947 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -15349,11 +17261,13 @@ class Prism::InNode < ::Prism::Node # def in: () -> String # # source://prism/lib/prism/node.rb#7978 + sig { returns(String) } def in; end # attr_reader in_loc: Location # # source://prism/lib/prism/node.rb#7958 + sig { returns(Prism::Location) } def in_loc; end # def inspect -> String @@ -15365,21 +17279,25 @@ class Prism::InNode < ::Prism::Node # attr_reader pattern: Prism::node # # source://prism/lib/prism/node.rb#7952 + sig { returns(Prism::Node) } def pattern; end # attr_reader statements: StatementsNode? # # source://prism/lib/prism/node.rb#7955 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then: () -> String? # # source://prism/lib/prism/node.rb#7983 + sig { returns(T.nilable(String)) } def then; end # attr_reader then_loc: Location? # # source://prism/lib/prism/node.rb#7965 + sig { returns(T.nilable(Prism::Location)) } def then_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -16265,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 @@ -16278,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 @@ -17117,6 +19035,18 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode # # source://prism/lib/prism/node.rb#8691 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without @@ -17128,37 +19058,54 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#8703 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#8708 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#8718 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#8713 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableAndWriteNode # # source://prism/lib/prism/node.rb#8723 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableAndWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#8708 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # # source://prism/lib/prism/node.rb#8731 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#218 @@ -17176,21 +19123,25 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#8736 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#8739 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#8756 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#8746 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -17202,6 +19153,7 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#8753 + sig { returns(Prism::Node) } def value; end class << self @@ -17224,6 +19176,19 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode # # source://prism/lib/prism/node.rb#8792 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).void + end def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); end # Implements case-equality for the node. This is effectively == but without @@ -17235,47 +19200,67 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#8805 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # # source://prism/lib/prism/node.rb#8858 + sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # # source://prism/lib/prism/node.rb#8848 + sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#8810 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#8820 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#8815 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol) -> InstanceVariableOperatorWriteNode # # source://prism/lib/prism/node.rb#8825 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + binary_operator: Symbol + ).returns(Prism::InstanceVariableOperatorWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#8810 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol } # # source://prism/lib/prism/node.rb#8833 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#230 @@ -17293,11 +19278,13 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#8838 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#8841 + sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is @@ -17321,6 +19308,7 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#8855 + sig { returns(Prism::Node) } def value; end class << self @@ -17343,6 +19331,18 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode # # source://prism/lib/prism/node.rb#8893 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, name, name_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without @@ -17354,37 +19354,54 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#8905 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#8910 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#8920 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#8915 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node) -> InstanceVariableOrWriteNode # # source://prism/lib/prism/node.rb#8925 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::InstanceVariableOrWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#8910 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node } # # source://prism/lib/prism/node.rb#8933 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # source://prism/lib/prism/desugar_compiler.rb#224 @@ -17402,21 +19419,25 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#8938 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#8941 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#8958 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#8948 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -17428,6 +19449,7 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#8955 + sig { returns(Prism::Node) } def value; end class << self @@ -17450,6 +19472,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode # # source://prism/lib/prism/node.rb#8994 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without @@ -17461,37 +19484,51 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#9003 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#9008 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#9018 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#9013 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableReadNode # # source://prism/lib/prism/node.rb#9023 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#9008 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # # source://prism/lib/prism/node.rb#9031 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17510,6 +19547,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # @_test # name `:@_test` # # source://prism/lib/prism/node.rb#9040 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. @@ -17538,6 +19576,7 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode # # source://prism/lib/prism/node.rb#9071 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer, name: Symbol).void } def initialize(source, node_id, location, flags, name); end # Implements case-equality for the node. This is effectively == but without @@ -17549,37 +19588,51 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#9080 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#9085 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#9095 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#9090 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableTargetNode # # source://prism/lib/prism/node.rb#9100 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::InstanceVariableTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#9085 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # # source://prism/lib/prism/node.rb#9108 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17594,6 +19647,7 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#9113 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. @@ -17622,6 +19676,18 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode # # source://prism/lib/prism/node.rb#9144 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -17633,37 +19699,54 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#9156 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#9161 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#9171 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#9166 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> InstanceVariableWriteNode # # source://prism/lib/prism/node.rb#9176 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::InstanceVariableWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#9161 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location } # # source://prism/lib/prism/node.rb#9184 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -17682,6 +19765,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_foo = "bar" # name `@_foo` # # source://prism/lib/prism/node.rb#9193 + sig { returns(Symbol) } def name; end # The location of the variable name. @@ -17690,11 +19774,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # ^^^ # # source://prism/lib/prism/node.rb#9199 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#9225 + sig { returns(String) } def operator; end # The location of the `=` operator. @@ -17703,6 +19789,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # ^ # # 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`. @@ -17720,6 +19807,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # ^^^^ # # source://prism/lib/prism/node.rb#9212 + sig { returns(Prism::Node) } def value; end class << self @@ -18544,6 +20632,17 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode # # source://prism/lib/prism/node.rb#9796 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end # Implements case-equality for the node. This is effectively == but without @@ -18555,47 +20654,65 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#9807 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#9812 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # # source://prism/lib/prism/node.rb#9874 + sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # # source://prism/lib/prism/node.rb#9856 + sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#9822 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#9817 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?) -> InterpolatedSymbolNode # # source://prism/lib/prism/node.rb#9827 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: T.nilable(Prism::Location) + ).returns(Prism::InterpolatedSymbolNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#9812 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location? } # # source://prism/lib/prism/node.rb#9835 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18613,16 +20730,19 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # def opening: () -> String? # # source://prism/lib/prism/node.rb#9869 + sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # # source://prism/lib/prism/node.rb#9840 + sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # # source://prism/lib/prism/node.rb#9853 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Return a symbol representation of this node type. See `Node#type`. @@ -18653,6 +20773,17 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode # # source://prism/lib/prism/node.rb#9910 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); end # Implements case-equality for the node. This is effectively == but without @@ -18664,47 +20795,65 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#9921 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#9926 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism/lib/prism/node.rb#9976 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism/lib/prism/node.rb#9964 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#9936 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#9931 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location) -> InterpolatedXStringNode # # source://prism/lib/prism/node.rb#9941 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + closing_loc: Prism::Location + ).returns(Prism::InterpolatedXStringNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#9926 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location } # # source://prism/lib/prism/node.rb#9949 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18725,16 +20874,19 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def opening: () -> String # # source://prism/lib/prism/node.rb#9971 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism/lib/prism/node.rb#9954 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # # source://prism/lib/prism/node.rb#9961 + sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end # Return a symbol representation of this node type. See `Node#type`. @@ -18763,6 +20915,7 @@ class Prism::ItLocalVariableReadNode < ::Prism::Node # @return [ItLocalVariableReadNode] a new instance of ItLocalVariableReadNode # # source://prism/lib/prism/node.rb#10012 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -18774,37 +20927,44 @@ class Prism::ItLocalVariableReadNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#10020 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10025 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#10035 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#10030 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItLocalVariableReadNode # # source://prism/lib/prism/node.rb#10040 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItLocalVariableReadNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10025 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#10048 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18842,6 +21002,7 @@ class Prism::ItParametersNode < ::Prism::Node # @return [ItParametersNode] a new instance of ItParametersNode # # source://prism/lib/prism/node.rb#10080 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -18853,37 +21014,44 @@ class Prism::ItParametersNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#10088 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#10103 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#10098 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItParametersNode # # source://prism/lib/prism/node.rb#10108 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::ItParametersNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10093 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#10116 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -19186,6 +21354,20 @@ class Prism::LambdaNode < ::Prism::Node # @return [LambdaNode] a new instance of LambdaNode # # source://prism/lib/prism/node.rb#10337 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).void + end def initialize(source, node_id, location, flags, locals, operator_loc, opening_loc, closing_loc, parameters, body); end # Implements case-equality for the node. This is effectively == but without @@ -19197,52 +21379,74 @@ class Prism::LambdaNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#10351 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # # source://prism/lib/prism/node.rb#10414 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10356 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism/lib/prism/node.rb#10427 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism/lib/prism/node.rb#10404 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#10369 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#10361 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, ?body: StatementsNode | BeginNode | nil) -> LambdaNode # # source://prism/lib/prism/node.rb#10374 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) + ).returns(Prism::LambdaNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), operator_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10356 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil, body: StatementsNode | BeginNode | nil } # # source://prism/lib/prism/node.rb#10382 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -19257,31 +21461,37 @@ class Prism::LambdaNode < ::Prism::Node # attr_reader locals: Array[Symbol] # # source://prism/lib/prism/node.rb#10387 + sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # # source://prism/lib/prism/node.rb#10422 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism/lib/prism/node.rb#10397 + sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#10417 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#10390 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil # # source://prism/lib/prism/node.rb#10411 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end # Return a symbol representation of this node type. See `Node#type`. @@ -19549,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], @@ -19571,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 @@ -19616,6 +21826,19 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode # # source://prism/lib/prism/node.rb#10466 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).void + end def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end # Implements case-equality for the node. This is effectively == but without @@ -19627,42 +21850,61 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#10479 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10484 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#10494 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#10489 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableAndWriteNode # # source://prism/lib/prism/node.rb#10499 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableAndWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10484 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } # # source://prism/lib/prism/node.rb#10507 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # # source://prism/lib/prism/node.rb#10532 + sig { returns(Integer) } def depth; end # source://prism/lib/prism/desugar_compiler.rb#236 @@ -19680,21 +21922,25 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#10529 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#10512 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#10535 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#10519 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -19706,6 +21952,7 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#10526 + sig { returns(Prism::Node) } def value; end class << self @@ -19728,6 +21975,20 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode # # source://prism/lib/prism/node.rb#10572 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).void + end def initialize(source, node_id, location, flags, name_loc, binary_operator_loc, value, name, binary_operator, depth); end # Implements case-equality for the node. This is effectively == but without @@ -19739,52 +22000,74 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#10586 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # # source://prism/lib/prism/node.rb#10639 + sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # # source://prism/lib/prism/node.rb#10626 + sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10591 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#10601 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#10596 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer) -> LocalVariableOperatorWriteNode # # source://prism/lib/prism/node.rb#10606 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOperatorWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), binary_operator: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10591 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer } # # source://prism/lib/prism/node.rb#10614 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # # source://prism/lib/prism/node.rb#10642 + sig { returns(Integer) } def depth; end # source://prism/lib/prism/desugar_compiler.rb#248 @@ -19802,11 +22085,13 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#10636 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#10619 + sig { returns(Prism::Location) } def name_loc; end # Returns the binary operator used to modify the receiver. This method is @@ -19830,6 +22115,7 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#10633 + sig { returns(Prism::Node) } def value; end class << self @@ -19852,6 +22138,19 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode # # source://prism/lib/prism/node.rb#10678 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).void + end def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); end # Implements case-equality for the node. This is effectively == but without @@ -19863,42 +22162,61 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#10691 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10696 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#10706 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#10701 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer) -> LocalVariableOrWriteNode # # source://prism/lib/prism/node.rb#10711 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableOrWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10696 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer } # # source://prism/lib/prism/node.rb#10719 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # # source://prism/lib/prism/node.rb#10744 + sig { returns(Integer) } def depth; end # source://prism/lib/prism/desugar_compiler.rb#242 @@ -19916,21 +22234,25 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#10741 + sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # # source://prism/lib/prism/node.rb#10724 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#10747 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#10731 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -19942,6 +22264,7 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#10738 + sig { returns(Prism::Node) } def value; end class << self @@ -19964,6 +22287,16 @@ class Prism::LocalVariableReadNode < ::Prism::Node # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode # # source://prism/lib/prism/node.rb#10784 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end def initialize(source, node_id, location, flags, name, depth); end # Implements case-equality for the node. This is effectively == but without @@ -19975,37 +22308,52 @@ class Prism::LocalVariableReadNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#10794 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10799 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#10809 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#10804 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableReadNode # # source://prism/lib/prism/node.rb#10814 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10799 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # # source://prism/lib/prism/node.rb#10822 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The number of visible scopes that should be searched to find the origin of this local variable. @@ -20017,6 +22365,7 @@ 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#10844 + sig { returns(Integer) } def depth; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20039,6 +22388,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # _1 # name `:_1` # # source://prism/lib/prism/node.rb#10835 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. @@ -20067,6 +22417,16 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode # # source://prism/lib/prism/node.rb#10876 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end def initialize(source, node_id, location, flags, name, depth); end # Implements case-equality for the node. This is effectively == but without @@ -20078,42 +22438,58 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#10886 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10891 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#10901 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#10896 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableTargetNode # # source://prism/lib/prism/node.rb#10906 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).returns(Prism::LocalVariableTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10891 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # # source://prism/lib/prism/node.rb#10914 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader depth: Integer # # source://prism/lib/prism/node.rb#10922 + sig { returns(Integer) } def depth; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20128,6 +22504,7 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#10919 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. @@ -20156,6 +22533,19 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode # # source://prism/lib/prism/node.rb#10954 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, name, depth, name_loc, value, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -20167,37 +22557,55 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#10967 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10972 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#10982 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#10977 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location) -> LocalVariableWriteNode # # source://prism/lib/prism/node.rb#10987 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::LocalVariableWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#10972 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location } # # source://prism/lib/prism/node.rb#10995 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The number of semantic scopes we have to traverse to find the declaration of this variable. @@ -20209,6 +22617,7 @@ 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#11013 + sig { returns(Integer) } def depth; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20227,6 +22636,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # abc = 123 # name `:abc` # # source://prism/lib/prism/node.rb#11004 + sig { returns(Symbol) } def name; end # The location of the variable name. @@ -20235,11 +22645,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # ^^^ # # source://prism/lib/prism/node.rb#11019 + sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#11049 + sig { returns(String) } def operator; end # The location of the `=` operator. @@ -20248,6 +22660,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # ^ # # 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`. @@ -20269,6 +22682,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # foo = foo # # source://prism/lib/prism/node.rb#11036 + sig { returns(Prism::Node) } def value; end class << self @@ -20281,20 +22695,20 @@ 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 @@ -20302,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 @@ -20387,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 @@ -20426,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 @@ -20506,7 +22964,7 @@ 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 @@ -20523,49 +22981,49 @@ 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 @@ -20825,6 +23283,17 @@ class Prism::MatchPredicateNode < ::Prism::Node # @return [MatchPredicateNode] a new instance of MatchPredicateNode # # source://prism/lib/prism/node.rb#11257 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, value, pattern, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -20836,37 +23305,53 @@ class Prism::MatchPredicateNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#11268 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11273 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#11283 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#11278 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchPredicateNode # # source://prism/lib/prism/node.rb#11288 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchPredicateNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11273 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } # # source://prism/lib/prism/node.rb#11296 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20881,16 +23366,19 @@ class Prism::MatchPredicateNode < ::Prism::Node # def operator: () -> String # # source://prism/lib/prism/node.rb#11314 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#11307 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # # source://prism/lib/prism/node.rb#11304 + sig { returns(Prism::Node) } def pattern; end # Return a symbol representation of this node type. See `Node#type`. @@ -20902,6 +23390,7 @@ class Prism::MatchPredicateNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#11301 + sig { returns(Prism::Node) } def value; end class << self @@ -20924,6 +23413,17 @@ class Prism::MatchRequiredNode < ::Prism::Node # @return [MatchRequiredNode] a new instance of MatchRequiredNode # # source://prism/lib/prism/node.rb#11349 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, value, pattern, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -20935,37 +23435,53 @@ class Prism::MatchRequiredNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#11360 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11365 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#11375 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#11370 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location) -> MatchRequiredNode # # source://prism/lib/prism/node.rb#11380 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::MatchRequiredNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11365 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node, pattern: Prism::node, operator_loc: Location } # # source://prism/lib/prism/node.rb#11388 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -20980,16 +23496,19 @@ class Prism::MatchRequiredNode < ::Prism::Node # def operator: () -> String # # source://prism/lib/prism/node.rb#11406 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#11399 + sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # # source://prism/lib/prism/node.rb#11396 + sig { returns(Prism::Node) } def pattern; end # Return a symbol representation of this node type. See `Node#type`. @@ -21001,6 +23520,7 @@ class Prism::MatchRequiredNode < ::Prism::Node # attr_reader value: Prism::node # # source://prism/lib/prism/node.rb#11393 + sig { returns(Prism::Node) } def value; end class << self @@ -21023,6 +23543,16 @@ class Prism::MatchWriteNode < ::Prism::Node # @return [MatchWriteNode] a new instance of MatchWriteNode # # source://prism/lib/prism/node.rb#11441 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).void + end def initialize(source, node_id, location, flags, call, targets); end # Implements case-equality for the node. This is effectively == but without @@ -21034,42 +23564,58 @@ class Prism::MatchWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#11451 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader call: CallNode # # source://prism/lib/prism/node.rb#11484 + sig { returns(Prism::CallNode) } def call; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#11466 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#11461 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?call: CallNode, ?targets: Array[LocalVariableTargetNode]) -> MatchWriteNode # # source://prism/lib/prism/node.rb#11471 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + targets: T::Array[Prism::LocalVariableTargetNode] + ).returns(Prism::MatchWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), call: T.unsafe(nil), targets: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11456 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, call: CallNode, targets: Array[LocalVariableTargetNode] } # # source://prism/lib/prism/node.rb#11479 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21084,6 +23630,7 @@ class Prism::MatchWriteNode < ::Prism::Node # attr_reader targets: Array[LocalVariableTargetNode] # # source://prism/lib/prism/node.rb#11487 + sig { returns(T::Array[Prism::LocalVariableTargetNode]) } def targets; end # Return a symbol representation of this node type. See `Node#type`. @@ -21109,6 +23656,7 @@ class Prism::MissingNode < ::Prism::Node # @return [MissingNode] a new instance of MissingNode # # source://prism/lib/prism/node.rb#11517 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -21120,37 +23668,44 @@ class Prism::MissingNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#11525 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11530 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#11540 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#11535 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> MissingNode # # source://prism/lib/prism/node.rb#11545 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::MissingNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11530 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#11553 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21188,6 +23743,20 @@ class Prism::ModuleNode < ::Prism::Node # @return [ModuleNode] a new instance of ModuleNode # # source://prism/lib/prism/node.rb#11585 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).void + end def initialize(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name); end # Implements case-equality for the node. This is effectively == but without @@ -21199,57 +23768,80 @@ class Prism::ModuleNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#11599 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # # source://prism/lib/prism/node.rb#11648 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11604 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#11617 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#11609 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader constant_path: ConstantReadNode | ConstantPathNode | MissingNode # # source://prism/lib/prism/node.rb#11645 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode)) } def constant_path; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: ConstantReadNode | ConstantPathNode | MissingNode, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location, ?name: Symbol) -> ModuleNode # # source://prism/lib/prism/node.rb#11622 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + name: Symbol + ).returns(Prism::ModuleNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), module_keyword_loc: T.unsafe(nil), constant_path: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11604 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], module_keyword_loc: Location, constant_path: ConstantReadNode | ConstantPathNode | MissingNode, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location, name: Symbol } # # source://prism/lib/prism/node.rb#11630 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # # source://prism/lib/prism/node.rb#11666 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # # source://prism/lib/prism/node.rb#11651 + sig { returns(Prism::Location) } def end_keyword_loc; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21264,21 +23856,25 @@ class Prism::ModuleNode < ::Prism::Node # attr_reader locals: Array[Symbol] # # source://prism/lib/prism/node.rb#11635 + sig { returns(T::Array[Symbol]) } def locals; end # def module_keyword: () -> String # # source://prism/lib/prism/node.rb#11661 + sig { returns(String) } def module_keyword; end # attr_reader module_keyword_loc: Location # # source://prism/lib/prism/node.rb#11638 + sig { returns(Prism::Location) } def module_keyword_loc; end # attr_reader name: Symbol # # source://prism/lib/prism/node.rb#11658 + sig { returns(Symbol) } def name; end # Return a symbol representation of this node type. See `Node#type`. @@ -21312,6 +23908,19 @@ class Prism::MultiTargetNode < ::Prism::Node # @return [MultiTargetNode] a new instance of MultiTargetNode # # source://prism/lib/prism/node.rb#11710 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc); end # Implements case-equality for the node. This is effectively == but without @@ -21323,37 +23932,55 @@ class Prism::MultiTargetNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#11723 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11728 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#11742 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#11733 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?) -> MultiTargetNode # # source://prism/lib/prism/node.rb#11747 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::MultiTargetNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11728 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location? } # # source://prism/lib/prism/node.rb#11755 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21376,11 +24003,15 @@ class Prism::MultiTargetNode < ::Prism::Node # ^^^^ # # source://prism/lib/prism/node.rb#11768 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end def lefts; end # def lparen: () -> String? # # source://prism/lib/prism/node.rb#11825 + sig { returns(T.nilable(String)) } def lparen; end # The location of the opening parenthesis. @@ -21389,6 +24020,7 @@ class Prism::MultiTargetNode < ::Prism::Node # ^ # # 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. @@ -21407,6 +24039,7 @@ class Prism::MultiTargetNode < ::Prism::Node # ^ # # 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. @@ -21415,11 +24048,15 @@ class Prism::MultiTargetNode < ::Prism::Node # ^^^^ # # source://prism/lib/prism/node.rb#11790 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::RequiredParameterNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end def rights; end # def rparen: () -> String? # # source://prism/lib/prism/node.rb#11830 + sig { returns(T.nilable(String)) } def rparen; end # The location of the closing parenthesis. @@ -21428,6 +24065,7 @@ class Prism::MultiTargetNode < ::Prism::Node # ^ # # 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`. @@ -21456,6 +24094,21 @@ class Prism::MultiWriteNode < ::Prism::Node # @return [MultiWriteNode] a new instance of MultiWriteNode # # source://prism/lib/prism/node.rb#11869 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).void + end def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value); end # Implements case-equality for the node. This is effectively == but without @@ -21467,37 +24120,57 @@ class Prism::MultiWriteNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#11884 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11889 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#11904 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#11894 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: ImplicitRestNode | SplatNode | nil, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node) -> MultiWriteNode # # source://prism/lib/prism/node.rb#11909 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + value: Prism::Node + ).returns(Prism::MultiWriteNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#11889 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: ImplicitRestNode | SplatNode | nil, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | BackReferenceReadNode | NumberedReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node } # # source://prism/lib/prism/node.rb#11917 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21520,11 +24193,15 @@ class Prism::MultiWriteNode < ::Prism::Node # ^^^^^^^ # # source://prism/lib/prism/node.rb#11930 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end def lefts; end # def lparen: () -> String? # # source://prism/lib/prism/node.rb#12003 + sig { returns(T.nilable(String)) } def lparen; end # The location of the opening parenthesis. @@ -21533,11 +24210,13 @@ class Prism::MultiWriteNode < ::Prism::Node # ^ # # source://prism/lib/prism/node.rb#11958 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#12013 + sig { returns(String) } def operator; end # The location of the operator. @@ -21546,6 +24225,7 @@ class Prism::MultiWriteNode < ::Prism::Node # ^ # # source://prism/lib/prism/node.rb#11990 + sig { returns(Prism::Location) } def operator_loc; end # Represents a splat node in the target expression. @@ -21564,6 +24244,7 @@ class Prism::MultiWriteNode < ::Prism::Node # ^ # # 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. @@ -21572,11 +24253,15 @@ class Prism::MultiWriteNode < ::Prism::Node # ^^^^ # # source://prism/lib/prism/node.rb#11952 + sig do + returns(T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)]) + end def rights; end # def rparen: () -> String? # # source://prism/lib/prism/node.rb#12008 + sig { returns(T.nilable(String)) } def rparen; end # The location of the closing parenthesis. @@ -21585,6 +24270,7 @@ class Prism::MultiWriteNode < ::Prism::Node # ^ # # 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`. @@ -21599,6 +24285,7 @@ class Prism::MultiWriteNode < ::Prism::Node # ^^^^^^^ # # source://prism/lib/prism/node.rb#12000 + sig { returns(Prism::Node) } def value; end class << self @@ -22383,6 +25070,16 @@ class Prism::NextNode < ::Prism::Node # @return [NextNode] a new instance of NextNode # # source://prism/lib/prism/node.rb#12054 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, arguments, keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -22394,42 +25091,58 @@ class Prism::NextNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#12064 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism/lib/prism/node.rb#12099 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12069 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#12081 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#12074 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> NextNode # # source://prism/lib/prism/node.rb#12086 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + keyword_loc: Prism::Location + ).returns(Prism::NextNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12069 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # # source://prism/lib/prism/node.rb#12094 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22444,11 +25157,13 @@ class Prism::NextNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#12109 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism/lib/prism/node.rb#12102 + sig { returns(Prism::Location) } def keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -22477,6 +25192,7 @@ class Prism::NilNode < ::Prism::Node # @return [NilNode] a new instance of NilNode # # source://prism/lib/prism/node.rb#12143 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -22488,37 +25204,44 @@ class Prism::NilNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#12151 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#12166 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#12161 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> NilNode # # source://prism/lib/prism/node.rb#12171 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::NilNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12156 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#12179 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22557,6 +25280,16 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode # # source://prism/lib/prism/node.rb#12212 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, operator_loc, keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -22568,37 +25301,52 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#12222 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12227 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#12237 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#12232 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?keyword_loc: Location) -> NoKeywordsParameterNode # # source://prism/lib/prism/node.rb#12242 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + keyword_loc: Prism::Location + ).returns(Prism::NoKeywordsParameterNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12227 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, keyword_loc: Location } # # source://prism/lib/prism/node.rb#12250 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22613,21 +25361,25 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#12274 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism/lib/prism/node.rb#12262 + sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#12269 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#12255 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -22912,6 +25664,15 @@ class Prism::NumberedParametersNode < ::Prism::Node # @return [NumberedParametersNode] a new instance of NumberedParametersNode # # source://prism/lib/prism/node.rb#12308 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).void + end def initialize(source, node_id, location, flags, maximum); end # Implements case-equality for the node. This is effectively == but without @@ -22923,37 +25684,51 @@ class Prism::NumberedParametersNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#12317 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12322 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#12332 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#12327 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?maximum: Integer) -> NumberedParametersNode # # source://prism/lib/prism/node.rb#12337 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).returns(Prism::NumberedParametersNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), maximum: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12322 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer } # # source://prism/lib/prism/node.rb#12345 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -22968,6 +25743,7 @@ class Prism::NumberedParametersNode < ::Prism::Node # attr_reader maximum: Integer # # source://prism/lib/prism/node.rb#12350 + sig { returns(Integer) } def maximum; end # Return a symbol representation of this node type. See `Node#type`. @@ -22996,6 +25772,15 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode # # source://prism/lib/prism/node.rb#12381 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).void + end def initialize(source, node_id, location, flags, number); end # Implements case-equality for the node. This is effectively == but without @@ -23007,37 +25792,51 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#12390 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12395 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#12405 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#12400 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?number: Integer) -> NumberedReferenceReadNode # # source://prism/lib/prism/node.rb#12410 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).returns(Prism::NumberedReferenceReadNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), number: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12395 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer } # # source://prism/lib/prism/node.rb#12418 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23058,6 +25857,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # $4294967296 # number `0` # # source://prism/lib/prism/node.rb#12429 + sig { returns(Integer) } def number; end # Return a symbol representation of this node type. See `Node#type`. @@ -23366,6 +26166,17 @@ class Prism::OrNode < ::Prism::Node # @return [OrNode] a new instance of OrNode # # source://prism/lib/prism/node.rb#12662 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, left, right, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -23377,37 +26188,53 @@ class Prism::OrNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#12673 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12678 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#12688 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#12683 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?left: Prism::node, ?right: Prism::node, ?operator_loc: Location) -> OrNode # # source://prism/lib/prism/node.rb#12693 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + operator_loc: Prism::Location + ).returns(Prism::OrNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12678 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, left: Prism::node, right: Prism::node, operator_loc: Location } # # source://prism/lib/prism/node.rb#12701 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23428,11 +26255,13 @@ class Prism::OrNode < ::Prism::Node # ^ # # source://prism/lib/prism/node.rb#12712 + sig { returns(Prism::Node) } def left; end # def operator: () -> String # # source://prism/lib/prism/node.rb#12734 + sig { returns(String) } def operator; end # The location of the `or` keyword or the `||` operator. @@ -23441,6 +26270,7 @@ class Prism::OrNode < ::Prism::Node # ^^ # # source://prism/lib/prism/node.rb#12727 + sig { returns(Prism::Location) } def operator_loc; end # Represents the right side of the expression. @@ -23452,6 +26282,7 @@ class Prism::OrNode < ::Prism::Node # ^ # # 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`. @@ -23733,6 +26564,21 @@ class Prism::ParametersNode < ::Prism::Node # @return [ParametersNode] a new instance of ParametersNode # # source://prism/lib/prism/node.rb#12770 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).void + end def initialize(source, node_id, location, flags, requireds, optionals, rest, posts, keywords, keyword_rest, block); end # Implements case-equality for the node. This is effectively == but without @@ -23744,42 +26590,63 @@ class Prism::ParametersNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#12785 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockParameterNode? # # source://prism/lib/prism/node.rb#12844 + sig { returns(T.nilable(Prism::BlockParameterNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12790 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#12808 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#12795 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?requireds: Array[RequiredParameterNode | MultiTargetNode], ?optionals: Array[OptionalParameterNode], ?rest: RestParameterNode | ImplicitRestNode | nil, ?posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], ?keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], ?keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, ?block: BlockParameterNode?) -> ParametersNode # # source://prism/lib/prism/node.rb#12813 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + block: T.nilable(Prism::BlockParameterNode) + ).returns(Prism::ParametersNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), requireds: T.unsafe(nil), optionals: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), block: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12790 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, requireds: Array[RequiredParameterNode | MultiTargetNode], optionals: Array[OptionalParameterNode], rest: RestParameterNode | ImplicitRestNode | nil, posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode], keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode], keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil, block: BlockParameterNode? } # # source://prism/lib/prism/node.rb#12821 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23794,31 +26661,41 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil # # source://prism/lib/prism/node.rb#12841 + sig do + returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) + end def keyword_rest; end # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] # # source://prism/lib/prism/node.rb#12838 + sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } def keywords; end # attr_reader optionals: Array[OptionalParameterNode] # # source://prism/lib/prism/node.rb#12829 + sig { returns(T::Array[Prism::OptionalParameterNode]) } def optionals; end # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] # # source://prism/lib/prism/node.rb#12835 + sig do + returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) + end def posts; end # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] # # source://prism/lib/prism/node.rb#12826 + sig { returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)]) } def requireds; end # attr_reader rest: RestParameterNode | ImplicitRestNode | nil # # source://prism/lib/prism/node.rb#12832 + sig { returns(T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode))) } def rest; end # Mirrors the Method#parameters method. @@ -23853,6 +26730,17 @@ class Prism::ParenthesesNode < ::Prism::Node # @return [ParenthesesNode] a new instance of ParenthesesNode # # source://prism/lib/prism/node.rb#12885 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, body, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without @@ -23864,52 +26752,71 @@ class Prism::ParenthesesNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#12896 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # # source://prism/lib/prism/node.rb#12931 + sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12901 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism/lib/prism/node.rb#12953 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism/lib/prism/node.rb#12941 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#12913 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#12906 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location) -> ParenthesesNode # # source://prism/lib/prism/node.rb#12918 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::ParenthesesNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#12901 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Prism::node?, opening_loc: Location, closing_loc: Location } # # source://prism/lib/prism/node.rb#12926 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -23927,11 +26834,13 @@ class Prism::ParenthesesNode < ::Prism::Node # def opening: () -> String # # source://prism/lib/prism/node.rb#12948 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism/lib/prism/node.rb#12934 + sig { returns(Prism::Location) } def opening_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -23950,63 +26859,63 @@ 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]], @@ -24022,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, @@ -24058,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 @@ -24274,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 @@ -24495,6 +27404,18 @@ class Prism::PinnedExpressionNode < ::Prism::Node # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode # # source://prism/lib/prism/node.rb#12988 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, expression, operator_loc, lparen_loc, rparen_loc); end # Implements case-equality for the node. This is effectively == but without @@ -24506,42 +27427,60 @@ class Prism::PinnedExpressionNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#13000 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#13005 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#13015 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#13010 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location) -> PinnedExpressionNode # # source://prism/lib/prism/node.rb#13020 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + rparen_loc: Prism::Location + ).returns(Prism::PinnedExpressionNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#13005 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location } # # source://prism/lib/prism/node.rb#13028 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node # # source://prism/lib/prism/node.rb#13033 + sig { returns(Prism::Node) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24556,31 +27495,37 @@ class Prism::PinnedExpressionNode < ::Prism::Node # def lparen: () -> String # # source://prism/lib/prism/node.rb#13062 + sig { returns(String) } def lparen; end # attr_reader lparen_loc: Location # # source://prism/lib/prism/node.rb#13043 + sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # # source://prism/lib/prism/node.rb#13057 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#13036 + sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # # source://prism/lib/prism/node.rb#13067 + sig { returns(String) } def rparen; end # attr_reader rparen_loc: Location # # source://prism/lib/prism/node.rb#13050 + sig { returns(Prism::Location) } def rparen_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -24609,6 +27554,16 @@ class Prism::PinnedVariableNode < ::Prism::Node # @return [PinnedVariableNode] a new instance of PinnedVariableNode # # source://prism/lib/prism/node.rb#13103 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, variable, operator_loc); end # Implements case-equality for the node. This is effectively == but without @@ -24620,37 +27575,52 @@ class Prism::PinnedVariableNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#13113 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#13118 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#13128 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#13123 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, ?operator_loc: Location) -> PinnedVariableNode # # source://prism/lib/prism/node.rb#13133 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location + ).returns(Prism::PinnedVariableNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), variable: T.unsafe(nil), operator_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#13118 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode, operator_loc: Location } # # source://prism/lib/prism/node.rb#13141 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24665,11 +27635,13 @@ class Prism::PinnedVariableNode < ::Prism::Node # def operator: () -> String # # source://prism/lib/prism/node.rb#13156 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#13149 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -24681,6 +27653,9 @@ class Prism::PinnedVariableNode < ::Prism::Node # attr_reader variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode # # source://prism/lib/prism/node.rb#13146 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode)) + end def variable; end class << self @@ -24703,6 +27678,18 @@ class Prism::PostExecutionNode < ::Prism::Node # @return [PostExecutionNode] a new instance of PostExecutionNode # # source://prism/lib/prism/node.rb#13190 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without @@ -24714,47 +27701,66 @@ class Prism::PostExecutionNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#13202 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#13207 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism/lib/prism/node.rb#13271 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism/lib/prism/node.rb#13254 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#13219 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#13212 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PostExecutionNode # # source://prism/lib/prism/node.rb#13224 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PostExecutionNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#13207 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } # # source://prism/lib/prism/node.rb#13232 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24769,26 +27775,31 @@ class Prism::PostExecutionNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#13261 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism/lib/prism/node.rb#13240 + sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # # source://prism/lib/prism/node.rb#13266 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism/lib/prism/node.rb#13247 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # # source://prism/lib/prism/node.rb#13237 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. @@ -24817,6 +27828,18 @@ class Prism::PreExecutionNode < ::Prism::Node # @return [PreExecutionNode] a new instance of PreExecutionNode # # source://prism/lib/prism/node.rb#13307 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); end # Implements case-equality for the node. This is effectively == but without @@ -24828,47 +27851,66 @@ class Prism::PreExecutionNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#13319 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#13324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # # source://prism/lib/prism/node.rb#13388 + sig { returns(String) } def closing; end # attr_reader closing_loc: Location # # source://prism/lib/prism/node.rb#13371 + sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#13336 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#13329 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location) -> PreExecutionNode # # source://prism/lib/prism/node.rb#13341 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location + ).returns(Prism::PreExecutionNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#13324 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location } # # source://prism/lib/prism/node.rb#13349 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24883,26 +27925,31 @@ class Prism::PreExecutionNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#13378 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism/lib/prism/node.rb#13357 + sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # # source://prism/lib/prism/node.rb#13383 + sig { returns(String) } def opening; end # attr_reader opening_loc: Location # # source://prism/lib/prism/node.rb#13364 + sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # # source://prism/lib/prism/node.rb#13354 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # Return a symbol representation of this node type. See `Node#type`. @@ -24928,6 +27975,16 @@ class Prism::ProgramNode < ::Prism::Node # @return [ProgramNode] a new instance of ProgramNode # # source://prism/lib/prism/node.rb#13421 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).void + end def initialize(source, node_id, location, flags, locals, statements); end # Implements case-equality for the node. This is effectively == but without @@ -24939,37 +27996,52 @@ class Prism::ProgramNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#13431 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#13436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#13446 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#13441 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?statements: StatementsNode) -> ProgramNode # # source://prism/lib/prism/node.rb#13451 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + statements: Prism::StatementsNode + ).returns(Prism::ProgramNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), statements: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#13436 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], statements: StatementsNode } # # source://prism/lib/prism/node.rb#13459 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -24984,11 +28056,13 @@ class Prism::ProgramNode < ::Prism::Node # attr_reader locals: Array[Symbol] # # source://prism/lib/prism/node.rb#13464 + sig { returns(T::Array[Symbol]) } def locals; end # attr_reader statements: StatementsNode # # source://prism/lib/prism/node.rb#13467 + sig { returns(Prism::StatementsNode) } def statements; end # Return a symbol representation of this node type. See `Node#type`. @@ -25345,6 +28419,7 @@ class Prism::RedoNode < ::Prism::Node # @return [RedoNode] a new instance of RedoNode # # source://prism/lib/prism/node.rb#13720 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -25356,37 +28431,44 @@ class Prism::RedoNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#13728 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#13733 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#13743 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#13738 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RedoNode # # source://prism/lib/prism/node.rb#13748 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RedoNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#13733 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#13756 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -26100,6 +29182,17 @@ class Prism::RescueModifierNode < ::Prism::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 @@ -26111,42 +29204,59 @@ class Prism::RescueModifierNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#14139 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14144 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#14154 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#14149 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node) -> RescueModifierNode # # source://prism/lib/prism/node.rb#14159 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + rescue_expression: Prism::Node + ).returns(Prism::RescueModifierNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14144 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node } # # source://prism/lib/prism/node.rb#14167 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node # # source://prism/lib/prism/node.rb#14172 + sig { returns(Prism::Node) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -26161,11 +29271,13 @@ class Prism::RescueModifierNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#14185 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism/lib/prism/node.rb#14175 + sig { returns(Prism::Location) } def keyword_loc; end # source://prism/lib/prism/parse_result/newlines.rb#115 @@ -26174,6 +29286,7 @@ class Prism::RescueModifierNode < ::Prism::Node # attr_reader rescue_expression: Prism::node # # source://prism/lib/prism/node.rb#14182 + sig { returns(Prism::Node) } def rescue_expression; end # Return a symbol representation of this node type. See `Node#type`. @@ -26198,7 +29311,7 @@ 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#14223 class Prism::RescueNode < ::Prism::Node @@ -26207,6 +29320,20 @@ class Prism::RescueNode < ::Prism::Node # @return [RescueNode] a new instance of RescueNode # # source://prism/lib/prism/node.rb#14225 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).void + end def initialize(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, statements, subsequent); end # Implements case-equality for the node. This is effectively == but without @@ -26218,21 +29345,25 @@ class Prism::RescueNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#14239 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14244 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#14259 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#14249 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns the subsequent rescue clause of the rescue node. This method is @@ -26244,22 +29375,38 @@ class Prism::RescueNode < ::Prism::Node # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode # # source://prism/lib/prism/node.rb#14264 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode)), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(Prism::RescueNode) + ).returns(Prism::RescueNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14244 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil, statements: StatementsNode?, subsequent: RescueNode? } # # source://prism/lib/prism/node.rb#14272 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader exceptions: Array[Prism::node] # # source://prism/lib/prism/node.rb#14284 + sig { returns(T::Array[Prism::Node]) } def exceptions; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -26274,36 +29421,45 @@ class Prism::RescueNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#14309 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism/lib/prism/node.rb#14277 + sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # # source://prism/lib/prism/node.rb#14314 + sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # # source://prism/lib/prism/node.rb#14287 + sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil # # source://prism/lib/prism/node.rb#14300 + sig do + returns(T.nilable(T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::MissingNode))) + end def reference; end # attr_reader statements: StatementsNode? # # source://prism/lib/prism/node.rb#14303 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # attr_reader subsequent: RescueNode? # # source://prism/lib/prism/node.rb#14306 + sig { returns(T.nilable(Prism::RescueNode)) } def subsequent; end # Return a symbol representation of this node type. See `Node#type`. @@ -26463,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], @@ -26482,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 @@ -26492,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 @@ -26519,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 @@ -26540,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 @@ -26563,6 +29729,7 @@ class Prism::RetryNode < ::Prism::Node # @return [RetryNode] a new instance of RetryNode # # source://prism/lib/prism/node.rb#14462 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -26574,37 +29741,44 @@ class Prism::RetryNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#14470 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14475 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#14485 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#14480 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RetryNode # # source://prism/lib/prism/node.rb#14490 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::RetryNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14475 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#14498 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -26642,6 +29816,16 @@ class Prism::ReturnNode < ::Prism::Node # @return [ReturnNode] a new instance of ReturnNode # # source://prism/lib/prism/node.rb#14530 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).void + end def initialize(source, node_id, location, flags, keyword_loc, arguments); end # Implements case-equality for the node. This is effectively == but without @@ -26653,42 +29837,58 @@ class Prism::ReturnNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#14540 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism/lib/prism/node.rb#14582 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14545 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#14557 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#14550 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?) -> ReturnNode # # source://prism/lib/prism/node.rb#14562 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode) + ).returns(Prism::ReturnNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14545 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, arguments: ArgumentsNode? } # # source://prism/lib/prism/node.rb#14570 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -26703,11 +29903,13 @@ class Prism::ReturnNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#14585 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism/lib/prism/node.rb#14575 + sig { returns(Prism::Location) } def keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -26736,6 +29938,7 @@ class Prism::SelfNode < ::Prism::Node # @return [SelfNode] a new instance of SelfNode # # source://prism/lib/prism/node.rb#14619 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -26747,37 +29950,44 @@ class Prism::SelfNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#14627 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14632 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#14642 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#14637 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SelfNode # # source://prism/lib/prism/node.rb#14647 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SelfNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14632 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#14655 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -26816,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#450 + # source://prism/lib/prism/serialize.rb#462 def load_metadata; end - # source://prism/lib/prism/serialize.rb#484 + # source://prism/lib/prism/serialize.rb#496 def load_nodes; end - # source://prism/lib/prism/serialize.rb#498 + # 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#459 + # source://prism/lib/prism/serialize.rb#471 def load_tokens; end - # source://prism/lib/prism/serialize.rb#472 + # 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#584 + # source://prism/lib/prism/serialize.rb#596 def load_constant(index); end - # source://prism/lib/prism/serialize.rb#537 + # source://prism/lib/prism/serialize.rb#549 def load_double; end - # source://prism/lib/prism/serialize.rb#552 + # source://prism/lib/prism/serialize.rb#564 def load_embedded_string; end - # source://prism/lib/prism/serialize.rb#614 + # source://prism/lib/prism/serialize.rb#626 def load_error_level; end - # source://prism/lib/prism/serialize.rb#526 + # source://prism/lib/prism/serialize.rb#538 def load_integer; end - # source://prism/lib/prism/serialize.rb#568 + # source://prism/lib/prism/serialize.rb#580 def load_location; end - # source://prism/lib/prism/serialize.rb#572 + # source://prism/lib/prism/serialize.rb#584 def load_location_object; end - # source://prism/lib/prism/serialize.rb#643 + # source://prism/lib/prism/serialize.rb#655 def load_node; end - # source://prism/lib/prism/serialize.rb#609 + # source://prism/lib/prism/serialize.rb#621 def load_optional_constant; end - # source://prism/lib/prism/serialize.rb#576 + # source://prism/lib/prism/serialize.rb#588 def load_optional_location; end - # source://prism/lib/prism/serialize.rb#580 + # source://prism/lib/prism/serialize.rb#592 def load_optional_location_object; end - # source://prism/lib/prism/serialize.rb#545 + # source://prism/lib/prism/serialize.rb#557 def load_optional_node; end - # source://prism/lib/prism/serialize.rb#605 + # source://prism/lib/prism/serialize.rb#617 def load_required_constant; end - # source://prism/lib/prism/serialize.rb#556 + # source://prism/lib/prism/serialize.rb#568 def load_string; end - # source://prism/lib/prism/serialize.rb#541 + # source://prism/lib/prism/serialize.rb#553 def load_uint32; end - # source://prism/lib/prism/serialize.rb#521 + # 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#507 + # source://prism/lib/prism/serialize.rb#519 def load_varuint; end - # source://prism/lib/prism/serialize.rb#629 + # 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 @@ -26986,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#1725 +# 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. @@ -27155,6 +30365,20 @@ class Prism::SingletonClassNode < ::Prism::Node # @return [SingletonClassNode] a new instance of SingletonClassNode # # source://prism/lib/prism/node.rb#14777 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -27166,67 +30390,92 @@ class Prism::SingletonClassNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#14791 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: StatementsNode | BeginNode | nil # # source://prism/lib/prism/node.rb#14847 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14796 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # # source://prism/lib/prism/node.rb#14857 + sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # # source://prism/lib/prism/node.rb#14830 + sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#14809 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#14801 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: StatementsNode | BeginNode | nil, ?end_keyword_loc: Location) -> SingletonClassNode # # source://prism/lib/prism/node.rb#14814 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location + ).returns(Prism::SingletonClassNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), locals: T.unsafe(nil), class_keyword_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil), body: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14796 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: StatementsNode | BeginNode | nil, end_keyword_loc: Location } # # source://prism/lib/prism/node.rb#14822 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # # source://prism/lib/prism/node.rb#14867 + sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # # source://prism/lib/prism/node.rb#14850 + sig { returns(Prism::Location) } def end_keyword_loc; end # attr_reader expression: Prism::node # # source://prism/lib/prism/node.rb#14844 + sig { returns(Prism::Node) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27241,16 +30490,19 @@ class Prism::SingletonClassNode < ::Prism::Node # attr_reader locals: Array[Symbol] # # source://prism/lib/prism/node.rb#14827 + sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # # source://prism/lib/prism/node.rb#14862 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#14837 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -27277,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 @@ -27307,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 @@ -27380,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 @@ -27406,6 +30675,7 @@ class Prism::SourceEncodingNode < ::Prism::Node # @return [SourceEncodingNode] a new instance of SourceEncodingNode # # source://prism/lib/prism/node.rb#14906 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -27417,37 +30687,44 @@ class Prism::SourceEncodingNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#14914 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14919 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#14929 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#14924 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceEncodingNode # # source://prism/lib/prism/node.rb#14934 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceEncodingNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#14919 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#14942 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27625,6 +30902,7 @@ class Prism::SourceLineNode < ::Prism::Node # @return [SourceLineNode] a new instance of SourceLineNode # # source://prism/lib/prism/node.rb#15068 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -27636,37 +30914,44 @@ class Prism::SourceLineNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#15076 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15081 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#15091 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#15086 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceLineNode # # source://prism/lib/prism/node.rb#15096 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::SourceLineNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15081 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#15104 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27704,6 +30989,16 @@ class Prism::SplatNode < ::Prism::Node # @return [SplatNode] a new instance of SplatNode # # source://prism/lib/prism/node.rb#15136 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).void + end def initialize(source, node_id, location, flags, operator_loc, expression); end # Implements case-equality for the node. This is effectively == but without @@ -27715,42 +31010,58 @@ class Prism::SplatNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#15146 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15151 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#15163 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#15156 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?expression: Prism::node?) -> SplatNode # # source://prism/lib/prism/node.rb#15168 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + expression: T.nilable(Prism::Node) + ).returns(Prism::SplatNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), operator_loc: T.unsafe(nil), expression: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15151 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, expression: Prism::node? } # # source://prism/lib/prism/node.rb#15176 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node? # # source://prism/lib/prism/node.rb#15188 + sig { returns(T.nilable(Prism::Node)) } def expression; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -27765,11 +31076,13 @@ class Prism::SplatNode < ::Prism::Node # def operator: () -> String # # source://prism/lib/prism/node.rb#15191 + sig { returns(String) } def operator; end # attr_reader operator_loc: Location # # source://prism/lib/prism/node.rb#15181 + sig { returns(Prism::Location) } def operator_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -27798,6 +31111,15 @@ class Prism::StatementsNode < ::Prism::Node # @return [StatementsNode] a new instance of StatementsNode # # source://prism/lib/prism/node.rb#15225 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).void + end def initialize(source, node_id, location, flags, body); end # Implements case-equality for the node. This is effectively == but without @@ -27809,42 +31131,57 @@ class Prism::StatementsNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#15234 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Array[Prism::node] # # source://prism/lib/prism/node.rb#15267 + sig { returns(T::Array[Prism::Node]) } def body; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15239 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#15249 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#15244 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Array[Prism::node]) -> StatementsNode # # source://prism/lib/prism/node.rb#15254 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).returns(Prism::StatementsNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), body: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15239 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] } # # source://prism/lib/prism/node.rb#15262 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -28106,6 +31443,19 @@ class Prism::SuperNode < ::Prism::Node # @return [SuperNode] a new instance of SuperNode # # source://prism/lib/prism/node.rb#15456 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).void + end def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc, block); end # Implements case-equality for the node. This is effectively == but without @@ -28117,47 +31467,67 @@ class Prism::SuperNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#15469 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism/lib/prism/node.rb#15525 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # attr_reader block: BlockNode | BlockArgumentNode | nil # # source://prism/lib/prism/node.rb#15541 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15474 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#15487 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#15479 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: BlockNode | BlockArgumentNode | nil) -> SuperNode # # source://prism/lib/prism/node.rb#15492 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) + ).returns(Prism::SuperNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15474 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: BlockNode | BlockArgumentNode | nil } # # source://prism/lib/prism/node.rb#15500 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -28172,31 +31542,37 @@ class Prism::SuperNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#15544 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism/lib/prism/node.rb#15505 + sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # # source://prism/lib/prism/node.rb#15549 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # # source://prism/lib/prism/node.rb#15512 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # # source://prism/lib/prism/node.rb#15554 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # # source://prism/lib/prism/node.rb#15528 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -28412,54 +31788,54 @@ 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 @@ -28467,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 @@ -30905,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 @@ -30932,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. @@ -30944,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 @@ -30952,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. @@ -31534,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. @@ -31606,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 @@ -31631,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 @@ -31643,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 @@ -33587,6 +36963,7 @@ class Prism::TrueNode < ::Prism::Node # @return [TrueNode] a new instance of TrueNode # # source://prism/lib/prism/node.rb#15743 + sig { params(source: Prism::Source, node_id: Integer, location: Prism::Location, flags: Integer).void } def initialize(source, node_id, location, flags); end # Implements case-equality for the node. This is effectively == but without @@ -33598,37 +36975,44 @@ class Prism::TrueNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#15751 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15756 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#15766 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#15761 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> TrueNode # # source://prism/lib/prism/node.rb#15771 + sig { params(node_id: Integer, location: Prism::Location, flags: Integer).returns(Prism::TrueNode) } def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15756 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # # source://prism/lib/prism/node.rb#15779 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -33666,6 +37050,16 @@ class Prism::UndefNode < ::Prism::Node # @return [UndefNode] a new instance of UndefNode # # source://prism/lib/prism/node.rb#15811 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).void + end def initialize(source, node_id, location, flags, names, keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -33677,37 +37071,52 @@ class Prism::UndefNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#15821 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15826 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#15836 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#15831 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location) -> UndefNode # # source://prism/lib/prism/node.rb#15841 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + keyword_loc: Prism::Location + ).returns(Prism::UndefNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), names: T.unsafe(nil), keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15826 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location } # # source://prism/lib/prism/node.rb#15849 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -33722,16 +37131,19 @@ class Prism::UndefNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#15864 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism/lib/prism/node.rb#15857 + sig { returns(Prism::Location) } def keyword_loc; end # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] # # source://prism/lib/prism/node.rb#15854 + sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } def names; end # Return a symbol representation of this node type. See `Node#type`. @@ -33763,6 +37175,20 @@ class Prism::UnlessNode < ::Prism::Node # @return [UnlessNode] a new instance of UnlessNode # # source://prism/lib/prism/node.rb#15902 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, keyword_loc, predicate, then_keyword_loc, statements, else_clause, end_keyword_loc); end # Implements case-equality for the node. This is effectively == but without @@ -33774,21 +37200,25 @@ class Prism::UnlessNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#15916 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#15935 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#15926 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # Returns the else clause of the unless node. This method is deprecated in @@ -33800,17 +37230,32 @@ 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#15940 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).returns(Prism::UnlessNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), else_clause: T.unsafe(nil), end_keyword_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#15921 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, else_clause: ElseNode?, end_keyword_loc: Location? } # # source://prism/lib/prism/node.rb#15948 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # The else clause of the unless expression, if present. @@ -33819,11 +37264,13 @@ class Prism::UnlessNode < ::Prism::Node # ^^^^^^^^ # # source://prism/lib/prism/node.rb#16001 + sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # # source://prism/lib/prism/node.rb#16030 + sig { returns(T.nilable(String)) } def end_keyword; end # The location of the `end` keyword, if present. @@ -33832,6 +37279,7 @@ class Prism::UnlessNode < ::Prism::Node # ^^^ # # 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]) } @@ -33846,6 +37294,7 @@ class Prism::UnlessNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#16020 + sig { returns(String) } def keyword; end # The location of the `unless` keyword. @@ -33857,6 +37306,7 @@ class Prism::UnlessNode < ::Prism::Node # ^^^^^^ # # source://prism/lib/prism/node.rb#15959 + sig { returns(Prism::Location) } def keyword_loc; end # source://prism/lib/prism/parse_result/newlines.rb#97 @@ -33871,6 +37321,7 @@ class Prism::UnlessNode < ::Prism::Node # ^^^^ # # 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 @@ -33880,11 +37331,13 @@ class Prism::UnlessNode < ::Prism::Node # ^^^ # # source://prism/lib/prism/node.rb#15995 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # # source://prism/lib/prism/node.rb#16025 + sig { returns(T.nilable(String)) } def then_keyword; end # The location of the `then` keyword, if present. @@ -33893,6 +37346,7 @@ class Prism::UnlessNode < ::Prism::Node # ^^^^ # # 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`. @@ -35012,6 +38466,18 @@ class Prism::WhenNode < ::Prism::Node # @return [WhenNode] a new instance of WhenNode # # source://prism/lib/prism/node.rb#16194 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).void + end def initialize(source, node_id, location, flags, keyword_loc, conditions, then_keyword_loc, statements); end # Implements case-equality for the node. This is effectively == but without @@ -35023,42 +38489,60 @@ class Prism::WhenNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#16206 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#16211 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#16224 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#16216 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # # source://prism/lib/prism/node.rb#16249 + sig { returns(T::Array[Prism::Node]) } def conditions; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?) -> WhenNode # # source://prism/lib/prism/node.rb#16229 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode) + ).returns(Prism::WhenNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#16211 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode? } # # source://prism/lib/prism/node.rb#16237 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -35073,26 +38557,31 @@ class Prism::WhenNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#16268 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism/lib/prism/node.rb#16242 + sig { returns(Prism::Location) } def keyword_loc; end # attr_reader statements: StatementsNode? # # source://prism/lib/prism/node.rb#16265 + sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # # source://prism/lib/prism/node.rb#16273 + sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # # source://prism/lib/prism/node.rb#16252 + sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end # Return a symbol representation of this node type. See `Node#type`. @@ -35457,6 +38946,18 @@ class Prism::YieldNode < ::Prism::Node # @return [YieldNode] a new instance of YieldNode # # source://prism/lib/prism/node.rb#16560 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).void + end def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc); end # Implements case-equality for the node. This is effectively == but without @@ -35468,42 +38969,60 @@ class Prism::YieldNode < ::Prism::Node # def accept: (Visitor visitor) -> void # # source://prism/lib/prism/node.rb#16572 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # # source://prism/lib/prism/node.rb#16627 + sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#16577 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def comment_targets: () -> Array[Node | Location] # # source://prism/lib/prism/node.rb#16589 + sig { override.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end # def compact_child_nodes: () -> Array[Node] # # source://prism/lib/prism/node.rb#16582 + sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?) -> YieldNode # # source://prism/lib/prism/node.rb#16594 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location) + ).returns(Prism::YieldNode) + end def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # # source://prism/lib/prism/node.rb#16577 + sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location? } # # source://prism/lib/prism/node.rb#16602 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -35518,31 +39037,37 @@ class Prism::YieldNode < ::Prism::Node # def keyword: () -> String # # source://prism/lib/prism/node.rb#16643 + sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # # source://prism/lib/prism/node.rb#16607 + sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # # source://prism/lib/prism/node.rb#16648 + sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # # source://prism/lib/prism/node.rb#16614 + sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # # source://prism/lib/prism/node.rb#16653 + sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # # source://prism/lib/prism/node.rb#16630 + sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end # Return a symbol representation of this node type. See `Node#type`. diff --git a/sorbet/rbi/gems/rbi@0.2.0.rbi b/sorbet/rbi/gems/rbi@0.2.1.rbi similarity index 88% rename from sorbet/rbi/gems/rbi@0.2.0.rbi rename to sorbet/rbi/gems/rbi@0.2.1.rbi index bb64ce4..e6f9824 100644 --- a/sorbet/rbi/gems/rbi@0.2.0.rbi +++ b/sorbet/rbi/gems/rbi@0.2.1.rbi @@ -475,6 +475,14 @@ class RBI::File end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + # source://rbi/lib/rbi/rbs_printer.rb#996 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi/lib/rbi/rbs_printer.rb#1002 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + # source://rbi/lib/rbi/model.rb#143 sig { returns(::RBI::Tree) } def root; end @@ -1133,6 +1141,14 @@ class RBI::Node end def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + # source://rbi/lib/rbi/rbs_printer.rb#1013 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def rbs_print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi/lib/rbi/rbs_printer.rb#1019 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + # @raise [ReplaceNodeError] # # source://rbi/lib/rbi/model.rb#35 @@ -1792,6 +1808,323 @@ class RBI::Public < ::RBI::Visibility def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end end +# source://rbi/lib/rbi/rbs_printer.rb#5 +class RBI::RBSPrinter < ::RBI::Visitor + # source://rbi/lib/rbi/rbs_printer.rb#18 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi/lib/rbi/rbs_printer.rb#15 + sig { returns(::Integer) } + def current_indent; end + + # source://rbi/lib/rbi/rbs_printer.rb#35 + sig { void } + def dedent; end + + # @return [Boolean] + # + # source://rbi/lib/rbi/rbs_printer.rb#9 + def in_visibility_group; end + + # @return [Boolean] + # + # source://rbi/lib/rbi/rbs_printer.rb#9 + def in_visibility_group=(_arg0); end + + # Printing + # + # source://rbi/lib/rbi/rbs_printer.rb#30 + sig { void } + def indent; end + + # source://rbi/lib/rbi/rbs_printer.rb#12 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # source://rbi/lib/rbi/rbs_printer.rb#41 + sig { params(string: ::String).void } + def print(string); end + + # source://rbi/lib/rbi/rbs_printer.rb#275 + sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void } + def print_attr_sig(node, sig); end + + # source://rbi/lib/rbi/rbs_printer.rb#9 + sig { returns(T::Boolean) } + def print_locs; end + + # @return [Boolean] + # + # source://rbi/lib/rbi/rbs_printer.rb#9 + def print_locs=(_arg0); end + + # source://rbi/lib/rbi/rbs_printer.rb#350 + sig { params(node: ::RBI::Method, sig: ::RBI::Sig).void } + def print_method_sig(node, sig); end + + # Print a string with indentation and `\n` at the end. + # + # source://rbi/lib/rbi/rbs_printer.rb#61 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # source://rbi/lib/rbi/rbs_printer.rb#47 + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + # Print a string with indentation but without a `\n` at the end. + # + # source://rbi/lib/rbi/rbs_printer.rb#54 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # source://rbi/lib/rbi/rbs_printer.rb#67 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi/lib/rbi/rbs_printer.rb#505 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#243 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#228 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#233 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#238 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#106 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#444 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#123 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#90 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#625 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#213 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#454 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#78 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + # source://rbi/lib/rbi/rbs_printer.rb#601 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#591 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#449 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#510 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#434 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#429 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#439 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#292 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#596 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#459 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#118 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#419 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#486 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#481 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#476 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#414 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#620 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#424 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#138 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#201 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#634 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#148 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#500 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#133 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#128 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#563 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#568 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#111 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#515 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#549 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#556 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#586 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#491 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#607 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end + + private + + # source://rbi/lib/rbi/rbs_printer.rb#782 + sig { params(node: ::RBI::Type).returns(T::Boolean) } + def bare_nilable_proc?(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#777 + sig { params(node: ::RBI::Type).returns(T::Boolean) } + def bare_proc?(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#725 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # Parse a string containing a `T.let(x, X)` and extract the type + # + # Returns `nil` is the string is not a `T.let`. + # + # source://rbi/lib/rbi/rbs_printer.rb#759 + sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } + def parse_t_let(code); end + + # source://rbi/lib/rbi/rbs_printer.rb#747 + sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } + def parse_type(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#650 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#669 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#699 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # source://rbi/lib/rbi/rbs_printer.rb#675 + sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void } + def print_sig_param(node, param); end + + # source://rbi/lib/rbi/rbs_printer.rb#717 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end +end + +# source://rbi/lib/rbi/rbs_printer.rb#6 +class RBI::RBSPrinter::Error < ::RBI::Error; end + # source://rbi/lib/rbi/model.rb#5 class RBI::ReplaceNodeError < ::RBI::Error; end @@ -2164,7 +2497,7 @@ class RBI::Rewriters::Merge::Conflict < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -2409,7 +2742,7 @@ class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -2955,7 +3288,7 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - # source://tapioca/0.16.2lib/tapioca/rbi_ext/model.rb#38 + # source://tapioca/0.16.3lib/tapioca/rbi_ext/model.rb#38 sig do params( name: ::String, @@ -2965,19 +3298,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_class(name, superclass_name: T.unsafe(nil), &block); end - # source://tapioca/0.16.2lib/tapioca/rbi_ext/model.rb#45 + # source://tapioca/0.16.3lib/tapioca/rbi_ext/model.rb#45 sig { params(name: ::String, value: ::String).void } def create_constant(name, value:); end - # source://tapioca/0.16.2lib/tapioca/rbi_ext/model.rb#55 + # source://tapioca/0.16.3lib/tapioca/rbi_ext/model.rb#55 sig { params(name: ::String).void } def create_extend(name); end - # source://tapioca/0.16.2lib/tapioca/rbi_ext/model.rb#50 + # source://tapioca/0.16.3lib/tapioca/rbi_ext/model.rb#50 sig { params(name: ::String).void } def create_include(name); end - # source://tapioca/0.16.2lib/tapioca/rbi_ext/model.rb#90 + # source://tapioca/0.16.3lib/tapioca/rbi_ext/model.rb#90 sig do params( name: ::String, @@ -2991,19 +3324,19 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://tapioca/0.16.2lib/tapioca/rbi_ext/model.rb#60 + # source://tapioca/0.16.3lib/tapioca/rbi_ext/model.rb#60 sig { params(name: ::String).void } def create_mixes_in_class_methods(name); end - # source://tapioca/0.16.2lib/tapioca/rbi_ext/model.rb#25 + # source://tapioca/0.16.3lib/tapioca/rbi_ext/model.rb#25 sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_module(name, &block); end - # source://tapioca/0.16.2lib/tapioca/rbi_ext/model.rb#9 + # source://tapioca/0.16.3lib/tapioca/rbi_ext/model.rb#9 sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) } def create_path(constant, &block); end - # source://tapioca/0.16.2lib/tapioca/rbi_ext/model.rb#74 + # source://tapioca/0.16.3lib/tapioca/rbi_ext/model.rb#74 sig do params( name: ::String, @@ -3081,11 +3414,11 @@ class RBI::Tree < ::RBI::NodeWithComments private - # source://tapioca/0.16.2lib/tapioca/rbi_ext/model.rb#123 + # source://tapioca/0.16.3lib/tapioca/rbi_ext/model.rb#123 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # source://tapioca/0.16.2lib/tapioca/rbi_ext/model.rb#118 + # source://tapioca/0.16.3lib/tapioca/rbi_ext/model.rb#118 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end @@ -3151,6 +3484,10 @@ class RBI::Type sig { returns(::RBI::Type) } def non_nilable; end + # source://rbi/lib/rbi/rbs_printer.rb#1030 + sig { returns(::String) } + def rbs_string; end + # @abstract # # source://rbi/lib/rbi/type.rb#758 @@ -3839,6 +4176,99 @@ class RBI::TypeMember < ::RBI::NodeWithComments def value; end end +# source://rbi/lib/rbi/rbs_printer.rb#787 +class RBI::TypePrinter + # source://rbi/lib/rbi/rbs_printer.rb#794 + sig { void } + def initialize; end + + # source://rbi/lib/rbi/rbs_printer.rb#791 + sig { returns(::String) } + def string; end + + # source://rbi/lib/rbi/rbs_printer.rb#799 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + # source://rbi/lib/rbi/rbs_printer.rb#907 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#917 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#864 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#889 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#848 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#969 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#900 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#853 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#894 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#874 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#948 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#884 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#937 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#843 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#927 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#964 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#879 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # source://rbi/lib/rbi/rbs_printer.rb#869 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end + + private + + # source://rbi/lib/rbi/rbs_printer.rb#978 + sig { params(type_name: ::String).returns(::String) } + def translate_t_type(type_name); end +end + # source://rbi/lib/rbi/rewriters/attr_to_methods.rb#5 class RBI::UnexpectedMultipleSigsError < ::RBI::Error # source://rbi/lib/rbi/rewriters/attr_to_methods.rb#10 diff --git a/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi b/sorbet/rbi/gems/rspec-mocks@3.13.2.rbi similarity index 99% rename from sorbet/rbi/gems/rspec-mocks@3.13.1.rbi rename to sorbet/rbi/gems/rspec-mocks@3.13.2.rbi index 4809ee3..0a0e262 100644 --- a/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi +++ b/sorbet/rbi/gems/rspec-mocks@3.13.2.rbi @@ -11,70 +11,70 @@ # source://rspec-mocks/lib/rspec/mocks/instance_method_stasher.rb#1 module RSpec class << self - # source://rspec-core/3.13.0lib/rspec/core.rb#70 + # source://rspec-core/3.13.1lib/rspec/core.rb#70 def clear_examples; end - # source://rspec-core/3.13.0lib/rspec/core.rb#85 + # source://rspec-core/3.13.1lib/rspec/core.rb#85 def configuration; end - # source://rspec-core/3.13.0lib/rspec/core.rb#49 + # source://rspec-core/3.13.1lib/rspec/core.rb#49 def configuration=(_arg0); end - # source://rspec-core/3.13.0lib/rspec/core.rb#97 + # source://rspec-core/3.13.1lib/rspec/core.rb#97 def configure; end - # source://rspec-core/3.13.0lib/rspec/core.rb#194 + # source://rspec-core/3.13.1lib/rspec/core.rb#194 def const_missing(name); end - # source://rspec-core/3.13.0lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.1lib/rspec/core/dsl.rb#42 def context(*args, &example_group_block); end - # source://rspec-core/3.13.0lib/rspec/core.rb#122 + # source://rspec-core/3.13.1lib/rspec/core.rb#122 def current_example; end - # source://rspec-core/3.13.0lib/rspec/core.rb#128 + # source://rspec-core/3.13.1lib/rspec/core.rb#128 def current_example=(example); end - # source://rspec-core/3.13.0lib/rspec/core.rb#154 + # source://rspec-core/3.13.1lib/rspec/core.rb#154 def current_scope; end - # source://rspec-core/3.13.0lib/rspec/core.rb#134 + # source://rspec-core/3.13.1lib/rspec/core.rb#134 def current_scope=(scope); end - # source://rspec-core/3.13.0lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.1lib/rspec/core/dsl.rb#42 def describe(*args, &example_group_block); end - # source://rspec-core/3.13.0lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.1lib/rspec/core/dsl.rb#42 def example_group(*args, &example_group_block); end - # source://rspec-core/3.13.0lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.1lib/rspec/core/dsl.rb#42 def fcontext(*args, &example_group_block); end - # source://rspec-core/3.13.0lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.1lib/rspec/core/dsl.rb#42 def fdescribe(*args, &example_group_block); end - # source://rspec-core/3.13.0lib/rspec/core.rb#58 + # source://rspec-core/3.13.1lib/rspec/core.rb#58 def reset; end - # source://rspec-core/3.13.0lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.1lib/rspec/core/shared_example_group.rb#110 def shared_context(name, *args, &block); end - # source://rspec-core/3.13.0lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.1lib/rspec/core/shared_example_group.rb#110 def shared_examples(name, *args, &block); end - # source://rspec-core/3.13.0lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.1lib/rspec/core/shared_example_group.rb#110 def shared_examples_for(name, *args, &block); end - # source://rspec-core/3.13.0lib/rspec/core.rb#160 + # source://rspec-core/3.13.1lib/rspec/core.rb#160 def world; end - # source://rspec-core/3.13.0lib/rspec/core.rb#49 + # source://rspec-core/3.13.1lib/rspec/core.rb#49 def world=(_arg0); end - # source://rspec-core/3.13.0lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.1lib/rspec/core/dsl.rb#42 def xcontext(*args, &example_group_block); end - # source://rspec-core/3.13.0lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.1lib/rspec/core/dsl.rb#42 def xdescribe(*args, &example_group_block); end end end @@ -191,7 +191,7 @@ class RSpec::Mocks::AndInvokeImplementation def initialize(procs_to_invoke); end # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#742 - def call(*args, &block); end + def call(*args, **_arg1, &block); end end # Handles the implementation of an `and_return` implementation. @@ -213,40 +213,40 @@ end # # @private # -# source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#779 +# source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#780 class RSpec::Mocks::AndWrapOriginalImplementation # @return [AndWrapOriginalImplementation] a new instance of AndWrapOriginalImplementation # - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#780 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#781 def initialize(method, block); end - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#807 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#808 def call(*args, **_arg1, &block); end - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#787 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#788 def initial_action=(_value); end - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#803 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#804 def inner_action; end - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#791 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#792 def inner_action=(_value); end # @return [Boolean] # - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#799 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#800 def present?; end - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#795 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#796 def terminal_action=(_value); end private - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#814 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#815 def cannot_modify_further_error; end end -# source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#785 +# source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#786 class RSpec::Mocks::AndWrapOriginalImplementation::CannotModifyFurtherError < ::StandardError; end # Handles the implementation of an `and_yield` declaration. @@ -2462,7 +2462,7 @@ module RSpec::Mocks::ExampleMethods # @note If you disable the `:expect` syntax this method will be undefined. # # source://rspec-mocks/lib/rspec/mocks/syntax.rb#118 - def receive_messages(message_return_value_hash); end + def receive_messages(message_return_value_hash, &_block); end # Constructs a test double that is optimized for use with # `have_received`. With a normal double one has to stub methods in order @@ -2615,55 +2615,55 @@ RSpec::Mocks::IGNORED_BACKTRACE_LINE = T.let(T.unsafe(nil), String) # # @private # -# source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#756 +# source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#757 class RSpec::Mocks::Implementation - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#759 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#760 def call(*args, **_arg1, &block); end # Returns the value of attribute initial_action. # - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#757 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#758 def initial_action; end # Sets the attribute initial_action # # @param value the value to set the attribute initial_action to. # - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#757 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#758 def initial_action=(_arg0); end # Returns the value of attribute inner_action. # - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#757 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#758 def inner_action; end # Sets the attribute inner_action # # @param value the value to set the attribute inner_action to. # - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#757 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#758 def inner_action=(_arg0); end # @return [Boolean] # - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#766 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#767 def present?; end # Returns the value of attribute terminal_action. # - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#757 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#758 def terminal_action; end # Sets the attribute terminal_action # # @param value the value to set the attribute terminal_action to. # - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#757 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#758 def terminal_action=(_arg0); end private - # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#772 + # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#773 def actions; end end @@ -3301,7 +3301,7 @@ class RSpec::Mocks::MessageExpectation # @return [nil] No further chaining is supported after this. # # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#109 - def and_invoke(first_proc, *procs); end + def and_invoke(first_proc, *procs, &_block); end # Tells the object to raise an exception when the message is received. # @@ -3349,7 +3349,7 @@ class RSpec::Mocks::MessageExpectation # @return [nil] No further chaining is supported after this. # # source://rspec-mocks/lib/rspec/mocks/message_expectation.rb#71 - def and_return(first_value, *values); end + def and_return(first_value, *values, &_block); end # Tells the object to throw a symbol (with the object if that form is # used) when the message is received. diff --git a/sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi b/sorbet/rbi/gems/rubocop-sorbet@0.8.6.rbi similarity index 98% rename from sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi rename to sorbet/rbi/gems/rubocop-sorbet@0.8.6.rbi index d2dd1aa..2df1fb7 100644 --- a/sorbet/rbi/gems/rubocop-sorbet@0.8.5.rbi +++ b/sorbet/rbi/gems/rubocop-sorbet@0.8.6.rbi @@ -276,6 +276,9 @@ RuboCop::Cop::Sorbet::CheckedTrueInSignature::MESSAGE = T.let(T.unsafe(nil), Str # # source://rubocop-sorbet/lib/rubocop/cop/sorbet/constants_from_strings.rb#36 class RuboCop::Cop::Sorbet::ConstantsFromStrings < ::RuboCop::Cop::Base + # source://rubocop-sorbet/lib/rubocop/cop/sorbet/constants_from_strings.rb#46 + def on_csend(node); end + # source://rubocop-sorbet/lib/rubocop/cop/sorbet/constants_from_strings.rb#46 def on_send(node); end end @@ -678,7 +681,7 @@ class RuboCop::Cop::Sorbet::ForbidRBIOutsideOfAllowedPaths < ::RuboCop::Cop::Bas private - # source://rubocop-sorbet/lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#55 + # source://rubocop-sorbet/lib/rubocop/cop/sorbet/rbi/forbid_rbi_outside_of_allowed_paths.rb#48 def allowed_paths; end end @@ -1254,6 +1257,46 @@ RuboCop::Cop::Sorbet::RedundantExtendTSig::MSG = T.let(T.unsafe(nil), String) # source://rubocop-sorbet/lib/rubocop/cop/sorbet/redundant_extend_t_sig.rb#33 RuboCop::Cop::Sorbet::RedundantExtendTSig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for the use of Ruby Refinements library. Refinements add +# complexity and incur a performance penalty that can be significant +# for large code bases. Good examples are cases of unrelated +# methods that happen to have the same name as these module methods. +# +# @example +# # bad +# module Foo +# refine(Date) do +# end +# end +# +# # bad +# module Foo +# using(Date) do +# end +# end +# +# # good +# module Foo +# bar.refine(Date) +# end +# +# # good +# module Foo +# bar.using(Date) +# end +# +# source://rubocop-sorbet/lib/rubocop/cop/sorbet/refinement.rb#34 +class RuboCop::Cop::Sorbet::Refinement < ::RuboCop::Cop::Base + # source://rubocop-sorbet/lib/rubocop/cop/sorbet/refinement.rb#38 + def on_send(node); end +end + +# source://rubocop-sorbet/lib/rubocop/cop/sorbet/refinement.rb#35 +RuboCop::Cop::Sorbet::Refinement::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-sorbet/lib/rubocop/cop/sorbet/refinement.rb#36 +RuboCop::Cop::Sorbet::Refinement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for the correct order of `sig` builder methods. # # Options: diff --git a/sorbet/rbi/gems/rubocop@1.66.1.rbi b/sorbet/rbi/gems/rubocop@1.67.0.rbi similarity index 98% rename from sorbet/rbi/gems/rubocop@1.66.1.rbi rename to sorbet/rbi/gems/rubocop@1.67.0.rbi index 4fea085..893be8c 100644 --- a/sorbet/rbi/gems/rubocop@1.66.1.rbi +++ b/sorbet/rbi/gems/rubocop@1.67.0.rbi @@ -222,12 +222,6 @@ class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base # source://rubocop/lib/rubocop/cli/command/auto_generate_config.rb#73 def only_exclude?; end - # @api private - # @return [Boolean] - # - # source://rubocop/lib/rubocop/cli/command/auto_generate_config.rb#162 - def options_config_in_root?; end - # @api private # @return [Boolean] # @@ -440,11 +434,11 @@ RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) # # @api private # -# source://rubocop/lib/rubocop/cli/command/lsp.rb#10 +# source://rubocop/lib/rubocop/cli/command/lsp.rb#8 class RuboCop::CLI::Command::LSP < ::RuboCop::CLI::Command::Base # @api private # - # source://rubocop/lib/rubocop/cli/command/lsp.rb#13 + # source://rubocop/lib/rubocop/cli/command/lsp.rb#11 def run; end end @@ -2266,7 +2260,7 @@ class RuboCop::ConfigValidator # @return [ConfigValidator] a new instance of ConfigValidator # - # source://rubocop/lib/rubocop/config_validator.rb#26 + # source://rubocop/lib/rubocop/config_validator.rb#27 def initialize(config); end # source://rubocop-ast/1.32.3lib/rubocop/ast/utilities/simple_forwardable.rb#9 @@ -2275,10 +2269,10 @@ class RuboCop::ConfigValidator # source://rubocop-ast/1.32.3lib/rubocop/ast/utilities/simple_forwardable.rb#9 def smart_loaded_path(*_arg0, **_arg1, &_arg2); end - # source://rubocop/lib/rubocop/config_validator.rb#62 + # source://rubocop/lib/rubocop/config_validator.rb#63 def target_ruby_version; end - # source://rubocop/lib/rubocop/config_validator.rb#32 + # source://rubocop/lib/rubocop/config_validator.rb#33 def validate; end # Validations that should only be run after all config resolving has @@ -2287,76 +2281,76 @@ class RuboCop::ConfigValidator # chain has been loaded so that only the final value is validated, and # any obsolete but overridden values are ignored. # - # source://rubocop/lib/rubocop/config_validator.rb#58 + # source://rubocop/lib/rubocop/config_validator.rb#59 def validate_after_resolution; end # @raise [ValidationError] # - # source://rubocop/lib/rubocop/config_validator.rb#66 + # source://rubocop/lib/rubocop/config_validator.rb#67 def validate_section_presence(name); end private # @raise [ValidationError] # - # source://rubocop/lib/rubocop/config_validator.rb#103 + # source://rubocop/lib/rubocop/config_validator.rb#104 def alert_about_unrecognized_cops(invalid_cop_names); end - # source://rubocop/lib/rubocop/config_validator.rb#253 + # source://rubocop/lib/rubocop/config_validator.rb#254 def check_cop_config_value(hash, parent = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/config_validator.rb#76 + # source://rubocop/lib/rubocop/config_validator.rb#77 def check_obsoletions; end # @raise [ValidationError] # - # source://rubocop/lib/rubocop/config_validator.rb#83 + # source://rubocop/lib/rubocop/config_validator.rb#84 def check_target_ruby; end - # source://rubocop/lib/rubocop/config_validator.rb#194 + # source://rubocop/lib/rubocop/config_validator.rb#195 def each_invalid_parameter(cop_name); end - # source://rubocop/lib/rubocop/config_validator.rb#119 + # source://rubocop/lib/rubocop/config_validator.rb#120 def list_unknown_cops(invalid_cop_names); end # FIXME: Handling colors in exception messages like this is ugly. # - # source://rubocop/lib/rubocop/config_validator.rb#273 + # source://rubocop/lib/rubocop/config_validator.rb#274 def param_error_message(parent, key, value, supposed_values); end - # source://rubocop/lib/rubocop/config_validator.rb#241 + # source://rubocop/lib/rubocop/config_validator.rb#242 def reject_conflicting_safe_settings; end # @raise [ValidationError] # - # source://rubocop/lib/rubocop/config_validator.rb#232 + # source://rubocop/lib/rubocop/config_validator.rb#233 def reject_mutually_exclusive_defaults; end - # source://rubocop/lib/rubocop/config_validator.rb#141 + # source://rubocop/lib/rubocop/config_validator.rb#142 def suggestion(name); end # Returns the value of attribute target_ruby. # - # source://rubocop/lib/rubocop/config_validator.rb#74 + # source://rubocop/lib/rubocop/config_validator.rb#75 def target_ruby; end - # source://rubocop/lib/rubocop/config_validator.rb#206 + # source://rubocop/lib/rubocop/config_validator.rb#207 def validate_enforced_styles(valid_cop_names); end # @raise [ValidationError] # - # source://rubocop/lib/rubocop/config_validator.rb#168 + # source://rubocop/lib/rubocop/config_validator.rb#169 def validate_new_cops_parameter; end - # source://rubocop/lib/rubocop/config_validator.rb#179 + # source://rubocop/lib/rubocop/config_validator.rb#180 def validate_parameter_names(valid_cop_names); end - # source://rubocop/lib/rubocop/config_validator.rb#226 + # source://rubocop/lib/rubocop/config_validator.rb#227 def validate_support_and_has_list(name, formats, valid); end # @raise [ValidationError] # - # source://rubocop/lib/rubocop/config_validator.rb#157 + # source://rubocop/lib/rubocop/config_validator.rb#158 def validate_syntax_cop; end end @@ -2365,25 +2359,25 @@ end # source://rubocop/lib/rubocop/config_validator.rb#10 RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) -# source://rubocop/lib/rubocop/config_validator.rb#21 +# source://rubocop/lib/rubocop/config_validator.rb#22 RuboCop::ConfigValidator::CONFIG_CHECK_AUTOCORRECTS = T.let(T.unsafe(nil), Array) -# source://rubocop/lib/rubocop/config_validator.rb#20 +# source://rubocop/lib/rubocop/config_validator.rb#21 RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop/lib/rubocop/config_validator.rb#19 +# source://rubocop/lib/rubocop/config_validator.rb#20 RuboCop::ConfigValidator::CONFIG_CHECK_KEYS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop/lib/rubocop/config_validator.rb#12 +# source://rubocop/lib/rubocop/config_validator.rb#13 RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop/lib/rubocop/config_validator.rb#16 +# source://rubocop/lib/rubocop/config_validator.rb#17 RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array) # source://rubocop/lib/rubocop/cop/util.rb#4 @@ -2966,14 +2960,14 @@ class RuboCop::Cop::Base # @api private # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/base.rb#347 + # source://rubocop/lib/rubocop/cop/base.rb#351 def always_autocorrect?; end # Called before any investigation # # @api private # - # source://rubocop/lib/rubocop/cop/base.rb#333 + # source://rubocop/lib/rubocop/cop/base.rb#337 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @api private @@ -2995,7 +2989,7 @@ class RuboCop::Cop::Base # @api private # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/base.rb#353 + # source://rubocop/lib/rubocop/cop/base.rb#357 def contextual_autocorrect?; end # Configuration Helpers @@ -3030,7 +3024,7 @@ class RuboCop::Cop::Base # source://rubocop/lib/rubocop/cop/base.rb#234 def external_dependency_checksum; end - # source://rubocop/lib/rubocop/cop/base.rb#357 + # source://rubocop/lib/rubocop/cop/base.rb#361 def inspect; end # Gets called if no message is specified when calling `add_offense` or @@ -3104,90 +3098,90 @@ class RuboCop::Cop::Base private - # source://rubocop/lib/rubocop/cop/base.rb#475 + # source://rubocop/lib/rubocop/cop/base.rb#479 def annotate(message); end - # source://rubocop/lib/rubocop/cop/base.rb#369 + # source://rubocop/lib/rubocop/cop/base.rb#373 def apply_correction(corrector); end # @return [Symbol] offense status # - # source://rubocop/lib/rubocop/cop/base.rb#439 + # source://rubocop/lib/rubocop/cop/base.rb#443 def attempt_correction(range, corrector); end # Reserved for Cop::Cop # - # source://rubocop/lib/rubocop/cop/base.rb#365 + # source://rubocop/lib/rubocop/cop/base.rb#369 def callback_argument(range); end # Called to complete an investigation # - # source://rubocop/lib/rubocop/cop/base.rb#398 + # source://rubocop/lib/rubocop/cop/base.rb#402 def complete_investigation; end # @return [Symbol, Corrector] offense status # - # source://rubocop/lib/rubocop/cop/base.rb#413 + # source://rubocop/lib/rubocop/cop/base.rb#417 def correct(range); end - # source://rubocop/lib/rubocop/cop/base.rb#383 + # source://rubocop/lib/rubocop/cop/base.rb#387 def current_corrector; end # Reserved for Commissioner: # - # source://rubocop/lib/rubocop/cop/base.rb#375 + # source://rubocop/lib/rubocop/cop/base.rb#379 def current_offense_locations; end - # source://rubocop/lib/rubocop/cop/base.rb#387 + # source://rubocop/lib/rubocop/cop/base.rb#391 def current_offenses; end - # source://rubocop/lib/rubocop/cop/base.rb#379 + # source://rubocop/lib/rubocop/cop/base.rb#383 def currently_disabled_lines; end - # source://rubocop/lib/rubocop/cop/base.rb#503 + # source://rubocop/lib/rubocop/cop/base.rb#507 def custom_severity; end - # source://rubocop/lib/rubocop/cop/base.rb#499 + # source://rubocop/lib/rubocop/cop/base.rb#503 def default_severity; end - # source://rubocop/lib/rubocop/cop/base.rb#453 + # source://rubocop/lib/rubocop/cop/base.rb#457 def disable_uncorrectable(range); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/base.rb#489 + # source://rubocop/lib/rubocop/cop/base.rb#493 def enabled_line?(line_number); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/base.rb#481 + # source://rubocop/lib/rubocop/cop/base.rb#485 def file_name_matches_any?(file, parameter, default_result); end - # source://rubocop/lib/rubocop/cop/base.rb#471 + # source://rubocop/lib/rubocop/cop/base.rb#475 def find_message(range, message); end - # source://rubocop/lib/rubocop/cop/base.rb#495 + # source://rubocop/lib/rubocop/cop/base.rb#499 def find_severity(_range, severity); end - # source://rubocop/lib/rubocop/cop/base.rb#516 + # source://rubocop/lib/rubocop/cop/base.rb#520 def range_for_original(range); end - # source://rubocop/lib/rubocop/cop/base.rb#460 + # source://rubocop/lib/rubocop/cop/base.rb#464 def range_from_node_or_range(node_or_range); end # Actually private methods # - # source://rubocop/lib/rubocop/cop/base.rb#408 + # source://rubocop/lib/rubocop/cop/base.rb#412 def reset_investigation; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/base.rb#524 + # source://rubocop/lib/rubocop/cop/base.rb#528 def target_satisfies_all_gem_version_requirements?; end # @return [Symbol] offense status # - # source://rubocop/lib/rubocop/cop/base.rb#428 + # source://rubocop/lib/rubocop/cop/base.rb#432 def use_corrector(range, corrector); end class << self @@ -3298,12 +3292,12 @@ class RuboCop::Cop::Base private - # source://rubocop/lib/rubocop/cop/base.rb#391 + # source://rubocop/lib/rubocop/cop/base.rb#395 def restrict_on_send; end end end -# source://rubocop/lib/rubocop/cop/base.rb#395 +# source://rubocop/lib/rubocop/cop/base.rb#399 RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) # Reports of an investigation. @@ -3821,56 +3815,56 @@ class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::GemDeclaration - # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#67 + # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#68 def includes_commit_reference?(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#62 + # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#63 def includes_version_specification?(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#71 + # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#72 def on_send(node); end private # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#85 + # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#86 def allowed_gem?(node); end - # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#89 + # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#90 def allowed_gems; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#111 + # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#112 def forbidden_offense?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#117 + # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#118 def forbidden_style?; end - # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#93 + # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#94 def message(_range); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#101 + # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#102 def offense?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#105 + # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#106 def required_offense?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#121 + # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#122 def required_style?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#125 + # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#126 def version_specification?(expression); end end @@ -3881,6 +3875,9 @@ RuboCop::Cop::Bundler::GemVersion::FORBIDDEN_MSG = T.let(T.unsafe(nil), String) RuboCop::Cop::Bundler::GemVersion::REQUIRED_MSG = T.let(T.unsafe(nil), String) # source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#59 +RuboCop::Cop::Bundler::GemVersion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop/lib/rubocop/cop/bundler/gem_version.rb#60 RuboCop::Cop::Bundler::GemVersion::VERSION_SPECIFICATION_REGEX = T.let(T.unsafe(nil), Regexp) # Passing symbol arguments to `source` (e.g. `source :rubygems`) is @@ -4909,22 +4906,22 @@ RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) # # source://rubocop/lib/rubocop/cop/cop.rb#11 class RuboCop::Cop::Cop < ::RuboCop::Cop::Base - # source://rubocop/lib/rubocop/cop/cop.rb#65 + # source://rubocop/lib/rubocop/cop/cop.rb#73 def add_offense(node_or_range, location: T.unsafe(nil), message: T.unsafe(nil), severity: T.unsafe(nil), &block); end # Called before any investigation # # @api private # - # source://rubocop/lib/rubocop/cop/cop.rb#121 + # source://rubocop/lib/rubocop/cop/cop.rb#129 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @deprecated # - # source://rubocop/lib/rubocop/cop/cop.rb#97 + # source://rubocop/lib/rubocop/cop/cop.rb#105 def corrections; end - # source://rubocop/lib/rubocop/cop/cop.rb#82 + # source://rubocop/lib/rubocop/cop/cop.rb#90 def find_location(node, loc); end # Returns the value of attribute offenses. @@ -4934,71 +4931,76 @@ class RuboCop::Cop::Cop < ::RuboCop::Cop::Base # Called after all on_... have been called # - # source://rubocop/lib/rubocop/cop/cop.rb#114 + # source://rubocop/lib/rubocop/cop/cop.rb#122 def on_investigation_end; end # Called before all on_... have been called # - # source://rubocop/lib/rubocop/cop/cop.rb#108 + # source://rubocop/lib/rubocop/cop/cop.rb#116 def on_new_investigation; end # @deprecated Use class method # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/cop.rb#88 + # source://rubocop/lib/rubocop/cop/cop.rb#96 def support_autocorrect?; end private - # source://rubocop/lib/rubocop/cop/cop.rb#139 + # source://rubocop/lib/rubocop/cop/cop.rb#147 def apply_correction(corrector); end # Override Base # - # source://rubocop/lib/rubocop/cop/cop.rb#135 + # source://rubocop/lib/rubocop/cop/cop.rb#143 def callback_argument(_range); end - # source://rubocop/lib/rubocop/cop/cop.rb#156 + # source://rubocop/lib/rubocop/cop/cop.rb#164 def correction_lambda; end - # source://rubocop/lib/rubocop/cop/cop.rb#162 + # source://rubocop/lib/rubocop/cop/cop.rb#170 def dedupe_on_node(node); end # Just for legacy # # @yield [corrector] # - # source://rubocop/lib/rubocop/cop/cop.rb#144 + # source://rubocop/lib/rubocop/cop/cop.rb#152 def emulate_v0_callsequence(corrector); end - # source://rubocop/lib/rubocop/cop/cop.rb#175 + # source://rubocop/lib/rubocop/cop/cop.rb#183 def range_for_original(range); end - # source://rubocop/lib/rubocop/cop/cop.rb#169 + # source://rubocop/lib/rubocop/cop/cop.rb#177 def suppress_clobbering; end class << self # @deprecated Use Registry.all # - # source://rubocop/lib/rubocop/cop/cop.rb#48 + # source://rubocop/lib/rubocop/cop/cop.rb#56 def all; end - # source://rubocop/lib/rubocop/cop/cop.rb#29 + # @private + # + # source://rubocop/lib/rubocop/cop/cop.rb#25 + def inherited(_subclass); end + + # source://rubocop/lib/rubocop/cop/cop.rb#37 def joining_forces; end # @deprecated Use Registry.qualified_cop_name # - # source://rubocop/lib/rubocop/cop/cop.rb#57 + # source://rubocop/lib/rubocop/cop/cop.rb#65 def qualified_cop_name(name, origin); end # @deprecated Use Registry.global # - # source://rubocop/lib/rubocop/cop/cop.rb#39 + # source://rubocop/lib/rubocop/cop/cop.rb#47 def registry; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/cop.rb#25 + # source://rubocop/lib/rubocop/cop/cop.rb#33 def support_autocorrect?; end end end @@ -7332,19 +7334,19 @@ class RuboCop::Cop::Layout::AccessModifierIndentation < ::RuboCop::Cop::Base # source://rubocop/lib/rubocop/cop/layout/access_modifier_indentation.rb#58 def check_body(body, node); end - # source://rubocop/lib/rubocop/cop/layout/access_modifier_indentation.rb#65 + # source://rubocop/lib/rubocop/cop/layout/access_modifier_indentation.rb#69 def check_modifier(send_node, end_range); end - # source://rubocop/lib/rubocop/cop/layout/access_modifier_indentation.rb#88 + # source://rubocop/lib/rubocop/cop/layout/access_modifier_indentation.rb#92 def expected_indent_offset; end - # source://rubocop/lib/rubocop/cop/layout/access_modifier_indentation.rb#84 + # source://rubocop/lib/rubocop/cop/layout/access_modifier_indentation.rb#88 def message(range); end # An offset that is not expected, but correct if the configuration is # changed. # - # source://rubocop/lib/rubocop/cop/layout/access_modifier_indentation.rb#94 + # source://rubocop/lib/rubocop/cop/layout/access_modifier_indentation.rb#98 def unexpected_indent_offset; end end @@ -11190,30 +11192,36 @@ RuboCop::Cop::Layout::FirstHashElementLineBreak::MSG = T.let(T.unsafe(nil), Stri # qux: "b", # } # ) +# @example AllowedMethods: ['some_method'] +# +# # good +# some_method(foo, bar, +# baz) # -# source://rubocop/lib/rubocop/cop/layout/first_method_argument_line_break.rb#66 +# source://rubocop/lib/rubocop/cop/layout/first_method_argument_line_break.rb#71 class RuboCop::Cop::Layout::FirstMethodArgumentLineBreak < ::RuboCop::Cop::Base include ::RuboCop::Cop::FirstElementLineBreak + include ::RuboCop::Cop::AllowedMethods extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + # source://rubocop/lib/rubocop/cop/layout/first_method_argument_line_break.rb#78 def on_csend(node); end - # source://rubocop/lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + # source://rubocop/lib/rubocop/cop/layout/first_method_argument_line_break.rb#78 def on_send(node); end - # source://rubocop/lib/rubocop/cop/layout/first_method_argument_line_break.rb#72 + # source://rubocop/lib/rubocop/cop/layout/first_method_argument_line_break.rb#78 def on_super(node); end private # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/first_method_argument_line_break.rb#91 + # source://rubocop/lib/rubocop/cop/layout/first_method_argument_line_break.rb#99 def ignore_last_element?; end end -# source://rubocop/lib/rubocop/cop/layout/first_method_argument_line_break.rb#70 +# source://rubocop/lib/rubocop/cop/layout/first_method_argument_line_break.rb#76 RuboCop::Cop::Layout::FirstMethodArgumentLineBreak::MSG = T.let(T.unsafe(nil), String) # Checks for a line break before the first parameter in a @@ -12163,13 +12171,12 @@ end # source://rubocop/lib/rubocop/cop/layout/indentation_style.rb#40 RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) -# Checks for indentation that doesn't use the specified number -# of spaces. +# Checks for indentation that doesn't use the specified number of spaces. +# The indentation width can be configured using the `Width` setting. The default width is 2. # -# See also the IndentationConsistency cop which is the companion to this -# one. +# See also the `Layout/IndentationConsistency` cop which is the companion to this one. # -# @example +# @example Width: 2 (default) # # bad # class A # def test @@ -12202,7 +12209,7 @@ RuboCop::Cop::Layout::IndentationStyle::MSG = T.let(T.unsafe(nil), String) # end # end # -# source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#45 +# source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#44 class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp @@ -12212,126 +12219,126 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#57 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#56 def access_modifier?(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#81 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#80 def on_block(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#138 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#137 def on_case(case_node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#146 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#145 def on_case_match(case_match); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#95 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#94 def on_class(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#104 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#103 def on_csend(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#121 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#120 def on_def(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#121 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#120 def on_defs(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#66 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#65 def on_ensure(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#66 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#65 def on_for(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#156 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#155 def on_if(node, base = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#73 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#72 def on_kwbegin(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#95 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#94 def on_module(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#81 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#80 def on_numblock(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#66 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#65 def on_resbody(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#61 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#60 def on_rescue(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#95 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#94 def on_sclass(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#104 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#103 def on_send(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#128 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#127 def on_until(node, base = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#128 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#127 def on_while(node, base = T.unsafe(nil)); end private - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#227 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#226 def access_modifier_indentation_style; end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#165 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#164 def autocorrect(corrector, node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#235 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#234 def check_assignment(node, rhs); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#255 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#254 def check_if(node, body, else_clause, base_loc); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#268 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#267 def check_indentation(base_loc, body_node, style = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#169 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#168 def check_members(base, members); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#193 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#192 def check_members_for_indented_internal_methods_style(members); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#199 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#198 def check_members_for_normal_style(base, members); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#341 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#340 def check_rescue?(rescue_node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#377 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#376 def configured_indentation_width; end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#207 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#206 def each_member(members); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#231 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#230 def indentation_consistency_style; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#323 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#322 def indentation_to_check?(base_loc, body_node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#219 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#218 def indented_internal_methods_style?; end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#381 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#380 def leftmost_modifier_of(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#302 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#301 def message(configured_indentation_width, indentation, name); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#360 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#359 def offending_range(body_node, indentation); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#278 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#277 def offense(body_node, indentation, style); end # Returns true if the given node is within another node that has @@ -12339,29 +12346,29 @@ class RuboCop::Cop::Layout::IndentationWidth < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#313 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#312 def other_offense_in_same_range?(node); end - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#181 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#180 def select_check_member(member); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#345 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#344 def skip_check?(base_loc, body_node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#223 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#222 def special_modifier?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#368 + # source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#367 def starts_with_access_modifier?(body_node); end end -# source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#53 +# source://rubocop/lib/rubocop/cop/layout/indentation_width.rb#52 RuboCop::Cop::Layout::IndentationWidth::MSG = T.let(T.unsafe(nil), String) # Checks for indentation of the first non-blank non-comment @@ -12441,72 +12448,98 @@ RuboCop::Cop::Layout::InitialIndentation::MSG = T.let(T.unsafe(nil), String) # # #ruby=2.7.0 # #ruby-gemset=myproject +# @example AllowRBSInlineAnnotation: false (default) +# +# # bad +# +# include Enumerable #[Integer] +# +# attr_reader :name #: String +# attr_reader :age #: Integer? +# @example AllowRBSInlineAnnotation: true +# +# # good +# +# include Enumerable #[Integer] # -# source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#52 +# attr_reader :name #: String +# attr_reader :age #: Integer? +# +# source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#70 class RuboCop::Cop::Layout::LeadingCommentSpace < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#58 + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#76 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#95 + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#114 def allow_doxygen_comment?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#103 + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#122 def allow_gemfile_ruby_comment?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#79 + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#138 + def allow_rbs_inline_annotation?; end + + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#98 def allowed_on_first_line?(comment); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#99 + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#118 def doxygen_comment_style?(comment); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#107 + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#126 def gemfile?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#115 + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#134 def gemfile_ruby_comment?(comment); end - # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#75 + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#94 def hash_mark(expr); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#91 + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#110 def rackup_config_file?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#87 + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#106 def rackup_options?(comment); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#111 + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#142 + def rbs_inline_annotation?(comment); end + + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#130 def ruby_comment_in_gemfile?(comment); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#83 + # source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#102 def shebang?(comment); end end -# source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#56 +# source://rubocop/lib/rubocop/cop/layout/leading_comment_space.rb#74 RuboCop::Cop::Layout::LeadingCommentSpace::MSG = T.let(T.unsafe(nil), String) # Checks for unnecessary leading blank lines at the beginning @@ -16953,38 +16986,39 @@ RuboCop::Cop::Lint::AmbiguousOperatorPrecedence::RESTRICT_ON_SEND = T.let(T.unsa # # source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#59 class RuboCop::Cop::Lint::AmbiguousRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RationalLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#64 + # source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#65 def on_erange(node); end - # source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#64 + # source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#65 def on_irange(node); end private # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#82 + # source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#84 def acceptable?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#89 + # source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#92 def acceptable_call?(node); end # @yield [range.begin] # - # source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#77 + # source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#78 def each_boundary(range); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#99 + # source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#102 def require_parentheses_for_method_chain?; end end -# source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#62 +# source://rubocop/lib/rubocop/cop/lint/ambiguous_range.rb#63 RuboCop::Cop::Lint::AmbiguousRange::MSG = T.let(T.unsafe(nil), String) # Checks for ambiguous regexp literals in the first argument of @@ -17124,17 +17158,17 @@ RuboCop::Cop::Lint::AssignmentInCondition::MSG_WITH_SAFE_ASSIGNMENT_ALLOWED = T. class RuboCop::Cop::Lint::BigDecimalNew < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/lint/big_decimal_new.rb#25 + # source://rubocop/lib/rubocop/cop/lint/big_decimal_new.rb#24 def big_decimal_new(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/lint/big_decimal_new.rb#30 + # source://rubocop/lib/rubocop/cop/lint/big_decimal_new.rb#29 def on_send(node); end end # source://rubocop/lib/rubocop/cop/lint/big_decimal_new.rb#20 RuboCop::Cop::Lint::BigDecimalNew::MSG = T.let(T.unsafe(nil), String) -# source://rubocop/lib/rubocop/cop/lint/big_decimal_new.rb#22 +# source://rubocop/lib/rubocop/cop/lint/big_decimal_new.rb#21 RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for places where binary operator has identical operands. @@ -18464,6 +18498,53 @@ end # source://rubocop/lib/rubocop/cop/lint/duplicate_rescue_exception.rb#31 RuboCop::Cop::Lint::DuplicateRescueException::MSG = T.let(T.unsafe(nil), String) +# Checks for duplicate literal, constant, or variable elements in Set. +# +# @example +# +# # bad +# Set[:foo, :bar, :foo] +# +# # good +# Set[:foo, :bar] +# +# # bad +# Set.new([:foo, :bar, :foo]) +# +# # good +# Set.new([:foo, :bar]) +# +# # bad +# [:foo, :bar, :foo].to_set +# +# # good +# [:foo, :bar].to_set +# +# source://rubocop/lib/rubocop/cop/lint/duplicate_set_element.rb#28 +class RuboCop::Cop::Lint::DuplicateSetElement < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop/lib/rubocop/cop/lint/duplicate_set_element.rb#43 + def on_csend(node); end + + # source://rubocop/lib/rubocop/cop/lint/duplicate_set_element.rb#43 + def on_send(node); end + + # source://rubocop/lib/rubocop/cop/lint/duplicate_set_element.rb#35 + def set_init_elements(param0 = T.unsafe(nil)); end + + private + + # source://rubocop/lib/rubocop/cop/lint/duplicate_set_element.rb#64 + def register_offense(current_element, prev_element); end +end + +# source://rubocop/lib/rubocop/cop/lint/duplicate_set_element.rb#31 +RuboCop::Cop::Lint::DuplicateSetElement::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop/lib/rubocop/cop/lint/duplicate_set_element.rb#32 +RuboCop::Cop::Lint::DuplicateSetElement::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks if each_with_object is called with an immutable # argument. Since the argument is the object that the given block shall # make calls on to build something based on the enumerable that @@ -19110,14 +19191,11 @@ RuboCop::Cop::Lint::EmptyWhen::MSG = T.let(T.unsafe(nil), String) # # source://rubocop/lib/rubocop/cop/lint/ensure_return.rb#42 class RuboCop::Cop::Lint::EnsureReturn < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop/lib/rubocop/cop/lint/ensure_return.rb#48 + # source://rubocop/lib/rubocop/cop/lint/ensure_return.rb#45 def on_ensure(node); end end -# source://rubocop/lib/rubocop/cop/lint/ensure_return.rb#46 +# source://rubocop/lib/rubocop/cop/lint/ensure_return.rb#43 RuboCop::Cop::Lint::EnsureReturn::MSG = T.let(T.unsafe(nil), String) # Emulates the following Ruby warnings in Ruby 2.6. @@ -19261,7 +19339,15 @@ RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) # floating-point value representation to be exactly the same, which is very unlikely # if you perform any arithmetic operations involving precision loss. # -# # good - comparing against zero +# @example +# # bad +# x == 0.1 +# x != 0.1 +# +# # good - using BigDecimal +# x.to_d == 0.1.to_d +# +# # good - comparing against zero # x == 0.0 # x != 0.0 # @@ -19275,14 +19361,6 @@ RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) # # Or some other epsilon based type of comparison: # # https://www.embeddeduse.com/2019/08/26/qt-compare-two-floats/ # -# @example -# # bad -# x == 0.1 -# x != 0.1 -# -# # good - using BigDecimal -# x.to_d == 0.1.to_d -# # source://rubocop/lib/rubocop/cop/lint/float_comparison.rb#35 class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base # source://rubocop/lib/rubocop/cop/lint/float_comparison.rb#44 @@ -19677,26 +19755,26 @@ class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base private - # source://rubocop/lib/rubocop/cop/lint/implicit_string_concatenation.rb#86 + # source://rubocop/lib/rubocop/cop/lint/implicit_string_concatenation.rb#92 def display_str(node); end - # source://rubocop/lib/rubocop/cop/lint/implicit_string_concatenation.rb#53 + # source://rubocop/lib/rubocop/cop/lint/implicit_string_concatenation.rb#59 def each_bad_cons(node); end - # source://rubocop/lib/rubocop/cop/lint/implicit_string_concatenation.rb#68 + # source://rubocop/lib/rubocop/cop/lint/implicit_string_concatenation.rb#74 def ending_delimiter(str); end - # source://rubocop/lib/rubocop/cop/lint/implicit_string_concatenation.rb#94 + # source://rubocop/lib/rubocop/cop/lint/implicit_string_concatenation.rb#100 def str_content(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/implicit_string_concatenation.rb#78 + # source://rubocop/lib/rubocop/cop/lint/implicit_string_concatenation.rb#84 def string_literal?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/implicit_string_concatenation.rb#82 + # source://rubocop/lib/rubocop/cop/lint/implicit_string_concatenation.rb#88 def string_literals?(node1, node2); end end @@ -19970,16 +20048,19 @@ class RuboCop::Cop::Lint::ItWithoutArgumentsInBlock < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/it_without_arguments_in_block.rb#48 + # source://rubocop/lib/rubocop/cop/lint/it_without_arguments_in_block.rb#41 def deprecated_it_method?(node); end - # source://rubocop/lib/rubocop/cop/lint/it_without_arguments_in_block.rb#33 - def on_block(node); end + # source://rubocop/lib/rubocop/cop/lint/it_without_arguments_in_block.rb#34 + def on_send(node); end end # source://rubocop/lib/rubocop/cop/lint/it_without_arguments_in_block.rb#30 RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::MSG = T.let(T.unsafe(nil), String) +# source://rubocop/lib/rubocop/cop/lint/it_without_arguments_in_block.rb#32 +RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks uses of lambda without a literal block. # It emulates the following warning in Ruby 3.0: # @@ -20200,57 +20281,60 @@ class RuboCop::Cop::Lint::LiteralInInterpolation < ::RuboCop::Cop::Base private - # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#58 + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#60 def autocorrected_value(node); end - # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#104 + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#127 def autocorrected_value_for_array(node); end - # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#110 + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#133 def autocorrected_value_for_hash(node); end - # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#80 + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#103 def autocorrected_value_for_string(node); end - # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#88 + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#111 def autocorrected_value_for_symbol(node); end - # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#121 + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#144 def autocorrected_value_in_hash(node); end - # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#95 + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#118 def autocorrected_value_in_hash_for_symbol(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#151 + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#174 def ends_heredoc_line?(node); end + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#82 + def handle_special_regexp_chars(begin_node, value); end + # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#159 + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#182 def in_array_percent_literal?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#44 + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#46 def offending?(node); end # Does node print its own source when converted to a string? # # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#142 + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#165 def prints_as_self?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#147 + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#170 def space_literal?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#52 + # source://rubocop/lib/rubocop/cop/lint/literal_in_interpolation.rb#54 def special_keyword?(node); end end @@ -21553,28 +21637,28 @@ class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#61 + # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#60 def chained_calls?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#49 - def first_argument_block_type?(first_arg); end + # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#56 + def compound_range?(first_arg); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#57 - def first_argument_starts_with_left_parenthesis?(node); end + # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#47 + def first_argument_block_type?(first_arg); end - # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#86 + # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#85 def space_range(expr, space_length); end - # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#70 + # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#69 def spaces_before_left_parenthesis(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#66 + # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#65 def ternary_expression?(node); end # @return [Boolean] @@ -21584,7 +21668,7 @@ class RuboCop::Cop::Lint::ParenthesesAsGroupedExpression < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#53 + # source://rubocop/lib/rubocop/cop/lint/parentheses_as_grouped_expression.rb#51 def valid_first_argument?(first_arg); end end @@ -23003,58 +23087,99 @@ RuboCop::Cop::Lint::SafeNavigationChain::MSG = T.let(T.unsafe(nil), String) # source://rubocop/lib/rubocop/cop/lint/safe_navigation_chain.rb#30 RuboCop::Cop::Lint::SafeNavigationChain::PLUS_MINUS_METHODS = T.let(T.unsafe(nil), Array) -# Check to make sure that if safe navigation is used for a method -# call in an `&&` or `||` condition that safe navigation is used for all -# method calls on that same object. +# Check to make sure that if safe navigation is used in an `&&` or `||` condition, +# consistent and appropriate safe navigation, without excess or deficiency, +# is used for all method calls on the same object. # # @example # # bad -# foo&.bar && foo.baz +# foo&.bar && foo&.baz # -# # bad -# foo.bar || foo&.baz +# # good +# foo&.bar && foo.baz # # # bad -# foo&.bar && (foobar.baz || foo.baz) +# foo.bar && foo&.baz # # # good # foo.bar && foo.baz # +# # bad +# foo&.bar || foo.baz +# # # good # foo&.bar || foo&.baz # +# # bad +# foo.bar || foo&.baz +# # # good +# foo.bar || foo.baz +# +# # bad # foo&.bar && (foobar.baz || foo&.baz) # -# source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#29 +# # good +# foo&.bar && (foobar.baz || foo.baz) +# +# source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#41 class RuboCop::Cop::Lint::SafeNavigationConsistency < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::NilMethods extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#42 - def check(node); end + # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#48 + def on_and(node); end - # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#36 - def on_csend(node); end + # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#48 + def on_or(node); end private - # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#61 - def autocorrect(corrector, node); end + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#96 + def already_appropriate_call?(operand, dot_op); end # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#67 - def location(node, unsafe_method_call); end + def collect_operands(node, operand_nodes); end + + # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#83 + def find_consistent_parts(grouped_operands); end + + # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#120 + def most_left_indices(grouped_operands); end + + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#150 + def nilable?(node); end + + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#134 + def operand_in_and?(node); end + + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#142 + def operand_in_or?(node); end + + # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#111 + def operand_nodes(operand, operand_nodes); end - # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#71 - def top_conditional_ancestor(node); end + # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#74 + def receiver_name_as_key(method, fully_receivers); end - # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#82 - def unsafe_method_calls(method_calls, safe_nav_receiver); end + # source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#100 + def register_offense(operand, dot_operator); end end -# source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#34 -RuboCop::Cop::Lint::SafeNavigationConsistency::MSG = T.let(T.unsafe(nil), String) +# source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#45 +RuboCop::Cop::Lint::SafeNavigationConsistency::USE_DOT_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop/lib/rubocop/cop/lint/safe_navigation_consistency.rb#46 +RuboCop::Cop::Lint::SafeNavigationConsistency::USE_SAFE_NAVIGATION_MSG = T.let(T.unsafe(nil), String) # Checks to make sure safe navigation isn't used with `empty?` in # a conditional. @@ -24842,33 +24967,46 @@ RuboCop::Cop::Lint::UriEscapeUnescape::MSG = T.let(T.unsafe(nil), String) # source://rubocop/lib/rubocop/cop/lint/uri_escape_unescape.rb#48 RuboCop::Cop::Lint::UriEscapeUnescape::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Identifies places where `URI.regexp` is obsolete and should -# not be used. Instead, use `URI::DEFAULT_PARSER.make_regexp`. +# Identifies places where `URI.regexp` is obsolete and should not be used. +# +# For Ruby 3.3 or lower, use `URI::DEFAULT_PARSER.make_regexp`. +# For Ruby 3.4 or higher, use `URI::RFC2396_PARSER.make_regexp`. +# +# NOTE: If you need to support both Ruby 3.3 and lower as well as Ruby 3.4 and higher, +# consider manually changing the code as follows: +# +# [source,ruby] +# ---- +# defined?(URI::RFC2396_PARSER) ? URI::RFC2396_PARSER : URI::DEFAULT_PARSER +# ---- # # @example # # bad # URI.regexp('http://example.com') # -# # good +# # good - Ruby 3.3 or lower # URI::DEFAULT_PARSER.make_regexp('http://example.com') # -# source://rubocop/lib/rubocop/cop/lint/uri_regexp.rb#16 +# # good - Ruby 3.4 or higher +# URI::RFC2396_PARSER.make_regexp('http://example.com') +# +# source://rubocop/lib/rubocop/cop/lint/uri_regexp.rb#29 class RuboCop::Cop::Lint::UriRegexp < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/lint/uri_regexp.rb#23 + # source://rubocop/lib/rubocop/cop/lint/uri_regexp.rb#40 def on_send(node); end + + # source://rubocop/lib/rubocop/cop/lint/uri_regexp.rb#36 + def uri_constant?(param0 = T.unsafe(nil)); end end -# source://rubocop/lib/rubocop/cop/lint/uri_regexp.rb#19 +# source://rubocop/lib/rubocop/cop/lint/uri_regexp.rb#32 RuboCop::Cop::Lint::UriRegexp::MSG = T.let(T.unsafe(nil), String) -# source://rubocop/lib/rubocop/cop/lint/uri_regexp.rb#21 +# source://rubocop/lib/rubocop/cop/lint/uri_regexp.rb#33 RuboCop::Cop::Lint::UriRegexp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop/lib/rubocop/cop/lint/uri_regexp.rb#20 -RuboCop::Cop::Lint::UriRegexp::URI_CONSTANTS = T.let(T.unsafe(nil), Array) - # Checks for redundant access modifiers, including those with no # code, those which are repeated, and leading `public` modifiers in a # class or module body. Conditionally-defined methods are considered as @@ -28159,10 +28297,10 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#111 def add_offenses_for_token(token, word_locations); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#167 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#176 def add_to_flagged_term_hash(regex_string, term, term_definition); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#193 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#202 def array_to_ignorecase_regex(strings); end # @return [Boolean] @@ -28170,55 +28308,58 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#126 def check_token?(type); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#243 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#252 def create_message(word, message = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#217 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#226 def create_multiple_word_message_for_file(words); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#213 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#222 def create_single_word_message_for_file(word); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#189 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#198 def ensure_regex_string(regex); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#160 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#169 def extract_regexp(term, term_definition); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#251 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#260 def find_flagged_term(word); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#265 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#274 def format_suggestions(suggestions); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#197 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#206 def investigate_filepath; end # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#100 def investigate_tokens; end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#231 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#240 def mask_input(str); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#280 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#289 def offense_range(token, word); end + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#160 + def preferred_sole_term(suggestions); end + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#130 def preprocess_check_config; end # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#144 def preprocess_flagged_terms; end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#258 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#267 def preprocess_suggestions(suggestions); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#179 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#188 def process_allowed_regex(allowed); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#221 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#230 def scan_for_words(input); end - # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#174 + # source://rubocop/lib/rubocop/cop/naming/inclusive_language.rb#183 def set_regexes(flagged_term_strings, allowed_strings); end end @@ -29077,8 +29218,8 @@ class RuboCop::Cop::Offense def cop_name; end # @api public - # @return [Boolean] whether this offense can be automatically corrected via - # autocorrect or a todo. + # @return [Boolean] whether this offense can be automatically corrected via autocorrect. + # This includes todo comments, for example when requested with `--disable-uncorrectable`. # # source://rubocop/lib/rubocop/cop/offense.rb#102 def correctable?; end @@ -30580,64 +30721,63 @@ end module RuboCop::Cop::StatementModifier include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp private - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#79 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#80 def code_after(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#103 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#104 def comment_disables_cop?(comment); end - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#71 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#72 def first_line_comment(node); end - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#58 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#57 def if_body_source(if_body); end - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#44 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#43 def length_in_modifier_form(node); end - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#97 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#98 def max_line_length; end - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#67 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#66 def method_source(if_body); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#38 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#37 def modifier_fits_on_single_line?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#27 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#26 def non_eligible_body?(body); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#34 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#33 def non_eligible_condition?(condition); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#20 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#19 def non_eligible_node?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#85 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#86 def parenthesize?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#12 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#11 def single_line_as_modifier?(node); end - # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#51 + # source://rubocop/lib/rubocop/cop/mixin/statement_modifier.rb#50 def to_modifier_form(node); end end @@ -30759,6 +30899,8 @@ module RuboCop::Cop::Style; end # class Foo # # private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES # # end # @example AllowModifiersOnSymbols: false @@ -30766,6 +30908,8 @@ module RuboCop::Cop::Style; end # class Foo # # private :bar, :baz +# private *%i[qux quux] +# private *METHOD_NAMES # # end # @example AllowModifiersOnAttrs: true (default) @@ -30795,101 +30939,106 @@ module RuboCop::Cop::Style; end # # end # -# source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#109 +# source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#113 class RuboCop::Cop::Style::AccessModifierDeclarations < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#135 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#141 def access_modifier_with_attr?(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#130 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#134 def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#140 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#146 def on_send(node); end private # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#195 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#205 def access_modifier_is_inlined?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#199 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#209 def access_modifier_is_not_inlined?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#177 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#187 def allow_modifiers_on_attrs?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#173 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#183 def allow_modifiers_on_symbols?(node); end - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#158 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#164 def autocorrect(corrector, node); end - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#269 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#279 def def_source(node, def_node); end - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#230 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#240 def find_argument_less_modifier_node(node); end - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#219 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#229 def find_corresponding_def_node(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#187 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#197 def group_style?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#191 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#201 def inline_style?; end - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#261 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#271 def insert_inline_modifier(corrector, node, modifier_name); end - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#209 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#219 def message(range); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#181 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#191 def offense?(node); end - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#265 + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#179 + def percent_symbol_array?(node); end + + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#275 def remove_node(corrector, node); end - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#244 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#254 def replace_def(corrector, node, def_node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#203 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#213 def right_siblings_same_inline_method?(node); end - # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#238 + # source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#248 def select_grouped_def_nodes(node); end end -# source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#127 +# source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#131 RuboCop::Cop::Style::AccessModifierDeclarations::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#115 +# source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#119 RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#120 +# source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#124 RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#125 +# source://rubocop/lib/rubocop/cop/style/access_modifier_declarations.rb#129 RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for grouping of accessors in `class` and `module` bodies. @@ -30899,6 +31048,9 @@ RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsa # NOTE: If there is a method call before the accessor method it is always allowed # as it might be intended like Sorbet. # +# NOTE: If there is a RBS::Inline annotation comment just after the accessor method +# it is always allowed. +# # @example EnforcedStyle: grouped (default) # # bad # class Foo @@ -30935,73 +31087,73 @@ RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsa # attr_reader :baz # end # -# source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#50 +# source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#53 class RuboCop::Cop::Style::AccessorGrouping < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::VisibilityHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#59 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#62 def on_class(node); end - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#59 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#62 def on_module(node); end - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#59 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#62 def on_sclass(node); end private - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#82 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#85 def autocorrect(corrector, node); end - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#71 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#74 def check(send_node); end - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#114 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#122 def class_send_elements(class_node); end - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#157 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#165 def group_accessors(node, accessors); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#96 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#99 def groupable_accessor?(node); end - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#134 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#142 def groupable_sibling_accessors(send_node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#126 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#134 def grouped_style?; end - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#143 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#151 def message(send_node); end - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#148 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#156 def preferred_accessors(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#91 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#94 def previous_line_comment?(node); end - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#163 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#171 def separate_accessors(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#130 + # source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#138 def separated_style?; end end -# source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#56 +# source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#59 RuboCop::Cop::Style::AccessorGrouping::GROUPED_MSG = T.let(T.unsafe(nil), String) -# source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#57 +# source://rubocop/lib/rubocop/cop/style/accessor_grouping.rb#60 RuboCop::Cop::Style::AccessorGrouping::SEPARATED_MSG = T.let(T.unsafe(nil), String) # Enforces the use of either `#alias` or `#alias_method` @@ -31329,38 +31481,38 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base private - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#187 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#188 def add_forward_all_offenses(node, send_classifications, forwardable_args); end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#358 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#366 def add_parens_if_missing(node, corrector); end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#214 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#215 def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#350 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#352 def allow_only_rest_arguments?; end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#338 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#340 def arguments_range(node, first_node); end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#265 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#267 def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#250 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#252 def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#502 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#542 def explicit_block_name?; end # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#170 def extract_forwardable_args(args); end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#240 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#242 def non_splat_or_block_pass_lvar_references(body); end # @return [Boolean] @@ -31370,30 +31522,35 @@ class RuboCop::Cop::Style::ArgumentsForwarding < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#294 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#296 def outside_block?(node); end # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#174 def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#284 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#286 def redundant_named_arg(arg, config_name, keyword); end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#327 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#329 def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#300 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#302 def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#316 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#318 def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#308 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#310 def register_forward_kwargs_offense(add_parens, def_arguments_or_send, kwrest_arg_or_splat); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#354 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#360 + def send_inside_block?(send_classifications); end + + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#356 def use_anonymous_forwarding?; end class << self @@ -31422,115 +31579,133 @@ RuboCop::Cop::Style::ArgumentsForwarding::KWARGS_MSG = T.let(T.unsafe(nil), Stri # Classifies send nodes for possible rest/kwrest/all (including block) forwarding. # -# source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#365 +# source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#374 class RuboCop::Cop::Style::ArgumentsForwarding::SendNodeClassifier extend ::RuboCop::AST::NodePattern::Macros # @return [SendNodeClassifier] a new instance of SendNodeClassifier # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#377 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#403 def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#405 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#431 def classification; end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#372 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#387 + def def_all_anonymous_args?(param0 = T.unsafe(nil)); end + + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#381 def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#399 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#425 def forwarded_block_arg; end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#375 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#384 def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#393 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#419 def forwarded_kwrest_arg; end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#387 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#413 def forwarded_rest_arg; end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#369 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#378 def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#396 + def send_all_anonymous_args?(param0 = T.unsafe(nil)); end + private # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#473 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#513 def additional_kwargs?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#469 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#509 def additional_kwargs_or_forwarded_kwargs?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#483 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#523 def allow_offense_for_no_block?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#454 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#494 def any_arg_referenced?; end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#438 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#478 def arguments; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#417 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#446 def can_forward_all?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#477 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#517 def forward_additional_kwargs?; end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#434 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#474 def forwarded_rest_and_kwrest_args; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#496 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#536 def missing_rest_arg_or_kwrest_arg?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#487 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#527 def no_additional_args?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#462 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#502 def no_post_splat_args?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#430 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#470 def offensive_block_forwarding?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#450 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#490 def referenced_block_arg?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#446 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#486 def referenced_kwrest_arg?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#442 + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#482 def referenced_rest_arg?; end + # def foo(a = 41, ...) is a syntax error in 3.0. + # # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#426 - def ruby_32_missing_rest_or_kwest?; end - # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#458 + def ruby_30_or_lower_optarg?; end + + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#462 + def ruby_32_only_anonymous_forwarding?; end + + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#466 + def ruby_32_or_higher_missing_rest_or_kwest?; end + + # source://rubocop/lib/rubocop/cop/style/arguments_forwarding.rb#498 def target_ruby_version; end end @@ -32268,165 +32443,175 @@ class RuboCop::Cop::Style::BlockDelimiters < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#194 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#198 def on_block(node); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#194 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#198 def on_numblock(node); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#179 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#183 def on_send(node); end private # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#459 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#472 def array_or_range?(node); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#208 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#212 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#463 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#476 def begin_required?(block_node); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#236 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#240 def braces_for_chaining_message(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#400 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#413 def braces_for_chaining_style?(node); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#248 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#252 def braces_required_message(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#377 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#390 def braces_required_method?(method_name); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#381 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#394 def braces_required_methods; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#410 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#423 def braces_style?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#455 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#468 def conditional?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#414 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#427 def correction_would_break_code?(node); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#309 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#313 def end_of_chain(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#424 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#437 def functional_block?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#420 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#433 def functional_method?(method_name); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#326 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#330 def get_blocks(node, &block); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#385 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#398 def line_count_based_block_style?(node); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#218 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#222 def line_count_based_message(node); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#252 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#256 def message(node); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#300 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#304 def move_comment_before_block(corrector, comment, block_node, closing_brace); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#432 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#445 def procedural_method?(method_name); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#428 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#441 def procedural_oneliners_may_have_braces?; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#344 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#349 def proper_block_style?(node); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#316 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#320 def remove_trailing_whitespace(corrector, range, comment); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#263 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#267 def replace_braces_with_do_end(corrector, loc); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#279 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#283 def replace_do_end_with_braces(corrector, node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#356 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#362 def require_braces?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#448 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#370 + def require_do_end?(node); end + + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#461 def return_value_of_scope?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#436 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#449 def return_value_used?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#389 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#402 def semantic_block_style?(node); end - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#226 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#230 def semantic_message(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#364 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#377 def special_method?(method_name); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#370 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#383 def special_method_proper_block_style?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#296 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#300 def whitespace_after?(range, length = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#292 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#296 def whitespace_before?(range); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#322 + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#326 def with_block?(node); end + + class << self + # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#179 + def autocorrect_incompatible_with; end + end end # source://rubocop/lib/rubocop/cop/style/block_delimiters.rb#175 @@ -33130,6 +33315,7 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # array.reject(&:nil?) # array.reject { |e| e.nil? } # array.select { |e| !e.nil? } +# array.filter { |e| !e.nil? } # array.grep_v(nil) # array.grep_v(NilClass) # @@ -33138,10 +33324,9 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # bad # hash.reject!(&:nil?) -# array.delete_if(&:nil?) # hash.reject! { |k, v| v.nil? } -# array.delete_if { |e| e.nil? } # hash.select! { |k, v| !v.nil? } +# hash.filter! { |k, v| !v.nil? } # # # good # hash.compact! @@ -33156,22 +33341,22 @@ class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop/lib/rubocop/cop/style/collection_compact.rb#85 + # source://rubocop/lib/rubocop/cop/style/collection_compact.rb#86 def grep_v_with_nil?(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/style/collection_compact.rb#89 + # source://rubocop/lib/rubocop/cop/style/collection_compact.rb#90 def on_csend(node); end - # source://rubocop/lib/rubocop/cop/style/collection_compact.rb#89 + # source://rubocop/lib/rubocop/cop/style/collection_compact.rb#90 def on_send(node); end - # source://rubocop/lib/rubocop/cop/style/collection_compact.rb#64 + # source://rubocop/lib/rubocop/cop/style/collection_compact.rb#65 def reject_method?(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/style/collection_compact.rb#57 + # source://rubocop/lib/rubocop/cop/style/collection_compact.rb#58 def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/style/collection_compact.rb#74 + # source://rubocop/lib/rubocop/cop/style/collection_compact.rb#75 def select_method?(param0 = T.unsafe(nil)); end private @@ -33191,6 +33376,9 @@ class RuboCop::Cop::Style::CollectionCompact < ::RuboCop::Cop::Base def to_enum_method?(node); end end +# source://rubocop/lib/rubocop/cop/style/collection_compact.rb#53 +RuboCop::Cop::Style::CollectionCompact::FILTER_METHODS = T.let(T.unsafe(nil), Array) + # source://rubocop/lib/rubocop/cop/style/collection_compact.rb#50 RuboCop::Cop::Style::CollectionCompact::MSG = T.let(T.unsafe(nil), String) @@ -33333,6 +33521,9 @@ RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) # can be combined into a single loop. It is very likely that combining them # will make the code more efficient and more concise. # +# NOTE: Autocorrection is not applied when the block variable names differ in separate loops, +# as it is impossible to determine which variable name should be prioritized. +# # @example # # bad # def method @@ -33378,44 +33569,44 @@ RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) # each_slice(3) { |slice| do_something(slice) } # end # -# source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#59 +# source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#62 class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#64 + # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#68 def on_block(node); end - # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#77 + # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#84 def on_for(node); end - # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#64 + # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#68 def on_numblock(node); end private # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#88 + # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#95 def collection_looping_method?(node); end - # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#105 + # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#112 def combine_with_left_sibling(corrector, node); end - # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#112 + # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#119 def correct_end_of_block(corrector, node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#93 + # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#100 def same_collection_looping_block?(node, sibling); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#101 + # source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#108 def same_collection_looping_for?(node, sibling); end end -# source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#62 +# source://rubocop/lib/rubocop/cop/style/combinable_loops.rb#65 RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) # Enforces using `` or %x around command literals. @@ -33664,7 +33855,7 @@ RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), S # These keywords are: `class`, `module`, `def`, `begin`, `end`. # # Note that some comments -# are allowed. +# and RBS::Inline annotation comments are allowed. # # Autocorrection removes comments from `end` keyword and keeps comments # for `class`, `module`, `def` and `begin` above the keyword. @@ -33708,10 +33899,15 @@ class RuboCop::Cop::Style::CommentedKeyword < ::RuboCop::Cop::Base # source://rubocop/lib/rubocop/cop/style/commented_keyword.rb#83 def offensive?(comment); end + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/style/commented_keyword.rb#95 + def rbs_inline_annotation?(line, comment); end + # source://rubocop/lib/rubocop/cop/style/commented_keyword.rb#70 def register_offense(comment, matched_keyword); end - # source://rubocop/lib/rubocop/cop/style/commented_keyword.rb#89 + # source://rubocop/lib/rubocop/cop/style/commented_keyword.rb#91 def source_line(comment); end end @@ -37523,10 +37719,10 @@ RuboCop::Cop::Style::GlobalVars::MSG = T.let(T.unsafe(nil), String) # # source://rubocop/lib/rubocop/cop/style/guard_clause.rb#114 class RuboCop::Cop::Style::GuardClause < ::RuboCop::Cop::Base - include ::RuboCop::Cop::Alignment - include ::RuboCop::Cop::LineLengthHelp include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::MinBodyLength + include ::RuboCop::Cop::Alignment + include ::RuboCop::Cop::LineLengthHelp include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector @@ -37794,80 +37990,83 @@ class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base include ::RuboCop::Cop::Lint::UnusedArgument extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#74 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#79 def check_unused_block_args(node, key, value); end # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#51 def each_arguments(param0 = T.unsafe(nil)); end + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#61 + def hash_mutated?(param0 = T.unsafe(nil), param1); end + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#46 def kv_each(param0 = T.unsafe(nil)); end # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#56 def kv_each_with_block_pass(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#60 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#65 def on_block(node); end - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#95 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#100 def on_block_pass(node); end - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#60 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#65 def on_numblock(node); end private - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#180 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#186 def check_argument(variable); end - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#204 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#210 def correct_args(node, corrector); end - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#190 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#196 def correct_implicit(node, corrector, method_name); end - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#195 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#201 def correct_key_value_each(node, corrector); end - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#176 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#182 def format_message(method_name, current); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#103 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#108 def handleable?(node); end - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#211 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#217 def kv_range(outer_node); end - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#133 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#139 def message(prefer, method_name, unused_code); end - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#139 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#145 def register_each_args_offense(node, message, prefer, unused_range); end - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#110 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#116 def register_kv_offense(target, method); end - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#146 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#152 def register_kv_with_block_pass_offense(node, target, method); end - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#167 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#173 def root_receiver(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#121 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#127 def unused_block_arg_exist?(node, block_arg); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#157 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#163 def use_array_converter_method_as_preceding?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#186 + # source://rubocop/lib/rubocop/cop/style/hash_each_methods.rb#192 def used?(arg); end end @@ -38091,7 +38290,7 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # good # {a: 1, b: 2} # {:c => 3, 'd' => 4} -# @example EnforcedShorthandSyntax: always (default) +# @example EnforcedShorthandSyntax: always # # # bad # {foo: foo, bar: bar} @@ -38105,7 +38304,7 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # # good # {foo: foo, bar: bar} -# @example EnforcedShorthandSyntax: either +# @example EnforcedShorthandSyntax: either (default) # # # good # {foo: foo, bar: bar} @@ -38638,9 +38837,9 @@ RuboCop::Cop::Style::IfInsideElse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::IfUnlessModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::StatementModifier include ::RuboCop::Cop::AllowedPattern + include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::CommentsHelp extend ::RuboCop::Cop::AutoCorrector @@ -38784,7 +38983,6 @@ RuboCop::Cop::Style::IfUnlessModifier::MSG_USE_NORMAL = T.let(T.unsafe(nil), Str class RuboCop::Cop::Style::IfUnlessModifierOfIfUnless < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector @@ -38925,10 +39123,10 @@ class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base # source://rubocop/lib/rubocop/cop/style/if_with_semicolon.rb#54 def autocorrect(corrector, node); end - # source://rubocop/lib/rubocop/cop/style/if_with_semicolon.rb#95 + # source://rubocop/lib/rubocop/cop/style/if_with_semicolon.rb#93 def build_else_branch(second_condition); end - # source://rubocop/lib/rubocop/cop/style/if_with_semicolon.rb#85 + # source://rubocop/lib/rubocop/cop/style/if_with_semicolon.rb#84 def build_expression(expr); end # source://rubocop/lib/rubocop/cop/style/if_with_semicolon.rb#75 @@ -38940,6 +39138,11 @@ class RuboCop::Cop::Style::IfWithSemicolon < ::RuboCop::Cop::Base # source://rubocop/lib/rubocop/cop/style/if_with_semicolon.rb#66 def replacement(node); end + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/style/if_with_semicolon.rb#113 + def require_argument_parentheses?(node); end + # @return [Boolean] # # source://rubocop/lib/rubocop/cop/style/if_with_semicolon.rb#62 @@ -39993,8 +40196,10 @@ RuboCop::Cop::Style::MapCompactWithConditionalBlock::RESTRICT_ON_SEND = T.let(T. # return value of `Enumerable#map` is an `Array`. They are not autocorrected # when a return value could be used because these types differ. # -# NOTE: It only detects when the mapping destination is a local variable -# initialized as an empty array and referred to only by the pushing operation. +# NOTE: It only detects when the mapping destination is either: +# * a local variable initialized as an empty array and referred to only by the +# pushing operation; +# * or, if it is the single block argument to a `[].tap` block. # This is because, if not, it's challenging to statically guarantee that the # mapping destination variable remains an empty array: # @@ -40016,74 +40221,93 @@ RuboCop::Cop::Style::MapCompactWithConditionalBlock::RESTRICT_ON_SEND = T.let(T. # # good # dest = src.map { |e| e * 2 } # +# # bad +# [].tap do |dest| +# src.each { |e| dest << e * 2 } +# end +# +# # good +# dest = src.map { |e| e * 2 } +# # # good - contains another operation # dest = [] # src.each { |e| dest << e * 2; puts e } # dest # -# source://rubocop/lib/rubocop/cop/style/map_into_array.rb#50 +# source://rubocop/lib/rubocop/cop/style/map_into_array.rb#60 class RuboCop::Cop::Style::MapIntoArray < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#84 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#104 def after_leaving_scope(scope, _variable_table); end - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#57 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#67 def each_block_with_push?(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#66 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#76 def empty_array_asgn?(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#78 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#88 + def empty_array_tap(param0 = T.unsafe(nil)); end + + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#98 def lvar_ref?(param0 = T.unsafe(nil), param1); end - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#88 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#108 def on_block(node); end - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#88 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#108 def on_numblock(node); end private - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#162 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#208 def correct_push_node(corrector, push_node); end - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#170 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#216 def correct_return_value_handling(corrector, block, dest_var); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#117 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#151 def dest_used_only_for_mapping?(block, dest_var, asgn); end - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#111 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#145 def find_closest_assignment(block, dest_var); end - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#103 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#128 def find_dest_var(block); end - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#136 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#176 def new_method_name; end - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#125 + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#136 + def offending_empty_array_tap?(node, dest_var); end + + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#159 def register_offense(block, dest_var, asgn); end - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#155 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#195 def remove_assignment(corrector, asgn); end + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#202 + def remove_tap(corrector, node, block_node); end + # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#142 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#182 def return_value_used?(node); end class << self - # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#80 + # source://rubocop/lib/rubocop/cop/style/map_into_array.rb#100 def joining_forces; end end end -# source://rubocop/lib/rubocop/cop/style/map_into_array.rb#54 +# source://rubocop/lib/rubocop/cop/style/map_into_array.rb#64 RuboCop::Cop::Style::MapIntoArray::MSG = T.let(T.unsafe(nil), String) # Looks for uses of `map.to_h` or `collect.to_h` that could be @@ -40369,6 +40593,7 @@ class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses + include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses extend ::RuboCop::Cop::AutoCorrector @@ -40404,114 +40629,116 @@ end # # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#9 module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses + include ::RuboCop::Cop::RangeHelp + private # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#75 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 def allowed_camel_case_method_call?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#179 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#184 def allowed_chained_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#175 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#180 def allowed_multiline_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#85 def allowed_string_interpolation_method_call?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#188 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#193 def ambiguous_literal?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#217 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#222 def assigned_before?(node, target); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#225 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#230 def assignment_in_condition?(node); end - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#32 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#34 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#156 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#161 def call_as_argument_or_chain?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#149 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#154 def call_in_argument_with_block?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#105 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#110 def call_in_literals?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#116 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#121 def call_in_logical_operators?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#162 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#167 def call_in_match_pattern?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#125 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#130 def call_in_optional_arguments?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#129 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#134 def call_in_single_line_inheritance?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#133 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#138 def call_with_ambiguous_arguments?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#145 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#150 def call_with_braced_block?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#235 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#240 def forwards_anonymous_rest_arguments?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#209 def hash_literal?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#168 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#173 def hash_literal_in_arguments?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#45 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#50 def inside_endless_method_def?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#226 def inside_string_interpolation?(node); end # Require hash value omission be enclosed in parentheses to prevent the following issue: @@ -40519,75 +40746,75 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#59 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#64 def last_expression?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#92 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#97 def legitimate_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#205 def logical_operator?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#67 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#72 def method_call_before_constant_resolution?(node); end - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#41 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#46 def offense_range(node); end - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#16 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#18 def omit_parentheses(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#85 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#90 def parentheses_at_the_end_of_multiline_call?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#208 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#213 def regexp_slash_literal?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#50 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#55 def require_parentheses_for_hash_value_omission?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#192 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#197 def splat?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#71 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#76 def super_call_without_arguments?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#63 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#68 def syntax_like_method_call?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#196 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#201 def ternary_if?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212 + # source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#217 def unary_literal?(node); end end -# source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#11 +# source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#13 RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::OMIT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#10 +# source://rubocop/lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#12 RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses::TRAILING_WHITESPACE_REGEX = T.let(T.unsafe(nil), Regexp) # Style require_parentheses @@ -41480,7 +41707,6 @@ RuboCop::Cop::Style::MultilineBlockChain::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::MultilineIfModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector @@ -42006,7 +42232,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-sorbet/0.8.5lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 + # source://rubocop-sorbet/0.8.6lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#18 def on_assignment(value); end # source://rubocop/lib/rubocop/cop/style/mutable_constant.rb#127 @@ -42024,7 +42250,7 @@ class RuboCop::Cop::Style::MutableConstant < ::RuboCop::Cop::Base # source://rubocop/lib/rubocop/cop/style/mutable_constant.rb#217 def splat_value(param0 = T.unsafe(nil)); end - # source://rubocop-sorbet/0.8.5lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 + # source://rubocop-sorbet/0.8.6lib/rubocop/cop/sorbet/mutable_constant_sorbet_aware_behaviour.rb#12 def t_let(param0 = T.unsafe(nil)); end private @@ -43480,42 +43706,42 @@ class RuboCop::Cop::Style::OneLineConditional < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#77 + # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#81 def always_multiline?; end - # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#59 + # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#63 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#81 + # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#85 def cannot_replace_to_ternary?(node); end - # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#93 + # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#97 def expr_replacement(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#114 + # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#118 def keyword_with_changed_precedence?(node); end - # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#55 + # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#59 def message(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#107 + # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#111 def method_call_with_changed_precedence?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#99 + # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#103 def requires_parentheses?(node); end - # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#67 + # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#71 def ternary_correction(node); end - # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#85 + # source://rubocop/lib/rubocop/cop/style/one_line_conditional.rb#89 def ternary_replacement(node); end end @@ -43581,27 +43807,35 @@ RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::OperatorMethodCall < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/style/operator_method_call.rb#27 + # source://rubocop/lib/rubocop/cop/style/operator_method_call.rb#30 def on_send(node); end private # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/operator_method_call.rb#53 - def anonymous_forwarding?(argument); end + # source://rubocop/lib/rubocop/cop/style/operator_method_call.rb#75 + def insert_space_after?(node); end + + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/style/operator_method_call.rb#58 + def invalid_syntax_argument?(argument); end # Checks for an acceptable case of `foo.+(bar).baz`. # # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/operator_method_call.rb#47 + # source://rubocop/lib/rubocop/cop/style/operator_method_call.rb#52 def method_call_with_parenthesized_arg?(argument); end - # source://rubocop/lib/rubocop/cop/style/operator_method_call.rb#60 + # source://rubocop/lib/rubocop/cop/style/operator_method_call.rb#64 def wrap_in_parentheses_if_chained(corrector, node); end end +# source://rubocop/lib/rubocop/cop/style/operator_method_call.rb#25 +RuboCop::Cop::Style::OperatorMethodCall::INVALID_SYNTAX_ARG_TYPES = T.let(T.unsafe(nil), Array) + # source://rubocop/lib/rubocop/cop/style/operator_method_call.rb#23 RuboCop::Cop::Style::OperatorMethodCall::MSG = T.let(T.unsafe(nil), String) @@ -44902,81 +45136,86 @@ class RuboCop::Cop::Style::RedundantBegin < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#72 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#76 def offensive_kwbegins(param0); end - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#84 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#88 def on_block(node); end - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#76 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#80 def on_def(node); end - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#76 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#80 def on_defs(node); end - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#95 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#99 def on_kwbegin(node); end - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#84 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#88 def on_numblock(node); end private # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#103 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#107 def allowable_kwbegin?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#177 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#181 def begin_block_has_multiline_statements?(node); end - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#169 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#173 def condition_range(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#181 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#185 def contain_rescue_or_ensure?(node); end - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#162 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#166 def correct_modifier_form_after_multiline_begin_block(corrector, node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#173 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#177 def empty_begin?(node); end - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#110 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#114 def register_offense(node); end - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#139 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#143 def remove_begin(corrector, offense_range, node); end - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#127 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#131 def replace_begin_with_statement(corrector, offense_range, node); end # Restore comments that occur between "begin" and "first_child". # These comments will be moved to above the assignment line. # - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#149 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#153 def restore_removed_comments(corrector, offense_range, node, first_child); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#156 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#160 def use_modifier_form_after_multiline_begin_block?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#194 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#198 def valid_begin_assignment?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#187 + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#191 def valid_context_using_only_begin?(node); end + + class << self + # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#71 + def autocorrect_incompatible_with; end + end end # source://rubocop/lib/rubocop/cop/style/redundant_begin.rb#69 @@ -46136,7 +46375,7 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base def ends_with_backslash_without_comment?(source_line); end # source://rubocop/lib/rubocop/cop/style/redundant_line_continuation.rb#163 - def find_node_for_line(line); end + def find_node_for_line(last_line); end # @return [Boolean] # @@ -47744,6 +47983,9 @@ class RuboCop::Cop::Style::RescueModifier < ::RuboCop::Cop::Base # source://rubocop/lib/rubocop/cop/style/rescue_modifier.rb#70 def correct_rescue_block(corrector, node, parenthesized); end + # source://rubocop/lib/rubocop/cop/style/rescue_modifier.rb#96 + def heredoc_end(node); end + # source://rubocop/lib/rubocop/cop/style/rescue_modifier.rb#86 def indentation_and_offset(node, parenthesized); end @@ -47930,7 +48172,8 @@ RuboCop::Cop::Style::ReturnNil::RETURN_MSG = T.let(T.unsafe(nil), String) # source://rubocop/lib/rubocop/cop/style/return_nil.rb#40 RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) -# Checks if `return` or `return nil` is used in predicate method definitions. +# Checks for predicate method definitions that return `nil`. +# A predicate method should only return a boolean value. # # @example # # bad @@ -47953,6 +48196,24 @@ RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) # # do_something? # end +# +# # bad +# def foo? +# if condition +# nil +# else +# true +# end +# end +# +# # good +# def foo? +# if condition +# false +# else +# true +# end +# end # @example AllowedMethods: ['foo?'] # # good # def foo? @@ -47968,31 +48229,48 @@ RuboCop::Cop::Style::ReturnNil::RETURN_NIL_MSG = T.let(T.unsafe(nil), String) # do_something? # end # -# source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#50 +# source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#69 class RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#81 def on_def(node); end - # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#62 + # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#81 def on_defs(node); end - # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#58 + # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#77 def return_nil?(param0 = T.unsafe(nil)); end private - # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#79 - def nil_node_at_the_end_of_method_body(body); end + # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#128 + def handle_if(if_node); end + + # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#113 + def handle_implicit_return_values(node); end + + # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#122 + def handle_nil(nil_node); end - # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#87 + # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#118 + def handle_return(return_node); end + + # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#94 + def last_node_of_type(node, type); end + + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#103 + def node_type?(node, type); end + + # source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#107 def register_offense(offense_node, replacement); end end -# source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#55 +# source://rubocop/lib/rubocop/cop/style/return_nil_in_predicate_method_definition.rb#74 RuboCop::Cop::Style::ReturnNilInPredicateMethodDefinition::MSG = T.let(T.unsafe(nil), String) # Transforms usages of a method call safeguarded by a non `nil` @@ -48071,6 +48349,9 @@ class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#128 + def and_inside_begin?(param0 = T.unsafe(nil)); end + # if format: (if checked_variable body nil) # unless format: (if checked_variable nil body) # @@ -48080,96 +48361,104 @@ class RuboCop::Cop::Style::SafeNavigation < ::RuboCop::Cop::Base # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#125 def not_nil_check?(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#133 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#149 def on_and(node); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#127 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#133 def on_if(node); end + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#173 + def report_offense(node, rhs, rhs_receiver, *removal_ranges, offense_range: T.unsafe(nil)); end + + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#131 + def strip_begin(param0 = T.unsafe(nil)); end + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#114 def ternary_safe_navigation_candidate(param0 = T.unsafe(nil)); end private - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#307 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#348 def add_safe_nav_to_all_methods_in_chain(corrector, start_method, method_chain); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#200 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#265 def allowed_if_condition?(node); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#154 - def autocorrect(corrector, node); end + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#210 + def and_parts(node); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#299 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#340 def begin_range(node, method_call); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#261 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#302 def chain_length(method_chain, method); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#139 - def check_node(node); end + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#192 + def collect_and_clauses(node); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#181 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#246 def comments(node); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#303 - def end_range(node, method_call); end + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#204 + def concat_nodes(nodes, and_node); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#166 - def extract_body(node); end + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#344 + def end_range(node, method_call); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#243 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#284 def extract_common_parts(method_chain, checked_variable); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#209 - def extract_parts(node); end - - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#233 - def extract_parts_from_and(node); end + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#231 + def extract_if_body(node); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#218 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#269 def extract_parts_from_if(node); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#251 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#292 def find_matching_receiver_invocation(method_chain, checked_variable); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#174 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#186 + def find_method_chain(node); end + + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#239 def handle_comments(corrector, node, method_call); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#320 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#362 def max_chain_length; end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#204 - def method_call(node); end - # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#295 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#336 def method_called?(send_node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#287 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#328 def negated?(send_node); end - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#187 + # @return [Boolean] + # + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#217 + def offending_node?(node, lhs_receiver, rhs, rhs_receiver); end + + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#252 def relevant_comment_ranges(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#281 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#322 def unsafe_method?(send_node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#269 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#310 def unsafe_method_used?(method_chain, method); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#150 + # source://rubocop/lib/rubocop/cop/style/safe_navigation.rb#227 def use_var_only_in_unless_modifier?(node, variable); end end @@ -48273,7 +48562,7 @@ RuboCop::Cop::Style::Sample::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # See https://bugs.ruby-lang.org/issues/17030 # # @example -# # bad (select or find_all) +# # bad (select, filter, or find_all) # array.select { |x| x.match? /regexp/ } # array.select { |x| /regexp/.match?(x) } # array.select { |x| x =~ /regexp/ } @@ -48294,53 +48583,53 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#79 + # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#81 def calls_lvar?(param0 = T.unsafe(nil), param1); end # Returns true if a node appears to return a hash # - # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#65 + # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#67 def creates_hash?(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#74 + # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#76 def env_const?(param0 = T.unsafe(nil)); end - # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#88 + # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#90 def on_csend(node); end - # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#88 + # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#90 def on_send(node); end - # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#56 + # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#58 def regexp_match?(param0 = T.unsafe(nil)); end private - # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#133 + # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#136 def extract_send_node(block_node); end - # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#146 + # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#149 def find_regexp(node, block); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#157 + # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#160 def match_predicate_without_receiver?(node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#142 + # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#145 def opposite?(regexp_method_send_node); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#107 + # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#110 def receiver_allowed?(node); end - # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#121 + # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#124 def register_offense(node, block_node, regexp, replacement); end - # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#113 + # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#116 def replacement(regexp_method_send_node, node); end end @@ -48350,7 +48639,7 @@ RuboCop::Cop::Style::SelectByRegexp::MSG = T.let(T.unsafe(nil), String) # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#52 RuboCop::Cop::Style::SelectByRegexp::OPPOSITE_REPLACEMENTS = T.let(T.unsafe(nil), Hash) -# source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#53 +# source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#55 RuboCop::Cop::Style::SelectByRegexp::REGEXP_METHODS = T.let(T.unsafe(nil), Set) # source://rubocop/lib/rubocop/cop/style/select_by_regexp.rb#51 @@ -51796,7 +52085,6 @@ RuboCop::Cop::Style::WhileUntilDo::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::WhileUntilModifier < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::LineLengthHelp - include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::StatementModifier extend ::RuboCop::Cop::AutoCorrector @@ -52382,138 +52670,138 @@ end # first the ones needed for autocorrection (if any), then the rest # (unless autocorrections happened). # -# source://rubocop/lib/rubocop/cop/team.rb#12 +# source://rubocop/lib/rubocop/cop/team.rb#13 class RuboCop::Cop::Team # @return [Team] a new instance of Team # - # source://rubocop/lib/rubocop/cop/team.rb#55 + # source://rubocop/lib/rubocop/cop/team.rb#61 def initialize(cops, config = T.unsafe(nil), options = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/team.rb#66 + # source://rubocop/lib/rubocop/cop/team.rb#72 def autocorrect?; end # Returns the value of attribute cops. # - # source://rubocop/lib/rubocop/cop/team.rb#51 + # source://rubocop/lib/rubocop/cop/team.rb#57 def cops; end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/team.rb#70 + # source://rubocop/lib/rubocop/cop/team.rb#76 def debug?; end # Returns the value of attribute errors. # - # source://rubocop/lib/rubocop/cop/team.rb#51 + # source://rubocop/lib/rubocop/cop/team.rb#57 def errors; end - # source://rubocop/lib/rubocop/cop/team.rb#122 + # source://rubocop/lib/rubocop/cop/team.rb#128 def external_dependency_checksum; end # @deprecated # - # source://rubocop/lib/rubocop/cop/team.rb#114 + # source://rubocop/lib/rubocop/cop/team.rb#120 def forces; end - # source://rubocop/lib/rubocop/cop/team.rb#76 + # source://rubocop/lib/rubocop/cop/team.rb#82 def inspect_file(processed_source); end # @return [Commissioner::InvestigationReport] # - # source://rubocop/lib/rubocop/cop/team.rb#85 + # source://rubocop/lib/rubocop/cop/team.rb#91 def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # Returns the value of attribute updated_source_file. # - # source://rubocop/lib/rubocop/cop/team.rb#51 + # source://rubocop/lib/rubocop/cop/team.rb#57 def updated_source_file; end # Returns the value of attribute updated_source_file. # - # source://rubocop/lib/rubocop/cop/team.rb#51 + # source://rubocop/lib/rubocop/cop/team.rb#57 def updated_source_file?; end # Returns the value of attribute warnings. # - # source://rubocop/lib/rubocop/cop/team.rb#51 + # source://rubocop/lib/rubocop/cop/team.rb#57 def warnings; end private - # source://rubocop/lib/rubocop/cop/team.rb#133 + # source://rubocop/lib/rubocop/cop/team.rb#139 def autocorrect(processed_source, report, original:, offset:); end - # source://rubocop/lib/rubocop/cop/team.rb#197 + # source://rubocop/lib/rubocop/cop/team.rb#203 def autocorrect_report(report, offset:, original:); end - # source://rubocop/lib/rubocop/cop/team.rb#152 + # source://rubocop/lib/rubocop/cop/team.rb#158 def be_ready; end - # source://rubocop/lib/rubocop/cop/team.rb#203 + # source://rubocop/lib/rubocop/cop/team.rb#209 def collate_corrections(report, offset:, original:); end - # source://rubocop/lib/rubocop/cop/team.rb#219 + # source://rubocop/lib/rubocop/cop/team.rb#225 def each_corrector(report); end - # source://rubocop/lib/rubocop/cop/team.rb#271 + # source://rubocop/lib/rubocop/cop/team.rb#277 def handle_error(error, location, cop); end - # source://rubocop/lib/rubocop/cop/team.rb#263 + # source://rubocop/lib/rubocop/cop/team.rb#269 def handle_warning(error, location); end # @return [Commissioner::InvestigationReport] # - # source://rubocop/lib/rubocop/cop/team.rb#166 + # source://rubocop/lib/rubocop/cop/team.rb#172 def investigate_partial(cops, processed_source, offset:, original:); end - # source://rubocop/lib/rubocop/cop/team.rb#246 + # source://rubocop/lib/rubocop/cop/team.rb#252 def process_errors(file, errors); end - # source://rubocop/lib/rubocop/cop/team.rb#160 + # source://rubocop/lib/rubocop/cop/team.rb#166 def reset; end # @return [Array] # - # source://rubocop/lib/rubocop/cop/team.rb#172 + # source://rubocop/lib/rubocop/cop/team.rb#178 def roundup_relevant_cops(processed_source); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/team.rb#188 + # source://rubocop/lib/rubocop/cop/team.rb#194 def support_target_rails_version?(cop); end # @return [Boolean] # - # source://rubocop/lib/rubocop/cop/team.rb#182 + # source://rubocop/lib/rubocop/cop/team.rb#188 def support_target_ruby_version?(cop); end - # source://rubocop/lib/rubocop/cop/team.rb#234 + # source://rubocop/lib/rubocop/cop/team.rb#240 def suppress_clobbering; end - # source://rubocop/lib/rubocop/cop/team.rb#240 + # source://rubocop/lib/rubocop/cop/team.rb#246 def validate_config; end class << self # @return [Array] needed for the given cops # - # source://rubocop/lib/rubocop/cop/team.rb#37 + # source://rubocop/lib/rubocop/cop/team.rb#43 def forces_for(cops); end # @return [Team] with cops assembled from the given `cop_classes` # - # source://rubocop/lib/rubocop/cop/team.rb#22 + # source://rubocop/lib/rubocop/cop/team.rb#28 def mobilize(cop_classes, config, options = T.unsafe(nil)); end # @return [Array] # - # source://rubocop/lib/rubocop/cop/team.rb#28 + # source://rubocop/lib/rubocop/cop/team.rb#34 def mobilize_cops(cop_classes, config, options = T.unsafe(nil)); end # @return [Team] # - # source://rubocop/lib/rubocop/cop/team.rb#14 + # source://rubocop/lib/rubocop/cop/team.rb#15 def new(cop_or_classes, config, options = T.unsafe(nil)); end end end @@ -54836,11 +55124,16 @@ module RuboCop::FileFinder # source://rubocop/lib/rubocop/file_finder.rb#20 def find_last_file_upwards(filename, start_dir, stop_dir = T.unsafe(nil)); end + # @api private + # + # source://rubocop/lib/rubocop/file_finder.rb#26 + def traverse_directories_upwards(start_dir, stop_dir = T.unsafe(nil)); end + private # @api private # - # source://rubocop/lib/rubocop/file_finder.rb#28 + # source://rubocop/lib/rubocop/file_finder.rb#36 def traverse_files_upwards(filename, start_dir, stop_dir); end class << self @@ -56156,227 +56449,6 @@ module RuboCop::LSP end end -# Log for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop/lib/rubocop/lsp/logger.rb#16 -class RuboCop::LSP::Logger - class << self - # @api private - # - # source://rubocop/lib/rubocop/lsp/logger.rb#17 - def log(message); end - end -end - -# Routes for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop/lib/rubocop/lsp/routes.rb#18 -class RuboCop::LSP::Routes - # @api private - # @return [Routes] a new instance of Routes - # - # source://rubocop/lib/rubocop/lsp/routes.rb#25 - def initialize(server); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/routes.rb#31 - def for(name); end - - # source://rubocop/lib/rubocop/lsp/routes.rb#38 - def handle_initialize(request); end - - # source://rubocop/lib/rubocop/lsp/routes.rb#57 - def handle_initialized(_request); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/routes.rb#167 - def handle_method_missing(request); end - - # source://rubocop/lib/rubocop/lsp/routes.rb#64 - def handle_shutdown(request); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/routes.rb#156 - def handle_unsupported_method(request, method = T.unsafe(nil)); end - - private - - # @api private - # - # source://rubocop/lib/rubocop/lsp/routes.rb#205 - def diagnostic(file_uri, text); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/routes.rb#175 - def extract_initialization_options_from(request); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/routes.rb#185 - def format_file(file_uri, command: T.unsafe(nil)); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/routes.rb#219 - def remove_file_protocol_from(uri); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/routes.rb#223 - def to_diagnostic(offense); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/routes.rb#235 - def to_range(location); end - - class << self - private - - # @api private - # - # source://rubocop/lib/rubocop/lsp/routes.rb#19 - def handle(name, &block); end - end -end - -# Runtime for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop/lib/rubocop/lsp/runtime.rb#16 -class RuboCop::LSP::Runtime - # @api private - # @return [Runtime] a new instance of Runtime - # - # source://rubocop/lib/rubocop/lsp/runtime.rb#19 - def initialize(config_store); end - - # This abuses the `--stdin` option of rubocop and reads the formatted text - # from the `options[:stdin]` that rubocop mutates. This depends on - # `parallel: false` as well as the fact that RuboCop doesn't otherwise dup - # or reassign that options object. Risky business! - # - # Reassigning `options[:stdin]` is done here: - # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cop/team.rb#L131 - # Printing `options[:stdin]` - # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cli/command/execute_runner.rb#L95 - # Setting `parallel: true` would break this here: - # https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/runner.rb#L72 - # - # @api private - # - # source://rubocop/lib/rubocop/lsp/runtime.rb#38 - def format(path, text, command:); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/runtime.rb#17 - def layout_mode=(_arg0); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/runtime.rb#17 - def lint_mode=(_arg0); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/runtime.rb#55 - def offenses(path, text); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/runtime.rb#17 - def safe_autocorrect=(_arg0); end - - private - - # @api private - # - # source://rubocop/lib/rubocop/lsp/runtime.rb#77 - def config_only_options; end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/runtime.rb#84 - def redirect_stdout(&block); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/runtime.rb#92 - def run_rubocop(options, path); end -end - -# Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop/lib/rubocop/lsp/server.rb#22 -class RuboCop::LSP::Server - # @api private - # @return [Server] a new instance of Server - # - # source://rubocop/lib/rubocop/lsp/server.rb#23 - def initialize(config_store); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/server.rb#61 - def configure(options); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/server.rb#53 - def format(path, text, command:); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/server.rb#57 - def offenses(path, text); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/server.rb#34 - def start; end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/server.rb#67 - def stop(&block); end - - # @api private - # - # source://rubocop/lib/rubocop/lsp/server.rb#49 - def write(response); end -end - -# Severity for Language Server Protocol of RuboCop. -# -# @api private -# -# source://rubocop/lib/rubocop/lsp/severity.rb#7 -class RuboCop::LSP::Severity - class << self - # @api private - # - # source://rubocop/lib/rubocop/lsp/severity.rb#17 - def find_by(rubocop_severity); end - end -end - -# @api private -# -# source://rubocop/lib/rubocop/lsp/severity.rb#8 -RuboCop::LSP::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) - # Encapsulation of a lockfile for use when checking for gems. # Does not actually resolve gems, just parses the lockfile. # @@ -57506,10 +57578,10 @@ class RuboCop::Runner # @return [Boolean] # - # source://rubocop/lib/rubocop/runner.rb#427 + # source://rubocop/lib/rubocop/runner.rb#430 def considered_failure?(offense); end - # source://rubocop/lib/rubocop/runner.rb#460 + # source://rubocop/lib/rubocop/runner.rb#463 def default_config(cop_name); end # source://rubocop/lib/rubocop/runner.rb#276 @@ -57538,16 +57610,16 @@ class RuboCop::Runner # source://rubocop/lib/rubocop/runner.rb#244 def file_started(file); end - # source://rubocop/lib/rubocop/runner.rb#407 + # source://rubocop/lib/rubocop/runner.rb#410 def filter_cop_classes(cop_classes, config); end # source://rubocop/lib/rubocop/runner.rb#108 def find_target_files(paths); end - # source://rubocop/lib/rubocop/runner.rb#418 + # source://rubocop/lib/rubocop/runner.rb#421 def formatter_set; end - # source://rubocop/lib/rubocop/runner.rb#475 + # source://rubocop/lib/rubocop/runner.rb#478 def get_processed_source(file); end # source://rubocop/lib/rubocop/runner.rb#346 @@ -57564,25 +57636,25 @@ class RuboCop::Runner # @return [Boolean] # - # source://rubocop/lib/rubocop/runner.rb#456 + # source://rubocop/lib/rubocop/runner.rb#459 def mark_as_safe_by_config?(config); end - # source://rubocop/lib/rubocop/runner.rb#464 + # source://rubocop/lib/rubocop/runner.rb#467 def minimum_severity_to_fail; end - # source://rubocop/lib/rubocop/runner.rb#368 + # source://rubocop/lib/rubocop/runner.rb#371 def mobilize_team(processed_source); end - # source://rubocop/lib/rubocop/runner.rb#373 + # source://rubocop/lib/rubocop/runner.rb#376 def mobilized_cop_classes(config); end - # source://rubocop/lib/rubocop/runner.rb#436 + # source://rubocop/lib/rubocop/runner.rb#439 def offenses_to_report(offenses); end # source://rubocop/lib/rubocop/runner.rb#156 def process_file(file); end - # source://rubocop/lib/rubocop/runner.rb#397 + # source://rubocop/lib/rubocop/runner.rb#400 def qualify_option_cop_names; end # @yield [cop] @@ -57598,17 +57670,17 @@ class RuboCop::Runner # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # source://rubocop/lib/rubocop/runner.rb#503 + # source://rubocop/lib/rubocop/runner.rb#506 def standby_team(config); end # @return [Boolean] # - # source://rubocop/lib/rubocop/runner.rb#414 + # source://rubocop/lib/rubocop/runner.rb#417 def style_guide_cops_only?(config); end # @return [Boolean] # - # source://rubocop/lib/rubocop/runner.rb#448 + # source://rubocop/lib/rubocop/runner.rb#451 def supports_safe_autocorrect?(offense); end # @yield [team] @@ -57968,15 +58040,15 @@ end class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source extend ::RuboCop::AST::NodePattern::Macros - # source://rubocop/lib/rubocop/target_ruby.rb#64 + # source://rubocop/lib/rubocop/target_ruby.rb#62 def gem_requirement_versions(param0 = T.unsafe(nil)); end # @api private # - # source://rubocop/lib/rubocop/target_ruby.rb#70 + # source://rubocop/lib/rubocop/target_ruby.rb#68 def name; end - # source://rubocop/lib/rubocop/target_ruby.rb#59 + # source://rubocop/lib/rubocop/target_ruby.rb#57 def required_ruby_version(param0); end private @@ -57988,17 +58060,12 @@ class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop/lib/rubocop/target_ruby.rb#76 + # source://rubocop/lib/rubocop/target_ruby.rb#74 def find_version; end # @api private # - # source://rubocop/lib/rubocop/target_ruby.rb#86 - def gemspec_filename; end - - # @api private - # - # source://rubocop/lib/rubocop/target_ruby.rb#93 + # source://rubocop/lib/rubocop/target_ruby.rb#84 def gemspec_filepath; end # @api private @@ -58017,11 +58084,6 @@ class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source def version_from_right_hand_side(right_hand_side); end end -# @api private -# -# source://rubocop/lib/rubocop/target_ruby.rb#56 -RuboCop::TargetRuby::GemspecFile::GEMSPEC_EXTENSION = T.let(T.unsafe(nil), String) - # @api private # # source://rubocop/lib/rubocop/target_ruby.rb#7 @@ -58186,12 +58248,12 @@ module RuboCop::Version class << self # @api private # - # source://rubocop/lib/rubocop/version.rb#108 + # source://rubocop/lib/rubocop/version.rb#110 def document_version; end # @api private # - # source://rubocop/lib/rubocop/version.rb#58 + # source://rubocop/lib/rubocop/version.rb#60 def extension_versions(env); end # Returns feature version in one of two ways: @@ -58201,30 +58263,30 @@ module RuboCop::Version # # @api private # - # source://rubocop/lib/rubocop/version.rb#92 + # source://rubocop/lib/rubocop/version.rb#94 def feature_version(feature); end # @api private # - # source://rubocop/lib/rubocop/version.rb#43 + # source://rubocop/lib/rubocop/version.rb#45 def parser_version; end # @api private # - # source://rubocop/lib/rubocop/version.rb#113 + # source://rubocop/lib/rubocop/version.rb#115 def server_mode; end # @api private # - # source://rubocop/lib/rubocop/version.rb#21 + # source://rubocop/lib/rubocop/version.rb#22 def version(debug: T.unsafe(nil), env: T.unsafe(nil)); end end end -# source://rubocop/lib/rubocop/version.rb#12 +# source://rubocop/lib/rubocop/version.rb#13 RuboCop::Version::CANONICAL_FEATURE_NAMES = T.let(T.unsafe(nil), Hash) -# source://rubocop/lib/rubocop/version.rb#16 +# source://rubocop/lib/rubocop/version.rb#17 RuboCop::Version::EXTENSION_PATH_NAMES = T.let(T.unsafe(nil), Hash) # source://rubocop/lib/rubocop/version.rb#8 @@ -58253,14 +58315,23 @@ module RuboCop::YAMLDuplicationChecker # # source://rubocop/lib/rubocop/yaml_duplication_checker.rb#7 def check(yaml_string, filename, &on_duplicated); end + end +end - private +# @api private +# +# source://rubocop/lib/rubocop/yaml_duplication_checker.rb#14 +class RuboCop::YAMLDuplicationChecker::DuplicationCheckHandler < ::Psych::TreeBuilder + # @api private + # @return [DuplicationCheckHandler] a new instance of DuplicationCheckHandler + # + # source://rubocop/lib/rubocop/yaml_duplication_checker.rb#15 + def initialize(&block); end - # @api private - # - # source://rubocop/lib/rubocop/yaml_duplication_checker.rb#22 - def traverse(tree, &on_duplicated); end - end + # @api private + # + # source://rubocop/lib/rubocop/yaml_duplication_checker.rb#20 + def end_mapping; end end # Extensions to the core String class diff --git a/sorbet/rbi/gems/ruby-lsp@0.19.0.rbi b/sorbet/rbi/gems/ruby-lsp@0.20.1.rbi similarity index 91% rename from sorbet/rbi/gems/ruby-lsp@0.19.0.rbi rename to sorbet/rbi/gems/ruby-lsp@0.20.1.rbi index edf4130..9b6cee4 100644 --- a/sorbet/rbi/gems/ruby-lsp@0.19.0.rbi +++ b/sorbet/rbi/gems/ruby-lsp@0.20.1.rbi @@ -14,7 +14,7 @@ class RubyIndexer::Configuration sig { void } def initialize; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#172 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#223 sig { params(config: T::Hash[::String, T.untyped]).void } def apply_config(config); end @@ -27,27 +27,31 @@ class RubyIndexer::Configuration # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#23 def encoding=(_arg0); end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#60 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#85 sig { returns(T::Array[::RubyIndexer::IndexablePath]) } def indexables; end - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#167 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#218 sig { returns(::Regexp) } def magic_comment_regex; end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#70 + sig { returns(::String) } + def merged_excluded_file_pattern; end + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#20 sig { params(workspace_path: ::String).void } def workspace_path=(workspace_path); end private - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#200 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#251 sig { returns(T::Array[::String]) } def initial_excluded_gems; end # @raise [ArgumentError] # - # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#185 + # source://ruby-lsp/lib/ruby_indexer/lib/ruby_indexer/configuration.rb#236 sig { params(config: T::Hash[::String, T.untyped]).void } def validate_config!(config); end end @@ -74,113 +78,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 +214,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 +252,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 +268,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 +293,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 @@ -309,18 +342,18 @@ class RubyIndexer::Entry # @return [RubyIndexer::Location] # - # source://sorbet-runtime/0.5.11581lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11604lib/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 +367,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 +642,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 @@ -664,53 +690,53 @@ class RubyIndexer::Entry::Parameter # # @return [Symbol] # - # source://sorbet-runtime/0.5.11581lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11604lib/types/private/methods/_methods.rb#257 def decorated_name(*args, **_arg1, &blk); end # 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 +756,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 +777,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 +801,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 +829,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 +902,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 +1117,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#1014 sig do params( full_name: ::String, @@ -1107,7 +1130,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 +1142,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 +1155,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 +1168,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 +1178,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 +1191,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 +1203,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#1036 sig do params( entry: ::RubyIndexer::Entry::UnresolvedMethodAlias, @@ -1192,7 +1215,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 +1255,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 +1423,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 +1432,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 +1464,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 +1474,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 +1494,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 +1506,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 +1540,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#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#66 + # 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 +1654,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#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#15 +# 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 +2171,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 +2200,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 +2640,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 +2724,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 +3798,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 +3816,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 +3825,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 +3944,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 +4009,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 +4072,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 +4187,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 +4324,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#129 + 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#106 + 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 +4414,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#181 sig do params( name: ::String, @@ -4262,18 +4423,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#170 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 +4443,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#191 sig { params(constant_name: ::String).returns(::String) } def file_from_constant_name(constant_name); end end @@ -4473,7 +4634,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 +4647,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 +4657,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 +4786,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 +4801,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 +4900,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 +4913,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 +4934,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 +4942,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 +4972,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 @@ -4879,7 +5066,7 @@ class RubyLsp::ResponseBuilders::DocumentSymbol < ::RubyLsp::ResponseBuilders::R # @param symbol [Interface::DocumentSymbol] # @return [void] # - # source://sorbet-runtime/0.5.11581lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11604lib/types/private/methods/_methods.rb#257 def <<(*args, **_arg1, &blk); end # source://ruby-lsp/lib/ruby_lsp/response_builders/document_symbol.rb#47 @@ -4901,13 +5088,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 +5141,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 +5180,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 +5237,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 +5297,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 +5318,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 +5327,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 +5409,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,179 +5419,187 @@ 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 # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11581lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11604lib/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 # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11581lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11604lib/types/private/methods/_methods.rb#257 def text_document_document_link(*args, **_arg1, &blk); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11581lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11604lib/types/private/methods/_methods.rb#257 def text_document_document_symbol(*args, **_arg1, &blk); end # @param message [Hash{Symbol => T.untyped}] # @return [void] # - # source://sorbet-runtime/0.5.11581lib/types/private/methods/_methods.rb#257 + # source://sorbet-runtime/0.5.11604lib/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 +5774,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 @@ -5577,14 +5785,14 @@ class URI::Source < ::URI::File sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://uri/0.13.0uri/generic.rb#243 + # source://uri/0.13.1uri/generic.rb#243 def gem_name; end # source://ruby-lsp/lib/ruby_lsp/requests/support/source_uri.rb#33 sig { returns(T.nilable(::String)) } def gem_version; end - # source://uri/0.13.0uri/generic.rb#283 + # source://uri/0.13.1uri/generic.rb#283 def line_number; end # source://ruby-lsp/lib/ruby_lsp/requests/support/source_uri.rb#59 diff --git a/sorbet/rbi/gems/spoom@1.4.2.rbi b/sorbet/rbi/gems/spoom@1.5.0.rbi similarity index 99% rename from sorbet/rbi/gems/spoom@1.4.2.rbi rename to sorbet/rbi/gems/spoom@1.5.0.rbi index 3c40730..ee76ba4 100644 --- a/sorbet/rbi/gems/spoom@1.4.2.rbi +++ b/sorbet/rbi/gems/spoom@1.5.0.rbi @@ -426,7 +426,7 @@ module Spoom::Context::Bundle # Returns `nil` if `gem` cannot be found in the Gemfile. # # source://spoom/lib/spoom/context/bundle.rb#62 - sig { params(gem: ::String).returns(T.nilable(::String)) } + sig { params(gem: ::String).returns(T.nilable(::Gem::Version)) } def gem_version_from_gemfile_lock(gem); end # source://spoom/lib/spoom/context/bundle.rb#51 @@ -1004,7 +1004,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -1344,7 +1344,7 @@ class Spoom::Coverage::Snapshot < ::T::Struct sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } def from_obj(obj); end - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -1480,7 +1480,7 @@ class Spoom::Deadcode::Definition < ::T::Struct def to_json(*args); end class << self - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -2102,7 +2102,7 @@ class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base private - # source://spoom/lib/spoom/deadcode/plugins/ruby.rb#43 + # source://spoom/lib/spoom/deadcode/plugins/ruby.rb#46 sig { params(send: ::Spoom::Deadcode::Send, node: ::Prism::Node).void } def reference_symbol_as_constant(send, node); end end @@ -2368,7 +2368,7 @@ class Spoom::Deadcode::Send < ::T::Struct def each_arg_assoc(&block); end class << self - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -2388,7 +2388,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -2586,7 +2586,7 @@ class Spoom::FileTree::Node < ::T::Struct def path; end class << self - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -2652,7 +2652,7 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end # Parse a line formatted as `%h %at` into a `Commit` @@ -2764,7 +2764,7 @@ class Spoom::LSP::Diagnostic < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } def from_json(json); end - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -2797,7 +2797,7 @@ class Spoom::LSP::DocumentSymbol < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } def from_json(json); end - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -2855,7 +2855,7 @@ class Spoom::LSP::Hover < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } def from_json(json); end - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -2880,7 +2880,7 @@ class Spoom::LSP::Location < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } def from_json(json); end - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -2943,7 +2943,7 @@ class Spoom::LSP::Position < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } def from_json(json); end - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -2981,7 +2981,7 @@ class Spoom::LSP::Range < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } def from_json(json); end - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -3047,7 +3047,7 @@ class Spoom::LSP::SignatureHelp < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } def from_json(json); end - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -3473,7 +3473,7 @@ class Spoom::Model::Reference < ::T::Struct sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } def constant(name, location); end - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end # source://spoom/lib/spoom/model/reference.rb#29 diff --git a/sorbet/rbi/gems/tapioca@0.16.2.rbi b/sorbet/rbi/gems/tapioca@0.16.3.rbi similarity index 97% rename from sorbet/rbi/gems/tapioca@0.16.2.rbi rename to sorbet/rbi/gems/tapioca@0.16.3.rbi index 0db5613..2be69c6 100644 --- a/sorbet/rbi/gems/tapioca@0.16.2.rbi +++ b/sorbet/rbi/gems/tapioca@0.16.3.rbi @@ -55,7 +55,7 @@ module RBI; end # source://tapioca/lib/tapioca/rbi_ext/model.rb#5 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi/0.2.0lib/rbi/model.rb#121 + # source://rbi/0.2.1lib/rbi/model.rb#121 sig do params( loc: T.nilable(::RBI::Loc), @@ -65,15 +65,15 @@ class RBI::Tree < ::RBI::NodeWithComments end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/0.2.0lib/rbi/model.rb#128 + # source://rbi/0.2.1lib/rbi/model.rb#128 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi/0.2.0lib/rbi/rewriters/add_sig_templates.rb#66 + # source://rbi/0.2.1lib/rbi/rewriters/add_sig_templates.rb#66 sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - # source://rbi/0.2.0lib/rbi/rewriters/annotate.rb#49 + # source://rbi/0.2.1lib/rbi/rewriters/annotate.rb#49 sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end @@ -138,35 +138,35 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - # source://rbi/0.2.0lib/rbi/rewriters/deannotate.rb#41 + # source://rbi/0.2.1lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi/0.2.0lib/rbi/model.rb#134 + # source://rbi/0.2.1lib/rbi/model.rb#134 sig { returns(T::Boolean) } def empty?; end - # source://rbi/0.2.0lib/rbi/rewriters/filter_versions.rb#118 + # source://rbi/0.2.1lib/rbi/rewriters/filter_versions.rb#118 sig { params(version: ::Gem::Version).void } def filter_versions!(version); end - # source://rbi/0.2.0lib/rbi/rewriters/flatten_singleton_methods.rb#60 + # source://rbi/0.2.1lib/rbi/rewriters/flatten_singleton_methods.rb#60 sig { void } def flatten_singleton_methods!; end - # source://rbi/0.2.0lib/rbi/rewriters/flatten_visibilities.rb#60 + # source://rbi/0.2.1lib/rbi/rewriters/flatten_visibilities.rb#60 sig { void } def flatten_visibilities!; end - # source://rbi/0.2.0lib/rbi/rewriters/group_nodes.rb#81 + # source://rbi/0.2.1lib/rbi/rewriters/group_nodes.rb#81 sig { void } def group_nodes!; end - # source://rbi/0.2.0lib/rbi/index.rb#68 + # source://rbi/0.2.1lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end - # source://rbi/0.2.0lib/rbi/rewriters/merge_trees.rb#324 + # source://rbi/0.2.1lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -177,27 +177,27 @@ class RBI::Tree < ::RBI::NodeWithComments end def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi/0.2.0lib/rbi/rewriters/nest_non_public_members.rb#46 + # source://rbi/0.2.1lib/rbi/rewriters/nest_non_public_members.rb#46 sig { void } def nest_non_public_members!; end - # source://rbi/0.2.0lib/rbi/rewriters/nest_singleton_methods.rb#36 + # source://rbi/0.2.1lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end - # source://rbi/0.2.0lib/rbi/rewriters/nest_top_level_members.rb#63 + # source://rbi/0.2.1lib/rbi/rewriters/nest_top_level_members.rb#63 sig { void } def nest_top_level_members!; end - # source://rbi/0.2.0lib/rbi/model.rb#112 + # source://rbi/0.2.1lib/rbi/model.rb#112 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi/0.2.0lib/rbi/rewriters/attr_to_methods.rb#53 + # source://rbi/0.2.1lib/rbi/rewriters/attr_to_methods.rb#53 sig { void } def replace_attributes_with_methods!; end - # source://rbi/0.2.0lib/rbi/rewriters/sort_nodes.rb#119 + # source://rbi/0.2.1lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end @@ -218,7 +218,7 @@ class RBI::TypedParam < ::T::Struct const :type, ::String class << self - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -1141,7 +1141,7 @@ class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -1152,7 +1152,7 @@ class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -1209,7 +1209,7 @@ class Tapioca::Dsl::Compiler ConstantType = type_member { { upper: Module } } - # source://tapioca/lib/tapioca/dsl/compiler.rb#74 + # source://tapioca/lib/tapioca/dsl/compiler.rb#107 sig do params( pipeline: ::Tapioca::Dsl::Pipeline, @@ -1222,11 +1222,11 @@ class Tapioca::Dsl::Compiler # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`. # - # source://tapioca/lib/tapioca/dsl/compiler.rb#92 + # source://tapioca/lib/tapioca/dsl/compiler.rb#125 sig { params(error: ::String).void } def add_error(error); end - # source://tapioca/lib/tapioca/dsl/compiler.rb#83 + # source://tapioca/lib/tapioca/dsl/compiler.rb#116 sig { params(compiler_name: ::String).returns(T::Boolean) } def compiler_enabled?(compiler_name); end @@ -1236,7 +1236,7 @@ class Tapioca::Dsl::Compiler # @abstract # - # source://tapioca/lib/tapioca/dsl/compiler.rb#88 + # source://tapioca/lib/tapioca/dsl/compiler.rb#121 sig { abstract.void } def decorate; end @@ -1250,48 +1250,61 @@ class Tapioca::Dsl::Compiler private - # source://tapioca/lib/tapioca/dsl/compiler.rb#141 + # source://tapioca/lib/tapioca/dsl/compiler.rb#174 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) } def compile_method_parameters_to_rbi(method_def); end - # source://tapioca/lib/tapioca/dsl/compiler.rb#177 + # source://tapioca/lib/tapioca/dsl/compiler.rb#210 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) } def compile_method_return_type_to_rbi(method_def); end - # source://tapioca/lib/tapioca/dsl/compiler.rb#131 + # source://tapioca/lib/tapioca/dsl/compiler.rb#164 sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void } def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end # Get the types of each parameter from a method signature # - # source://tapioca/lib/tapioca/dsl/compiler.rb#105 + # source://tapioca/lib/tapioca/dsl/compiler.rb#138 sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) } def parameters_types_from_signature(method_def, signature); end class << self # @abstract # - # source://tapioca/lib/tapioca/dsl/compiler.rb#37 + # source://tapioca/lib/tapioca/dsl/compiler.rb#39 sig { abstract.returns(T::Enumerable[::Module]) } def gather_constants; end - # source://tapioca/lib/tapioca/dsl/compiler.rb#32 + # source://tapioca/lib/tapioca/dsl/compiler.rb#34 sig { params(constant: ::Module).returns(T::Boolean) } def handles?(constant); end - # source://tapioca/lib/tapioca/dsl/compiler.rb#40 + # source://tapioca/lib/tapioca/dsl/compiler.rb#42 sig { returns(T::Set[::Module]) } def processable_constants; end + # source://tapioca/lib/tapioca/dsl/compiler.rb#50 + sig { params(constants: T::Array[::Module]).void } + def requested_constants=(constants); end + private - # source://tapioca/lib/tapioca/dsl/compiler.rb#50 + # source://tapioca/lib/tapioca/dsl/compiler.rb#75 sig { returns(T::Enumerable[T::Class[T.anything]]) } def all_classes; end - # source://tapioca/lib/tapioca/dsl/compiler.rb#58 + # source://tapioca/lib/tapioca/dsl/compiler.rb#87 sig { returns(T::Enumerable[::Module]) } def all_modules; end + + # source://tapioca/lib/tapioca/dsl/compiler.rb#61 + sig do + type_parameters(:U) + .params( + klass: T.all(T.type_parameter(:U), T::Class[T.anything]) + ).returns(T::Array[T.type_parameter(:U)]) + end + def descendants_of(klass); end end end @@ -1372,11 +1385,11 @@ class Tapioca::Dsl::Pipeline private - # source://tapioca/lib/tapioca/dsl/pipeline.rb#223 + # source://tapioca/lib/tapioca/dsl/pipeline.rb#224 sig { void } def abort_if_pending_migrations!; end - # source://tapioca/lib/tapioca/dsl/pipeline.rb#168 + # source://tapioca/lib/tapioca/dsl/pipeline.rb#169 sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) } def filter_anonymous_and_reloaded_constants(constants); end @@ -1399,11 +1412,11 @@ class Tapioca::Dsl::Pipeline end def gather_constants(requested_constants, requested_paths, skipped_constants); end - # source://tapioca/lib/tapioca/dsl/pipeline.rb#197 + # source://tapioca/lib/tapioca/dsl/pipeline.rb#198 sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } def rbi_for_constant(constant); end - # source://tapioca/lib/tapioca/dsl/pipeline.rb#216 + # source://tapioca/lib/tapioca/dsl/pipeline.rb#217 sig { params(error: ::String).returns(T.noreturn) } def report_error(error); end end @@ -2208,7 +2221,7 @@ class Tapioca::GemInfo < ::T::Struct sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) } def from_spec(spec); end - # source://sorbet-runtime/0.5.11581lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11604lib/types/struct.rb#13 def inherited(s); end end end @@ -3534,30 +3547,30 @@ Tapioca::VERSION = T.let(T.unsafe(nil), String) # source://tapioca/lib/tapioca/helpers/source_uri.rb#7 class URI::Source < ::URI::File - # source://ruby-lsp/0.18.3lib/ruby_lsp/requests/support/source_uri.rb#62 + # source://ruby-lsp/0.20.1lib/ruby_lsp/requests/support/source_uri.rb#69 sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://uri/0.13.0uri/generic.rb#243 + # source://uri/0.13.1uri/generic.rb#243 def gem_name; end - # source://ruby-lsp/0.18.3lib/ruby_lsp/requests/support/source_uri.rb#26 + # source://ruby-lsp/0.20.1lib/ruby_lsp/requests/support/source_uri.rb#33 sig { returns(T.nilable(::String)) } def gem_version; end - # source://uri/0.13.0uri/generic.rb#283 + # source://uri/0.13.1uri/generic.rb#283 def line_number; end - # source://ruby-lsp/0.18.3lib/ruby_lsp/requests/support/source_uri.rb#52 + # source://ruby-lsp/0.20.1lib/ruby_lsp/requests/support/source_uri.rb#59 sig { params(v: T.nilable(::String)).void } def set_path(v); end - # source://ruby-lsp/0.18.3lib/ruby_lsp/requests/support/source_uri.rb#74 + # source://ruby-lsp/0.20.1lib/ruby_lsp/requests/support/source_uri.rb#81 sig { returns(::String) } def to_s; end class << self - # source://ruby-lsp/0.18.3lib/ruby_lsp/requests/support/source_uri.rb#39 + # source://ruby-lsp/0.20.1lib/ruby_lsp/requests/support/source_uri.rb#46 sig do params( gem_name: ::String,